Skip to content

Commit

Permalink
refactor(transformer): precompile stylesheets
Browse files Browse the repository at this point in the history
Part of #3605
  • Loading branch information
yjbanov authored and tbosch committed Oct 2, 2015
1 parent 52236bd commit 841f878
Show file tree
Hide file tree
Showing 10 changed files with 771 additions and 17 deletions.
32 changes: 21 additions & 11 deletions gulpfile.js
Expand Up @@ -744,24 +744,31 @@ gulp.task('test.unit.cjs', ['build/clean.js', 'build.tools'], function (neverDon
watch('modules/**', buildAndTest);
});


// Use this target to continuously run dartvm unit-tests (such as transformer
// tests) while coding. Note: these tests do not use Karma.
gulp.task('test.unit.dartvm', function (done) {
runSequence(
'build/tree.dart',
'build/pure-packages.dart',
'build/pubspec.dart',
'!build/pubget.angular2.dart',
'!build/change_detect.dart',
'!test.unit.dartvm/run',
function(error) {
// if initial build failed (likely due to build or formatting step) then exit
// otherwise karma server doesn't start and we can't continue running properly
if (error) {
done(error);
return;
}

// Watch for changes made in the TS and Dart code under "modules" and
// run ts2dart and test change detector generator prior to rerunning the
// tests.
watch('modules/angular2/**', { ignoreInitial: true }, [
'!build/tree.dart',
'!build/change_detect.dart',
'!test.unit.dartvm/run'
]);

// Watch for changes made in Dart code under "modules_dart", then copy it
// to dist and run test change detector generator prior to retunning the
// tests.
watch('modules_dart/**', { ignoreInitial: true }, [
'build/pure-packages.dart',
'!build/change_detect.dart',
'!test.unit.dartvm/run'
]);
}
Expand Down Expand Up @@ -863,14 +870,17 @@ gulp.task('build/pure-packages.dart', function() {
var transformStream = gulp
.src([
'modules_dart/transform/**/*',
'!modules_dart/transform/**/*.proto'
'!modules_dart/transform/**/*.proto',
'!modules_dart/transform/pubspec.yaml',
'!modules_dart/transform/**/packages{,/**}',
])
.pipe(gulp.dest(path.join(CONFIG.dest.dart, 'angular2')));

var moveStream = gulp.src([
'modules_dart/**/*.dart',
'modules_dart/**/pubspec.yaml',
'!modules_dart/transform/**'
'!modules_dart/transform/**',
'!modules_dart/**/packages{,/**}'
])
.pipe(through2.obj(function(file, enc, done) {
if (/pubspec.yaml$/.test(file.path)) {
Expand Down
1 change: 1 addition & 0 deletions modules/angular2/pubspec.yaml
Expand Up @@ -11,6 +11,7 @@ environment:
dependencies:
analyzer: '>=0.24.4 <0.27.0'
barback: '^0.15.2+2'
csslib: '>=0.12.0 <1.0.0'
code_transformers: '^0.2.8'
dart_style: '>=0.1.8 <0.3.0'
glob: '^1.0.0'
Expand Down

0 comments on commit 841f878

Please sign in to comment.