pull tldjs from npm and browserify it with gulp tasks.

This commit is contained in:
Kyle Spearrin 2016-10-18 00:08:59 -04:00
parent 56bd98fa43
commit 53af5e234b
4 changed files with 17 additions and 17 deletions

View File

@ -6,7 +6,9 @@
preprocess = require('gulp-preprocess'),
runSequence = require('run-sequence'),
jshint = require('gulp-jshint'),
merge = require('merge-stream');
merge = require('merge-stream'),
browserify = require('browserify'),
source = require('vinyl-source-stream');
var paths = {};
paths.dist = './dist/';
@ -25,7 +27,7 @@ gulp.task('lint', function () {
gulp.task('build', function (cb) {
return runSequence(
'clean',
['lib', 'less', 'lint'],
['browserify', 'lib', 'less', 'lint'],
cb);
});
@ -123,6 +125,14 @@ gulp.task('lib', ['clean:lib'], function () {
return merge(tasks);
});
gulp.task('browserify', function () {
return browserify(paths.npmDir + 'tldjs/index.js', { standalone: 'tldjs' })
.bundle()
.pipe(source('tld.js'))
.pipe(gulp.dest(paths.libDir + 'tldjs'));
});
gulp.task('less', function () {
return gulp.src(paths.lessDir + 'popup.less')
.pipe(less())

View File

@ -28,6 +28,9 @@
"sweetalert": "1.1.3",
"angular-sweetalert": "1.1.1",
"angulartics": "1.2.1",
"angulartics-google-analytics": "0.2.1"
"angulartics-google-analytics": "0.2.1",
"tldjs": "1.7.0",
"browserify": "13.1.0",
"vinyl-source-stream": "1.1.0"
}
}

View File

@ -26,7 +26,7 @@
"lib/sjcl/cbc.js",
"lib/sjcl/bitArray.js",
"lib/q/q.js",
"scripts/tld.js",
"lib/tldjs/tld.js",
"models/api/requestModels.js",
"models/api/responseModels.js",
"models/dataModels.js",

File diff suppressed because one or more lines are too long