Skip to content

Commit

Permalink
#1: optimize package bundling process
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Y. Li committed Apr 18, 2019
1 parent 3a2afb6 commit 3f15e6d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 38 deletions.
2 changes: 1 addition & 1 deletion addons/addon-contexts/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"@babel/typescript",
"@babel/react"
],
"plugins": ["@babel/proposal-class-properties", "@babel/proposal-object-rest-spread"]
"comments": false
}
2 changes: 1 addition & 1 deletion addons/addon-contexts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
lib
dist
10 changes: 5 additions & 5 deletions addons/addon-contexts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
"prettier": "prettier --config .prettierrc --write '**/*.{ts,tsx}'",
"type:check": "tsc --isolatedModules --noEmit ",
"type:watch": "yarn type:check --watch",
"type:emit": "rm -rf dist && tsc --declaration --emitDeclarationOnly",
"type:emit": "rm -rf dist && tsc --declaration --removeComments --emitDeclarationOnly",
"test": "jest --passWithNoTests",
"build": "babel src --out-dir dist --extensions \".ts,.tsx\" --ignore src/@types",
"prepare": "yarn test && yarn type:emit && yarn build"
},
"dependencies": {
"@storybook/addons": "^5.0.0",
"@storybook/components": "^5.0.0"
},
"devDependencies": {
"@babel/cli": "7.2.3",
"@babel/core": "7.4.0",
"@babel/plugin-proposal-class-properties": "7.4.0",
"@babel/plugin-proposal-object-rest-spread": "7.4.0",
"@babel/preset-env": "7.4.2",
"@babel/preset-react": "7.0.0",
"@babel/preset-typescript": "7.3.3",
"@storybook/addons": "5.0.5",
"@storybook/components": "5.0.5",
"@types/jest": "24.0.11",
"@types/react": "16.8.10",
"jest": "24.5.0",
Expand Down
2 changes: 1 addition & 1 deletion addons/addon-contexts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"allowSyntheticDefaultImports": true
},
"include": ["src"],
"exclude": ["node_modules", "scripts", "jest", "lib", "src-js"]
"exclude": ["src/register.ts"]
}
40 changes: 10 additions & 30 deletions addons/addon-contexts/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,6 @@
"@babel/traverse" "^7.4.0"
"@babel/types" "^7.4.0"

"@babel/helper-create-class-features-plugin@^7.4.0":
version "7.4.0"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.0.tgz#30fd090e059d021995c1762a5b76798fa0b51d82"
integrity sha512-2K8NohdOT7P6Vyp23QH4w2IleP8yG3UJsbRKwA4YP6H8fErcLkFuuEEqbF2/BYBKSNci/FWJiqm6R3VhM/QHgw==
dependencies:
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-member-expression-to-functions" "^7.0.0"
"@babel/helper-optimise-call-expression" "^7.0.0"
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/helper-replace-supers" "^7.4.0"
"@babel/helper-split-export-declaration" "^7.4.0"

"@babel/helper-define-map@^7.4.0":
version "7.4.0"
resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.0.tgz#cbfd8c1b2f12708e262c26f600cd16ed6a3bc6c9"
Expand Down Expand Up @@ -264,14 +252,6 @@
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-syntax-async-generators" "^7.2.0"

"@babel/[email protected]":
version "7.4.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.0.tgz#d70db61a2f1fd79de927eea91f6411c964e084b8"
integrity sha512-t2ECPNOXsIeK1JxJNKmgbzQtoG27KIlVE61vTqX0DKR9E9sZlVVxWUtEW9D5FlZ8b8j7SBNCHY47GgPKCKlpPg==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.4.0"
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-proposal-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317"
Expand Down Expand Up @@ -981,7 +961,7 @@
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz#8013f2af54a2b7d735f71560ff360d3a8176a87b"
integrity sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q==

"@storybook/[email protected]", "@storybook/addons@^5.0.5":
"@storybook/[email protected]", "@storybook/addons@^5.0.0":
version "5.0.5"
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-5.0.5.tgz#5f979a5575c58b8a2dcb78c01795aa8321826e2b"
integrity sha512-AsEdBCN8R03lwXUT4HjPn4yEER/oGGfbjza0ZLhUJ9JO3dcOuHk69a7ENOsM3BoJANRJuSxbfPwTNPe44Q8Vaw==
Expand All @@ -1006,7 +986,7 @@
dependencies:
core-js "^2.6.5"

"@storybook/components@^5.0.5":
"@storybook/components@^5.0.0":
version "5.0.5"
resolved "https://registry.yarnpkg.com/@storybook/components/-/components-5.0.5.tgz#4e00d7da857c0e6f424ed514ef3eb25e3ce9acb2"
integrity sha512-/zFLWF67r/jkT824jTVb2l15y6CYTxnCcW4vS2RPJAURGjC8szyfHHly8ydtcmgdgiGeGDBxUe8ltsMYV5Q0hw==
Expand Down Expand Up @@ -3603,9 +3583,9 @@ map-visit@^1.0.0:
object-visit "^1.0.0"

mem@^4.0.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-4.2.0.tgz#5ee057680ed9cb8dad8a78d820f9a8897a102025"
integrity sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==
version "4.3.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178"
integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==
dependencies:
map-age-cleaner "^0.1.1"
mimic-fn "^2.0.0"
Expand Down Expand Up @@ -3657,9 +3637,9 @@ mime-types@^2.1.12, mime-types@~2.1.19:
mime-db "~1.38.0"

mimic-fn@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.0.0.tgz#0913ff0b121db44ef5848242c38bbb35d44cabde"
integrity sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==
version "2.1.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==

min-document@^2.19.0:
version "2.19.0"
Expand Down Expand Up @@ -4295,7 +4275,7 @@ react-clientside-effect@^1.2.0:
"@babel/runtime" "^7.0.0"
shallowequal "^1.1.0"

react-dom@^16.8.1, react-dom@^16.8.6:
[email protected].6, react-dom@^16.8.1:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
Expand Down Expand Up @@ -4396,7 +4376,7 @@ react-textarea-autosize@^7.0.4:
"@babel/runtime" "^7.1.2"
prop-types "^15.6.0"

react@^16.8.1, react@^16.8.6:
[email protected].6, react@^16.8.1:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==
Expand Down

0 comments on commit 3f15e6d

Please sign in to comment.