-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
728 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ jspm_packages | |
bower_components | ||
.idea | ||
.DS_STORE | ||
.rollupcache | ||
build/reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = require('yargs') | ||
.options('target', { | ||
alias: 't', | ||
description: 'target module dir to copy build results into (eg. "--target ../other-module" to copy build results into "../other-module/node_modules/this-module/dist/…" whenever they change)' | ||
}) | ||
.options('format', { | ||
alias: 'f', | ||
array: true, | ||
description: 'format to compile to (eg. "es2015", "commonjs", …). Can be set muliple times to compile to multiple formats. Default is all formats.' | ||
}) | ||
.argv; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
|
||
const isProduction = process.env.NODE_ENV === 'production'; | ||
|
||
export default [{ | ||
input: 'src/index.ts', | ||
output: { | ||
file: 'dist/es2015/index.js', | ||
format: 'es' | ||
}, | ||
external: 'tslib', | ||
plugins: [ | ||
typescript({ | ||
useTsconfigDeclarationDir: true, | ||
tsconfigOverride: { | ||
compilerOptions: { | ||
target: 'es2015', | ||
declarationDir: 'dist/types', | ||
importHelpers: true | ||
} | ||
}, | ||
cacheRoot: '.rollupcache' | ||
}) | ||
] | ||
}].concat(!isProduction | ||
? [] | ||
: [{ | ||
input: 'src/index.ts', | ||
output: [ | ||
{ file: 'dist/commonjs/index.js', format: 'cjs' }, | ||
{ file: 'dist/amd/index.js', format: 'amd', amd: { id: 'aurelia-router' } }, | ||
{ file: 'dist/native-modules/index.js', format: 'es' } | ||
], | ||
external: 'tslib', | ||
plugins: [ | ||
typescript({ | ||
tsconfigOverride: { | ||
compilerOptions: { | ||
target: 'es5', | ||
declaration: false, | ||
declarationDir: null, | ||
importHelpers: true | ||
} | ||
}, | ||
cacheRoot: '.rollupcache', | ||
}) | ||
] | ||
}] | ||
); |
Oops, something went wrong.