Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Revert "Fail the build when the build fails"
Browse files Browse the repository at this point in the history
This reverts commit 45b9eea.
  • Loading branch information
matthew-andrews committed Jun 18, 2015
1 parent 45b9eea commit 4b9bd23
Showing 1 changed file with 33 additions and 45 deletions.
78 changes: 33 additions & 45 deletions tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,57 +38,45 @@ function run(task, opts) {
}

gulp.task('build-sass', function() {
return new Promise(function(resolve, reject) {
obt.build.sass(gulp, {
sass: sourceFolder + mainScssFile,
buildFolder: buildFolder,
env: isDev ? 'development' : 'production'
})
.on('end', function() {
console.log('build-sass completed');
resolve();
})
.on('error', function() {
console.warn('build-sass errored');
reject();
});
});
return obt.build.sass(gulp, {
sass: sourceFolder + mainScssFile,
buildFolder: buildFolder,
env: isDev ? 'development' : 'production'
})
.on('end', function () {
console.log('build-sass completed');
})
.on('error', function () {
console.warn('build-sass errored');
});
});

gulp.task('build-js', function() {
return new Promise(function(resolve, reject) {
return obt.build.js(gulp, {
js: sourceFolder + mainJsFile,
buildFolder: buildFolder,
env: 'development' // need to run as development as we do our own sourcemaps
})
.on('end', function() {
console.log('build-js completed');
resolve();
})
.on('error', function() {
console.warn('build-js errored');
reject();
});
});
return obt.build.js(gulp, {
js: sourceFolder + mainJsFile,
buildFolder: buildFolder,
env: 'development' // need to run as development as we do our own sourcemaps
})
.on('end', function () {
console.log('build-js completed');
})
.on('error', function () {
console.warn('build-js errored');
});
});

gulp.task('build-minify-js', ['build-js'], function() {
return new Promise(function(resolve, reject) {
var app = normalizeName(packageJson.name, { version: false });
return gulp.src(buildFolder + mainJsFile)
.pipe(extractSourceMap({ saveTo: buildFolder + mainJsSourceMapFile }))
.pipe(minify({ sourceMapIn: buildFolder + mainJsSourceMapFile, sourceMapOut: '/' + app + '/' + mainJsSourceMapFile }))
.pipe(gulp.dest(buildFolder))
.on('end', function() {
console.log('build-minify-js completed');
resolve();
})
.on('error', function () {
console.log('build-minify-js errored');
reject();
});
});
var app = normalizeName(packageJson.name, { version: false });
return gulp.src(buildFolder + mainJsFile)
.pipe(extractSourceMap({ saveTo: buildFolder + mainJsSourceMapFile }))
.pipe(minify({ sourceMapIn: buildFolder + mainJsSourceMapFile, sourceMapOut: '/' + app + '/' + mainJsSourceMapFile }))
.pipe(gulp.dest(buildFolder))
.on('end', function () {
console.log('build-minify-js completed');
})
.on('error', function () {
console.log('build-minify-js errored');
});
});

module.exports = function(opts) {
Expand Down

0 comments on commit 4b9bd23

Please sign in to comment.