build(gulp): rename tasks `build.broccoli.tools` => `build.tools` + `test.unit.broccoli` => `test.unit.tools`

This commit is contained in:
Igor Minar 2015-04-26 01:04:28 -07:00
parent 1cbdb9cd17
commit a52798543a
5 changed files with 17 additions and 17 deletions

View File

@ -246,7 +246,7 @@ gulp.task('build/clean.docs', clean(gulp, gulpPlugins, {
// ------------ // ------------
// transpile // transpile
gulp.task('build/tree.dart', ['build.broccoli.tools'], function() { gulp.task('build/tree.dart', ['build.tools'], function() {
return angularBuilder.rebuildDartTree(); 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) { gulp.task('test.unit.tools/ci', ['build.tools'], function(done) {
fork('./tools/traceur-jasmine', ['dist/broccoli/**/*.spec.js'], { fork('./tools/traceur-jasmine', ['dist/tools/**/*.spec.js'], {
stdio: 'inherit' stdio: 'inherit'
}).on('close', done); }).on('close', done);
}); });
gulp.task('test.unit.broccoli', ['test.unit.broccoli/ci'], function() { gulp.task('test.unit.tools', ['test.unit.tools/ci'], function() {
gulp.watch('tools/broccoli/**', ['test.unit.broccoli/ci']); 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 mergedStream;
var tsResult = gulp.src('tools/broccoli/**/*.ts') var tsResult = gulp.src('tools/**/*.ts')
.pipe(sourcemaps.init()) .pipe(sourcemaps.init())
.pipe(tsc({target: 'ES5', module: 'commonjs', reporter: tsc.reporter.nullReporter()})) .pipe(tsc({target: 'ES5', module: 'commonjs', reporter: tsc.reporter.nullReporter()}))
.on('error', function(error) { .on('error', function(error) {
@ -597,20 +597,20 @@ gulp.task('build.broccoli.tools', function() {
mergedStream.emit('error', error); mergedStream.emit('error', error);
}); });
var destDir = gulp.dest('dist/broccoli'); var destDir = gulp.dest('dist/tools/');
mergedStream = merge2([ mergedStream = merge2([
tsResult.js.pipe(sourcemaps.write('.')).pipe(destDir), tsResult.js.pipe(sourcemaps.write('.')).pipe(destDir),
tsResult.js.pipe(destDir) tsResult.js.pipe(destDir)
]).on('end', function() { ]).on('end', function() {
var BroccoliBuilder = require('./dist/broccoli/broccoli_builder').BroccoliBuilder; var AngularBuilder = require('./dist/tools/broccoli/angular_builder').AngularBuilder;
getBroccoli = function() { return BroccoliBuilder; }; angularBuilder = new AngularBuilder('dist');
}); });
return mergedStream; return mergedStream;
}); });
gulp.task('broccoli.js.dev', ['build.broccoli.tools'], function() { gulp.task('broccoli.js.dev', ['build.tools'], function() {
return angularBuilder.rebuildBrowserDevTree(); 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(); return angularBuilder.rebuildBrowserProdTree();
}); });
var firstBuildJsCjs = true; 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() { return angularBuilder.rebuildNodeTree().then(function() {
if (firstBuildJsCjs) { if (firstBuildJsCjs) {
firstBuildJsCjs = false; firstBuildJsCjs = false;

View File

@ -9,7 +9,7 @@ import path = require('path');
import TreeDiffer = require('../tree-differ'); import TreeDiffer = require('../tree-differ');
import Writer = require('broccoli-writer'); import Writer = require('broccoli-writer');
let traceur = require('../../../tools/transpiler'); let traceur = require('../../../../tools/transpiler');
let symlinkOrCopy = require('symlink-or-copy'); let symlinkOrCopy = require('symlink-or-copy');
let xtend = require('xtend'); let xtend = require('xtend');

View File

@ -12,7 +12,7 @@ var ts2dart = require('../broccoli-ts2dart');
var traceurCompiler = require('../traceur'); var traceurCompiler = require('../traceur');
var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..')); var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..', '..'));
module.exports = function makeBrowserTree(options, destinationPath) { module.exports = function makeBrowserTree(options, destinationPath) {

View File

@ -92,7 +92,7 @@ function getHtmlSourcesTree() {
function getTemplatedPubspecsTree() { function getTemplatedPubspecsTree() {
// The JSON structure for templating pubspec.yaml files. // 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 = { var COMMON_PACKAGE_JSON = {
version: BASE_PACKAGE_JSON.version, version: BASE_PACKAGE_JSON.version,
homepage: BASE_PACKAGE_JSON.homepage, homepage: BASE_PACKAGE_JSON.homepage,

View File

@ -11,7 +11,7 @@ var ts2dart = require('../broccoli-ts2dart');
var traceurCompiler = require('../traceur'); var traceurCompiler = require('../traceur');
var TypescriptCompiler = require('../typescript'); var TypescriptCompiler = require('../typescript');
var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..')); var projectRootDir = path.normalize(path.join(__dirname, '..', '..', '..', '..'));
module.exports = function makeNodeTree(destinationPath) { module.exports = function makeNodeTree(destinationPath) {