Browse Source

use jsnext:main field for magic-string

contingency-plan
Rich Harris 9 years ago
parent
commit
a1978df84a
  1. 6
      gobblefile.js
  2. 4
      package.json

6
gobblefile.js

@ -8,12 +8,10 @@ var node = src
entry: 'rollup.js', entry: 'rollup.js',
dest: 'rollup.js', dest: 'rollup.js',
format: 'cjs', format: 'cjs',
external: [ 'sander', 'path', 'acorn', 'magic-string' ] external: [ 'sander', 'acorn' ]
}) })
.transform( 'babel' ); .transform( 'babel' );
var absolutePath = /^(?:\/|(?:[A-Za-z]:)?\\)/;
var browserPlaceholders = { var browserPlaceholders = {
sander: fs.readFileSync( 'browser/sander.js' ).toString() sander: fs.readFileSync( 'browser/sander.js' ).toString()
}; };
@ -27,7 +25,7 @@ var browser = src
if ( ~id.indexOf( 'sander.js' ) ) return browserPlaceholders.sander; if ( ~id.indexOf( 'sander.js' ) ) return browserPlaceholders.sander;
return fs.readFileSync( id ).toString(); return fs.readFileSync( id ).toString();
}, },
external: [ 'acorn', 'magic-string' ] external: [ 'acorn' ]
}) })
.transform( 'browserify', { .transform( 'browserify', {
entries: [ './rollup.browser' ], entries: [ './rollup.browser' ],

4
package.json

@ -40,7 +40,7 @@
"gobble-browserify": "^0.6.1", "gobble-browserify": "^0.6.1",
"gobble-cli": "^0.4.2", "gobble-cli": "^0.4.2",
"gobble-esperanto-bundle": "^0.2.0", "gobble-esperanto-bundle": "^0.2.0",
"gobble-rollup": "^0.6.0", "gobble-rollup": "^0.7.0",
"gobble-rollup-babel": "^0.1.0", "gobble-rollup-babel": "^0.1.0",
"mocha": "^2.2.4", "mocha": "^2.2.4",
"source-map": "^0.1.40" "source-map": "^0.1.40"
@ -48,7 +48,7 @@
"dependencies": { "dependencies": {
"acorn": "^1.1.0", "acorn": "^1.1.0",
"chalk": "^1.0.0", "chalk": "^1.0.0",
"magic-string": "^0.6.4", "magic-string": "^0.6.5",
"minimist": "^1.1.1", "minimist": "^1.1.1",
"sander": "^0.3.3", "sander": "^0.3.3",
"source-map-support": "^0.3.1" "source-map-support": "^0.3.1"

Loading…
Cancel
Save