mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
include 'lite' build.
This commit is contained in:
17
gulpfile.js
17
gulpfile.js
@@ -30,16 +30,15 @@ var banner = fs.readFileSync('banner.txt', 'utf8');
|
||||
|
||||
var pkg;
|
||||
|
||||
function defineBuildTask(name, output, folderName) {
|
||||
function defineBuildTask(name, manifest) {
|
||||
(function() {
|
||||
|
||||
output = output || name;
|
||||
folderName = folderName || name;
|
||||
var manifest = './src/' + folderName + '/build.json';
|
||||
manifest = manifest || './src/' + name + '/build.json';
|
||||
var output = name;
|
||||
var list = readManifest(manifest);
|
||||
gulp.task(name + '-debug', ['version'], function() {
|
||||
return gulp.src(list)
|
||||
.pipe(concat(output + '.debug.js'))
|
||||
.pipe(concat(output + '.js'))
|
||||
.pipe(uglify({
|
||||
mangle: false,
|
||||
compress: false,
|
||||
@@ -55,7 +54,7 @@ function defineBuildTask(name, output, folderName) {
|
||||
|
||||
gulp.task(name, ['version', name + '-debug'], function() {
|
||||
return gulp.src(list)
|
||||
.pipe(concat(output + '.js'))
|
||||
.pipe(concat(output + '.min.js'))
|
||||
.pipe(uglify())
|
||||
.pipe(header(banner, {pkg: pkg}))
|
||||
.pipe(gulp.dest('dist/'))
|
||||
@@ -116,12 +115,14 @@ function readManifest(filename, modules) {
|
||||
return modules;
|
||||
}
|
||||
|
||||
defineBuildTask('WebComponents', 'webcomponents');
|
||||
defineBuildTask('webcomponents', './src/WebComponents/build.json');
|
||||
defineBuildTask('webcomponents-lite', './src/WebComponents/build-lite.json');
|
||||
defineBuildTask('CustomElements');
|
||||
defineBuildTask('HTMLImports');
|
||||
defineBuildTask('ShadowDOM');
|
||||
|
||||
gulp.task('build', ['WebComponents', 'CustomElements', 'HTMLImports', 'ShadowDOM']);
|
||||
gulp.task('build', ['webcomponents', 'webcomponents-lite', 'CustomElements',
|
||||
'HTMLImports', 'ShadowDOM']);
|
||||
|
||||
gulp.task('release', function(cb) {
|
||||
isRelease = true;
|
||||
|
||||
6
src/WebComponents/build-lite.json
Normal file
6
src/WebComponents/build-lite.json
Normal file
@@ -0,0 +1,6 @@
|
||||
[
|
||||
"build/boot.js",
|
||||
"../HTMLImports/build.json",
|
||||
"../CustomElements/build.json",
|
||||
"unresolved.js"
|
||||
]
|
||||
Reference in New Issue
Block a user