Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
Add rollup compilation with tslib
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Pluckthun committed Dec 18, 2016
1 parent 647c4ac commit a502cd9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"clean": "rm -rf es lib",
"build:es": "tsc -m es2015 --outDir es",
"build:cjs": "tsc -m commonjs --outDir lib",
"build:umd": "rollup -i es/index.js -o dist/hachiko.js -f umd -n Hachiko",
"build:umd": "rollup -c rollup.config.js -o dist/hachiko.js -f umd -n Hachiko",
"build": "npm run build:es && npm run build:cjs && npm run build:umd",
"prepublish": "npm run clean && npm run build",
"preversion": "npm run clean && npm run test",
Expand Down Expand Up @@ -57,7 +57,10 @@
"coveralls": "^2.11.15",
"jest": "^17.0.0",
"rollup": "^0.37.0",
"rollup-plugin-alias": "^1.2.0",
"rollup-plugin-typescript": "^0.8.1",
"ts-jest": "^17.0.3",
"tslib": "^1.2.0",
"tslint": "^3.15.1",
"tslint-config-standard": "^1.5.0",
"typedoc": "^0.5.1",
Expand Down
17 changes: 17 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import typescript from 'typescript'
import rollupAlias from "rollup-plugin-alias"
import rollupTypescript from 'rollup-plugin-typescript'

export default {
entry: './src/index.ts',
plugins: [
rollupAlias({
tslib: "node_modules/tslib/tslib.es6.js",
}),
rollupTypescript({
importHelpers: true,
noEmitHelpers: true,
typescript
})
]
}
47 changes: 42 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,10 @@ align-text@^0.1.1, align-text@^0.1.3:
longest "^1.0.1"
repeat-string "^1.5.2"

amdefine@1.0.0:
amdefine@1.0.0, amdefine@>=0.0.4:
version "1.0.0"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.0.tgz#fd17474700cb5cc9c2b709f0be9d23ce3c198c33"

amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"

ansi-escapes@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
Expand Down Expand Up @@ -487,6 +483,10 @@ commander@^2.9.0:
dependencies:
graceful-readlink ">= 1.0.0"

compare-versions@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-2.0.1.tgz#1edc1f93687fd97a325c59f55e45a07db106aca6"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand Down Expand Up @@ -642,6 +642,10 @@ estraverse@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"

estree-walker@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"

esutils@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375"
Expand Down Expand Up @@ -2155,6 +2159,27 @@ rimraf@^2.2.8, rimraf@^2.4.3, rimraf@^2.4.4:
dependencies:
glob "^7.0.5"

rollup-plugin-alias@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-alias/-/rollup-plugin-alias-1.2.0.tgz#13897948eb43cb4a88d8ba996c2baeacf1b1d6e8"

rollup-plugin-typescript@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript/-/rollup-plugin-typescript-0.8.1.tgz#2ff7eecc21cf6bb2b43fc27e5b688952ce71924a"
dependencies:
compare-versions "2.0.1"
object-assign "^4.0.1"
rollup-pluginutils "^1.3.1"
tippex "^2.1.1"
typescript "^1.8.9"

rollup-pluginutils@^1.3.1:
version "1.5.2"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
dependencies:
estree-walker "^0.2.1"
minimatch "^3.0.2"

rollup@^0.37.0:
version "0.37.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.37.0.tgz#759a51708ac08b027597babff171a026cf712d8d"
Expand Down Expand Up @@ -2350,6 +2375,10 @@ time-stamp@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151"

tippex@^2.1.1:
version "2.3.0"
resolved "https://registry.yarnpkg.com/tippex/-/tippex-2.3.0.tgz#4ff663dbd2e12e90126e078789282a3fa8a9c007"

tmpl@1.0.x:
version "1.0.4"
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
Expand Down Expand Up @@ -2385,6 +2414,10 @@ ts-jest@^17.0.3:
source-map-support "^0.4.4"
yargs "^6.1.1"

tslib@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.2.0.tgz#074fb171034594bdba4c4dbb197c26e4a0b88383"

tslint-config-standard@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/tslint-config-standard/-/tslint-config-standard-1.5.0.tgz#9528f7c2852dce936a927325fb88f89e019e6d70"
Expand Down Expand Up @@ -2454,6 +2487,10 @@ typescript@2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.6.tgz#5385499ac9811508c2c43e0ea07a1ddca435e111"

typescript@^1.8.9:
version "1.8.10"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-1.8.10.tgz#b475d6e0dff0bf50f296e5ca6ef9fbb5c7320f1e"

typescript@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.4.tgz#b53b69fb841126acb1dd4b397d21daba87572251"
Expand Down

0 comments on commit a502cd9

Please sign in to comment.