diff --git a/gulpfile.js b/gulpfile.js index 92d74ab86b..d0b8ce4ec6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -246,7 +246,7 @@ gulp.task('build/clean.docs', clean(gulp, gulpPlugins, { // ------------ // transpile -gulp.task('build/tree.dart', ['build.broccoli.tools'], function() { +gulp.task('build/tree.dart', ['build.tools'], function() { return angularBuilder.rebuildDartTree(); }); @@ -480,15 +480,15 @@ gulp.task('test.unit.cjs', ['test.unit.cjs/ci'], function () { }); -gulp.task('test.unit.broccoli/ci', ['build.broccoli.tools'], function(done) { - fork('./tools/traceur-jasmine', ['dist/broccoli/**/*.spec.js'], { +gulp.task('test.unit.tools/ci', ['build.tools'], function(done) { + fork('./tools/traceur-jasmine', ['dist/tools/**/*.spec.js'], { stdio: 'inherit' }).on('close', done); }); -gulp.task('test.unit.broccoli', ['test.unit.broccoli/ci'], function() { - gulp.watch('tools/broccoli/**', ['test.unit.broccoli/ci']); +gulp.task('test.unit.tools', ['test.unit.tools/ci'], function() { + gulp.watch('tools/**', ['test.unit.tools/ci']); }); // ------------------ @@ -585,10 +585,10 @@ gulp.task('build.dart', function(done) { ); }); -gulp.task('build.broccoli.tools', function() { +gulp.task('build.tools', function() { var mergedStream; - var tsResult = gulp.src('tools/broccoli/**/*.ts') + var tsResult = gulp.src('tools/**/*.ts') .pipe(sourcemaps.init()) .pipe(tsc({target: 'ES5', module: 'commonjs', reporter: tsc.reporter.nullReporter()})) .on('error', function(error) { @@ -597,20 +597,20 @@ gulp.task('build.broccoli.tools', function() { mergedStream.emit('error', error); }); - var destDir = gulp.dest('dist/broccoli'); + var destDir = gulp.dest('dist/tools/'); mergedStream = merge2([ tsResult.js.pipe(sourcemaps.write('.')).pipe(destDir), tsResult.js.pipe(destDir) ]).on('end', function() { - var BroccoliBuilder = require('./dist/broccoli/broccoli_builder').BroccoliBuilder; - getBroccoli = function() { return BroccoliBuilder; }; + var AngularBuilder = require('./dist/tools/broccoli/angular_builder').AngularBuilder; + angularBuilder = new AngularBuilder('dist'); }); return mergedStream; }); -gulp.task('broccoli.js.dev', ['build.broccoli.tools'], function() { +gulp.task('broccoli.js.dev', ['build.tools'], function() { return angularBuilder.rebuildBrowserDevTree(); }); @@ -624,14 +624,14 @@ gulp.task('build.js.dev', function(done) { ); }); -gulp.task('build.js.prod', ['build.broccoli.tools'], function() { +gulp.task('build.js.prod', ['build.tools'], function() { return angularBuilder.rebuildBrowserProdTree(); }); var firstBuildJsCjs = true; -gulp.task('build.js.cjs', ['build.broccoli.tools'], function() { +gulp.task('build.js.cjs', ['build.tools'], function() { return angularBuilder.rebuildNodeTree().then(function() { if (firstBuildJsCjs) { firstBuildJsCjs = false; diff --git a/tools/broccoli/traceur/index.ts b/tools/broccoli/traceur/index.ts index 85b8fc6a69..1926a0d244 100644 --- a/tools/broccoli/traceur/index.ts +++ b/tools/broccoli/traceur/index.ts @@ -9,7 +9,7 @@ import path = require('path'); import TreeDiffer = require('../tree-differ'); import Writer = require('broccoli-writer'); -let traceur = require('../../../tools/transpiler'); +let traceur = require('../../../../tools/transpiler'); let symlinkOrCopy = require('symlink-or-copy'); let xtend = require('xtend'); diff --git a/tools/broccoli/trees/browser_tree.ts b/tools/broccoli/trees/browser_tree.ts index 01fdd7310b..57e8a7744a 100644 --- a/tools/broccoli/trees/browser_tree.ts +++ b/tools/broccoli/trees/browser_tree.ts @@ -12,7 +12,7 @@ var ts2dart = require('../broccoli-ts2dart'); var traceurCompiler = require('../traceur'); -var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..')); +var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..', '..')); module.exports = function makeBrowserTree(options, destinationPath) { diff --git a/tools/broccoli/trees/dart_tree.ts b/tools/broccoli/trees/dart_tree.ts index a891643a57..f30244e481 100644 --- a/tools/broccoli/trees/dart_tree.ts +++ b/tools/broccoli/trees/dart_tree.ts @@ -92,7 +92,7 @@ function getHtmlSourcesTree() { function getTemplatedPubspecsTree() { // The JSON structure for templating pubspec.yaml files. - var BASE_PACKAGE_JSON = require('../../../package.json'); + var BASE_PACKAGE_JSON = require('../../../../package.json'); var COMMON_PACKAGE_JSON = { version: BASE_PACKAGE_JSON.version, homepage: BASE_PACKAGE_JSON.homepage, diff --git a/tools/broccoli/trees/node_tree.ts b/tools/broccoli/trees/node_tree.ts index 772f8bcd56..a2539edb34 100644 --- a/tools/broccoli/trees/node_tree.ts +++ b/tools/broccoli/trees/node_tree.ts @@ -11,7 +11,7 @@ var ts2dart = require('../broccoli-ts2dart'); var traceurCompiler = require('../traceur'); var TypescriptCompiler = require('../typescript'); -var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..')); +var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..', '..')); module.exports = function makeNodeTree(destinationPath) {