Skip to content

Commit d305a52

Browse files
committed
Add a compiled but not minified version of the library to the dist folder
1 parent a2726ed commit d305a52

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

Diff for: gulp/build.js

+27-6
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ gulp.task('compile:component', ['clean:component'], function(cb) {
119119
runSequence(['scripts', 'styles', 'partials'], cb);
120120
});
121121

122-
gulp.task('build:component', ['compile:component'], function() {
122+
gulp.task('build.component.minified', ['compile:component'], function () {
123123
var jsFilter = $.filter('**/*.js', { restore: true });
124124
var cssFilter = $.filter('**/*.css', { restore: true });
125125

@@ -129,14 +129,35 @@ gulp.task('build:component', ['compile:component'], function() {
129129
path.join(conf.paths.tmp, 'partials/templateCacheHtml.js')
130130
])
131131
.pipe(jsFilter)
132-
.pipe(concat({ path: 'angularjs-dropdown-multiselect.min.js'}))
133-
.pipe($.sourcemaps.init())
134-
.pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify'))
135-
.pipe($.sourcemaps.write('maps'))
132+
.pipe(concat({ path: 'angularjs-dropdown-multiselect.min.js' }))
133+
.pipe($.sourcemaps.init())
134+
.pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify'))
135+
.pipe($.sourcemaps.write('maps'))
136136
.pipe(jsFilter.restore)
137137
.pipe(cssFilter)
138138
.pipe($.cssnano())
139139
.pipe(cssFilter.restore)
140140
.pipe(gulp.dest(path.join(conf.paths.dist, '/')))
141-
.pipe($.size({ title: path.join(conf.paths.dist, '/'), showFiles: true }));
141+
.pipe($.size({ title: path.join(conf.paths.dist, '/'), showFiles: true }));
142+
});
143+
144+
gulp.task('build.component', ['compile:component'], function () {
145+
var jsFilter = $.filter('**/*.js', { restore: true });
146+
var cssFilter = $.filter('**/*.css', { restore: true });
147+
148+
return gulp.src([
149+
path.join(conf.paths.tmp, 'serve/app/index.css'),
150+
path.join(conf.paths.tmp, 'serve/app/index.module.js'),
151+
path.join(conf.paths.tmp, 'partials/templateCacheHtml.js')
152+
])
153+
.pipe(jsFilter)
154+
.pipe(concat({ path: 'angularjs-dropdown-multiselect.js' }))
155+
.pipe(jsFilter.restore)
156+
.pipe(cssFilter)
157+
.pipe($.cssnano())
158+
.pipe(cssFilter.restore)
159+
.pipe(gulp.dest(path.join(conf.paths.dist, '/src')))
160+
.pipe($.size({ title: path.join(conf.paths.dist, '/'), showFiles: true }));
142161
});
162+
163+
gulp.task('build:component', ['build.component.minified', 'build.component']);

0 commit comments

Comments
 (0)