Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: utils/css/tool.dart

Issue 137013002: Removed obsolete code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed libraries not used Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/css/tokenkind.dart ('k') | utils/css/tree.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/css/tool.dart
diff --git a/utils/css/tool.dart b/utils/css/tool.dart
deleted file mode 100644
index beb26676a44bdbe753a674199f19dddd48c5b785..0000000000000000000000000000000000000000
--- a/utils/css/tool.dart
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library csstool;
-
-import 'dart:io';
-import 'css.dart';
-import '../lib/file_system.dart';
-import '../lib/file_system_vm.dart';
-
-
-FileSystem files;
-
-/** Invokes [callback] and returns how long it took to execute in ms. */
-num time(callback()) {
- final watch = new Stopwatch();
- watch.start();
- callback();
- watch.stop();
- return watch.elapsedMilliseconds;
-}
-
-printStats(num elapsed, [String filename = '']) {
- print('Parsed ${_GREEN_COLOR}${filename}${_NO_COLOR} in ${elapsed} msec.');
-}
-
-/**
- * Run from the `utils/css` directory.
- */
-void main(List<String> optionsArgs) {
- assert(optionArgs.length == 2);
-
- String sourceFullFn = optionArgs[0];
- String outputFullFn = optionArgs[1];
-
- String sourcePath;
- String sourceFilename;
- int idxBeforeFilename = sourceFullFn.lastIndexOf('/');
- if (idxBeforeFilename >= 0) {
- sourcePath = sourceFullFn.substring(0, idxBeforeFilename + 1);
- sourceFilename = sourceFullFn.substring(idxBeforeFilename + 1);
- }
-
- String outPath;
- idxBeforeFilename = outputFullFn.lastIndexOf('/');
- if (idxBeforeFilename >= 0) {
- outPath = outputFullFn.substring(0, idxBeforeFilename + 1);
- }
-
- initCssWorld();
-
- files = new VMFileSystem();
- if (!files.fileExists(sourceFullFn)) {
- // Display colored error message if file is missing.
- print("\033[31mCSS source file missing - ${sourceFullFn}\033[0m");
- } else {
- String source = files.readAll(sourceFullFn);
-
- Stylesheet stylesheet;
-
- final elapsed = time(() {
- Parser parser = new Parser(
- new SourceFile(sourceFullFn, source), 0, files, sourcePath);
- stylesheet = parser.parse();
- });
-
- printStats(elapsed, sourceFullFn);
-
- StringBuffer buff = new StringBuffer(
- '/* File generated by SCSS from source ${sourceFilename}\n' +
- ' * Do not edit.\n' +
- ' */\n\n');
- buff.write(stylesheet.toString());
-
- files.writeString(outputFullFn, buff.toString());
- print("Generated file ${outputFullFn}");
-
- // Generate CSS.dart file.
- String genDartClassFile = Generate.dartClass(files, outPath, stylesheet,
- sourceFilename);
- print("Generated file ${genDartClassFile}");
- }
-}
« no previous file with comments | « utils/css/tokenkind.dart ('k') | utils/css/tree.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698