Permalink
Browse files

feature: Autoprefixer added

  • Loading branch information...
MikeMitterer committed Apr 8, 2015
1 parent 519d685 commit 62c654162a788c2d937677a776e5606f65f5ab2b
Showing with 22 additions and 0 deletions.
  1. +6 −0 SiteGen.iml
  2. +16 −0 lib/src/Application.dart
View
@@ -4,6 +4,12 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/bin/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/.sitegen/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/html/_content/about/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/html/_content/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/html/_templates/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/html/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/web/about/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/web/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/simple/web/styles/packages" />
View
@@ -143,6 +143,7 @@ class Application {
_logger.info("Main SCSS: $scssFile");
_compileScss(config.sasscompiler,scssFile, cssFile);
_autoPrefixer("autoprefixer",cssFile);
scssFiles.forEach((final File file) {
_logger.info("Observing: ${file.path}");
@@ -152,6 +153,7 @@ class Application {
//_logger.info("Scss: ${scssFile}, CSS: ${cssFile}");
_compileScss(config.sasscompiler, scssFile, cssFile);
_autoPrefixer("autoprefixer",cssFile);
});
});
@@ -278,6 +280,20 @@ class Application {
_logger.info("Done!");
}
Future _autoPrefixer(final String prefixer,final String cssFile) async {
Validate.notBlank(prefixer);
Validate.notBlank(cssFile);
_logger.info("Autoprefixing $cssFile");
final ProcessResult result = await Process.run(prefixer, [ cssFile ]);
if (result.exitCode != 0) {
_logger.info("prefixer faild with: ${(result.stderr as String).trim()}!");
_vickiSay("got a prefixer error");
return;
}
_logger.info("Done!");
}
List<File> _listSCSSFilesIn(final Directory dir) {
Validate.notNull(dir);
return dir.listSync(recursive: true).where((final file) {

0 comments on commit 62c6541

Please sign in to comment.