diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-11 22:47:58 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-11 22:47:58 +0800 |
commit | 838ca2fd9393e5b3cd4423934de78f1b8f9fd13f (patch) | |
tree | a4dc794d580de2139eb9a5831058778fe88c3c0a /gulpfile.js | |
parent | 84b36a71939cfc6c673f0fd3fec079ca7e23df6c (diff) | |
download | go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar.gz go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar.bz2 go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar.lz go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar.xz go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.tar.zst go-tangerine-838ca2fd9393e5b3cd4423934de78f1b8f9fd13f.zip |
autoprovider, buildQt not builds only necessery files, fixed gulpfile
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/gulpfile.js b/gulpfile.js index 7758a38e0..9e0717d8b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -25,8 +25,8 @@ var build = function(src, dst) { detectGlobals: false, bundleExternal: false }) - .add('./') .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') .transform('envify', { NODE_ENV: 'build' }) @@ -50,6 +50,25 @@ var build = function(src, dst) { .pipe(gulp.dest( DEST )); }; +var buildDev = function(src, dst) { + return browserify({ + debug: true, + insert_global_vars: false, + detectGlobals: false, + bundleExternal: false + }) + .require('./' + src + '.js', {expose: 'web3'}) + .add('./' + src + '.js') + .transform('envify', { + NODE_ENV: 'build' + }) + .transform('unreachable-branch-transform') + .bundle() + .pipe(exorcist(path.join( DEST, dst + '.js.map'))) + .pipe(source(dst + '.js')) + .pipe(gulp.dest( DEST )); +}; + var uglifyFile = function(file) { return gulp.src( DEST + file + '.js') .pipe(uglify()) @@ -79,7 +98,11 @@ gulp.task('build', ['clean'], function () { }); gulp.task('buildQt', ['clean'], function () { - return build('index_qt', 'ethereum_qt'); + return build('index_qt', 'ethereum'); +}); + +gulp.task('buildDev', ['clean'], function () { + return buildDev('index', 'ethereum'); }); gulp.task('uglify', ['build'], function(){ @@ -87,7 +110,7 @@ gulp.task('uglify', ['build'], function(){ }); gulp.task('uglifyQt', ['buildQt'], function () { - return uglifyFile('ethereum_qt'); + return uglifyFile('ethereum'); }); gulp.task('watch', function() { @@ -96,3 +119,5 @@ gulp.task('watch', function() { gulp.task('default', ['bower', 'lint', 'build', 'uglify']); gulp.task('qt', ['bower', 'lint', 'buildQt', 'uglifyQt']); +gulp.task('dev', ['bower', 'lint', 'buildDev']); + |