Skip to content

Instantly share code, notes, and snippets.

@TylerK
Created January 11, 2015 00:47
Show Gist options
  • Save TylerK/9fbc38d06fb50fe854fa to your computer and use it in GitHub Desktop.
Save TylerK/9fbc38d06fb50fe854fa to your computer and use it in GitHub Desktop.
//
// Current way to write Gulp and Webpack, totally wtf:
//
gulp.task('package:stylus', function() {
return gulp.src(config.bundle.stylus.src)
.pipe(webpack({
watch: true,
module: {
loaders: [
{ test: /\.css$/, loader: 'css-loader!stylus-loader?paths=node_modules/stylus-loader/' },
],
resolve: {
extensions: ['.styl']
}
},
stylus: {
use: [stylus_plugin()]
}
}))
.pipe(gulp.dest('dist/'));
});
//
// How I feel this could be improved:
//
gulp.task('package:stylus', function() {
return gulp.src(config.bundle.stylus.src)
.webpack({
watch: true,
filetypes: ['.styl'],
transforms: [stylus(), nib()]
})
.pipe(gulp.dest(config.bundles.stylus.dest));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment