Skip to content

Commit

Permalink
Fix version not available via CommonJS (fixes #459) ...
Browse files Browse the repository at this point in the history
* package.json now points to dist/raven.js
* dist/raven.js is built with derequire plugin (removes require statements)
* derequire plugin added as dev dep
  • Loading branch information
benvinegar committed Jan 12, 2016
1 parent 29c38b2 commit 52bf88e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = function(grunt) {
var through = require('through2');
var proxyquire = require('proxyquireify');
var versionify = require('browserify-versionify');
var derequire = require('derequire/plugin');

var excludedPlugins = [
'react-native'
Expand Down Expand Up @@ -98,7 +99,14 @@ module.exports = function(grunt) {
},
core: {
src: 'src/singleton.js',
dest: 'build/raven.js'
dest: 'build/raven.js',
options: {
plugin: [ derequire ],
transform: [
[ versionify ],
[ new AddPluginBrowserifyTransformer() ]
]
}
},
plugins: {
files: pluginConcatFiles,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
"type": "git",
"url": "git://github.com/getsentry/raven-js.git"
},
"main": "src/singleton.js",
"main": "dist/raven.js",
"devDependencies": {
"browserify-versionify": "^1.0.6",
"chai": "2.3.0",
"derequire": "2.0.3",
"grunt": "^0.4.5",
"grunt-browserify": "^4.0.1",
"grunt-cli": "^0.1.13",
Expand Down

1 comment on commit 52bf88e

@benvinegar
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.