mirror of https://github.com/lukechilds/rollup.git
Oskar Segersvärd
10 years ago
3 changed files with 29 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||||
|
var path = require( 'path' ); |
||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'uses custom path resolvers (plural)', |
||||
|
options: { |
||||
|
resolveId: [ |
||||
|
function ( importee ) { |
||||
|
if ( importee[0] === '@' ) |
||||
|
return path.resolve( __dirname, 'globals-' + importee.slice( 1 ).toLowerCase() + '.js' ); |
||||
|
}, |
||||
|
function ( importee ) { |
||||
|
if ( importee[0] === '!' ) return '<empty>'; |
||||
|
} |
||||
|
], |
||||
|
load: function ( id ) { |
||||
|
if ( id === '<empty>' ) return ''; |
||||
|
} |
||||
|
}, |
||||
|
exports: function ( exports ) { |
||||
|
assert.strictEqual( exports.res, 0 ); |
||||
|
} |
||||
|
}; |
@ -0,0 +1,2 @@ |
|||||
|
export var sin = Math.sin; |
||||
|
export var cos = Math.cos; |
@ -0,0 +1,4 @@ |
|||||
|
import { sin } from '@Math'; |
||||
|
import '!path'; |
||||
|
|
||||
|
export var res = sin( 0 ); |
Loading…
Reference in new issue