Browse Source

Merge branch 'master' into fail-exports-all-dup

semi-dynamic-namespace-imports
Rich Harris 9 years ago
parent
commit
ad7e093434
  1. 1
      browser/promise.js
  2. 2
      package.json
  3. 1
      rollup.config.browser.js
  4. 2
      rollup.config.js
  5. 10
      test/sourcemaps/loaders/_config.js

1
browser/promise.js

@ -1 +0,0 @@
export default window.Promise;

2
package.json

@ -54,7 +54,7 @@
"mocha": "^2.5.3",
"remap-istanbul": "^0.6.4",
"require-relative": "^0.8.7",
"rollup": "^0.31.2",
"rollup": "^0.32.0",
"rollup-plugin-buble": "^0.11.0",
"rollup-plugin-commonjs": "^3.0.0",
"rollup-plugin-json": "^2.0.0",

1
rollup.config.browser.js

@ -4,7 +4,6 @@ import config from './rollup.config.js';
config.plugins.push({
load: function ( id ) {
if ( ~id.indexOf( 'fs.js' ) ) return readFileSync( 'browser/fs.js' ).toString();
if ( ~id.indexOf( 'es6-promise' ) ) return readFileSync( 'browser/promise.js' ).toString();
}
});

2
rollup.config.js

@ -42,6 +42,6 @@ export default {
moduleName: 'rollup',
targets: [
{ dest: 'dist/rollup.js', format: 'cjs' },
{ dest: 'dist/rollup.es.js', format: 'es6' }
{ dest: 'dist/rollup.es.js', format: 'es' }
]
};

10
test/sourcemaps/loaders/_config.js

@ -1,4 +1,4 @@
var babel = require( 'babel-core' );
var buble = require( 'buble' );
var fs = require( 'fs' );
var assert = require( 'assert' );
var getLocation = require( '../../utils/getLocation' );
@ -16,10 +16,12 @@ module.exports = {
id = id.replace( /bar.js$/, 'foo.js' );
}
var out = babel.transformFileSync( id, {
blacklist: [ 'es6.modules' ],
var code = fs.readFileSync( id, 'utf-8' );
var out = buble.transform( code, {
transforms: { modules: false },
sourceMap: true,
comments: false // misalign the columns
source: id
});
if ( /main.js$/.test( id ) ) {

Loading…
Cancel
Save