mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
10 changed files with 76 additions and 1 deletions
@ -0,0 +1,6 @@ |
|||
module.exports = { |
|||
description: 'handles external aliased named imports that shadow another name', |
|||
options: { |
|||
external: [ 'acorn' ] |
|||
} |
|||
}; |
@ -0,0 +1,9 @@ |
|||
define(['acorn'], function (acorn) { 'use strict'; |
|||
|
|||
function parse$1(source) { |
|||
return acorn.parse(source, { ecmaVersion: 6 }); |
|||
} |
|||
|
|||
console.log(parse$1('foo')); |
|||
|
|||
}); |
@ -0,0 +1,9 @@ |
|||
'use strict'; |
|||
|
|||
var acorn = require('acorn'); |
|||
|
|||
function parse$1(source) { |
|||
return acorn.parse(source, { ecmaVersion: 6 }); |
|||
} |
|||
|
|||
console.log(parse$1('foo')); |
@ -0,0 +1,7 @@ |
|||
import { parse } from 'acorn'; |
|||
|
|||
function parse$1(source) { |
|||
return parse(source, { ecmaVersion: 6 }); |
|||
} |
|||
|
|||
console.log(parse$1('foo')); |
@ -0,0 +1,10 @@ |
|||
(function (acorn) { |
|||
'use strict'; |
|||
|
|||
function parse$1(source) { |
|||
return acorn.parse(source, { ecmaVersion: 6 }); |
|||
} |
|||
|
|||
console.log(parse$1('foo')); |
|||
|
|||
}(acorn)); |
@ -0,0 +1,13 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('acorn')) : |
|||
typeof define === 'function' && define.amd ? define(['acorn'], factory) : |
|||
(factory(global.acorn)); |
|||
}(this, function (acorn) { 'use strict'; |
|||
|
|||
function parse$1(source) { |
|||
return acorn.parse(source, { ecmaVersion: 6 }); |
|||
} |
|||
|
|||
console.log(parse$1('foo')); |
|||
|
|||
})); |
@ -0,0 +1,3 @@ |
|||
import parse from './parse'; |
|||
|
|||
console.log(parse('foo')); |
@ -0,0 +1,5 @@ |
|||
import { parse as acornParse } from 'acorn'; |
|||
|
|||
export default function parse(source) { |
|||
return acornParse(source, { ecmaVersion: 6 }); |
|||
} |
Loading…
Reference in new issue