dart-sass/bin/sass.dart

18 lines
605 B
Dart
Raw Normal View History

2016-05-24 03:11:09 +02:00
// Copyright 2016 Google Inc. Use of this source code is governed by an
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'dart:io';
import 'package:path/path.dart' as p;
import 'package:sass/src/parser.dart';
2016-05-28 01:09:03 +02:00
import 'package:sass/src/visitor/css.dart';
2016-05-24 23:01:41 +02:00
import 'package:sass/src/visitor/statement/perform.dart';
2016-05-24 03:11:09 +02:00
void main(List<String> args) {
var parser = new Parser(new File(args.first).readAsStringSync(),
url: p.toUri(args.first));
2016-05-28 01:09:03 +02:00
var cssTree = new PerformVisitor().visitStylesheet(parser.parse());
print(toCss(cssTree));
2016-05-24 03:11:09 +02:00
}