Skip to content

Instantly share code, notes, and snippets.

@apfelbox
Created March 19, 2014 18:22
Show Gist options
  • Save apfelbox/9648006 to your computer and use it in GitHub Desktop.
Save apfelbox/9648006 to your computer and use it in GitHub Desktop.
Example code for `grunt-browserify` issue.
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-browserify");
grunt.initConfig({
browserify: {
app: {
options: {
transform: ['browserify-shim']
},
files: {
'out.js': ['in.js']
}
}
}
});
grunt.registerTask("default", ["browserify"]);
};
var $ = require("jquery");
{
"browserify-shim": {
"jquery": "global:$"
},
"devDependencies": {
"grunt": "~0.4.1",
"browserify-shim": "~3.2.0",
"grunt-browserify": "~1.3.1"
}
}
@apfelbox
Copy link
Author

The issue still exists with 2.0.1.

package.json I tried it with:

{
    "browserify-shim": {
        "jquery": "global:$"
    },
    "devDependencies": {
        "grunt": "~0.4.1",
        "browserify-shim": "~3.2.0",
        "grunt-browserify": "~2.0.0"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment