Created
January 24, 2017 17:32
-
-
Save fleeting/7353b71c8a93fa8b37a9eeddf7c53f4a to your computer and use it in GitHub Desktop.
Jubilee example for compiling component with css and js.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var globs = { | |
tabs: { | |
path: 'tabs/', | |
css: [ | |
paths.src + 'components/tabs/tabs.css' | |
], | |
js: [ | |
paths.src + 'components/tabs/tabs.js' | |
], | |
js_compiled: 'tabs.compiled.js' | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('tabs', ['tabs_css', 'tabs_js'], function () { | |
return; | |
}); | |
gulp.task('tabs_css', function () { | |
return gulp.src(files.globs.tabs.css) | |
.pipe(postcss(postcss_processors)) | |
.pipe(gulp.dest(files.paths.dist + files.globs.tabs.path)) | |
.pipe(sizereport()); | |
}); | |
gulp.task('tabs_js', function () { | |
return gulp.src(files.globs.tabs.js) | |
.pipe(jshint(files.paths.jshint + files.globs.jshint)) | |
.pipe(jshint.reporter(config.jshint_reporter)) | |
.pipe(sourcemaps.init()) | |
.pipe(babel(config.babel)) | |
.pipe(concat(files.globs.tabs.js_compiled)) | |
.pipe(gulp.dest(files.paths.dist + files.globs.tabs.path)) | |
.pipe(rename({ suffix: ".minified" })) | |
.pipe(uglify(config.uglify)) | |
.pipe(sourcemaps.write('.')) | |
.pipe(gulp.dest(files.paths.dist + files.globs.tabs.path)) | |
.pipe(sizereport()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment