Last active
August 29, 2015 13:58
-
-
Save chandu/10430351 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 $ = require('jquery'); |
This file contains hidden or 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 browserify = require('browserify'); | |
| var shim = require('browserify-shim'); | |
| var gulp = require('gulp'); | |
| var source = require('vinyl-source-stream'); | |
| var createCommonBundle = function() { | |
| var inst = browserify(); | |
| inst .add(require.resolve('./js/common.js')) | |
| .bundle() | |
| .pipe(source('common.js')) | |
| .pipe(gulp.dest('../public/js/')); | |
| }; | |
| gulp.task('default', function() { | |
| gulp.src('./components/modernizr/modernizr.js') | |
| .pipe(gulp.dest('../public/js/')); | |
| createCommonBundle(); | |
| }); |
This file contains hidden or 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
| "browserify": { | |
| "transform": [ "browserify-shim" ] | |
| }, | |
| "browser": { | |
| "jquery" : "./components/jquery/jquery.js", | |
| "bootstrap" : "./components/bootstrap/dist/js/bootstrap.js" | |
| }, | |
| "browserify-shim": { | |
| "jquery" : { | |
| "exports" : "$" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment