Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
feat: add subpackage scripts to parent package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
strothj committed Mar 11, 2018
1 parent ec4ab50 commit c11658b
Show file tree
Hide file tree
Showing 39 changed files with 906 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,5 @@ node_modules/
.rpt2_cache/
dist/
*error.log
lerna-debug.log
storybook-static/
10 changes: 10 additions & 0 deletions LICENSE.md
@@ -0,0 +1,10 @@
The MIT License

Further resources on the MIT License
Copyright 2018 Jason Strothmann <jason@jasons.io>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 6 additions & 0 deletions lerna.json
@@ -0,0 +1,6 @@
{
"lerna": "2.9.0",
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
21 changes: 13 additions & 8 deletions package.json
@@ -1,26 +1,31 @@
{
"private": true,
"workspaces": {
"packages": [
"packages/*"
]
},
"workspaces": ["packages/*"],
"engines": {
"node": ">= 8.9",
"yarn": ">= 1.3.2"
"yarn": ">= 1.5.1"
},
"precommit": [
"lint"
"lint",
"test",
"clean",
"build"
],
"scripts": {
"lint": "tslint -p ./"
"build": "lerna run build",
"clean": "lerna run clean",
"test": "lerna run test",
"lint": "tslint -p ./",
"storybook": "lerna run --parallel storybook",
"build-storybook": "lerna run --parallel build-storybook"
},
"devDependencies": {
"@types/jest": "^22.2.0",
"@types/memory-fs": "^0.3.0",
"@types/node": "^9.4.7",
"@types/react": "^16.0.40",
"@types/webpack": "^4.1.0",
"lerna": "^2.9.0",
"pre-commit": "^1.2.2",
"prettier": "^1.11.1",
"tslint": "^5.9.1",
Expand Down
Expand Up @@ -7,12 +7,10 @@ module.exports = (baseConfig, env) => {
config.module.rules.push({
test: /\.tsx?$/,
include: path.resolve(__dirname, "../src"),
// use: [
// require.resolve("ts-loader"),
// require.resolve("react-docgen-typescript-loader"),
// ],
use: [require.resolve("ts-loader"), path.resolve(__dirname, "../../dist")],
// use: [require.resolve("ts-loader")],
use: [
require.resolve("ts-loader"),
require.resolve("react-docgen-typescript-loader"),
],
});

config.resolve.extensions.push(".ts", ".tsx");
Expand Down
10 changes: 10 additions & 0 deletions packages/react-docgen-typescript-loader-example/LICENSE.md
@@ -0,0 +1,10 @@
The MIT License

Further resources on the MIT License
Copyright 2018 Jason Strothmann <jason@jasons.io>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,6 +1,6 @@
{
"private": true,
"name": "example",
"name": "react-docgen-typescript-loader-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
Expand All @@ -17,11 +17,14 @@
"@types/storybook__addon-info": "^3.2.1",
"@types/storybook__react": "^3.0.6",
"babel-core": "^6.26.0",
"react-docgen-typescript-loader": "^2.0.2",
"rimraf": "^2.6.2",
"ts-loader": "^3.5.0",
"typescript": "^2.7.1"
},
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"clean": "rimraf storybook-static"
}
}
Expand Up @@ -20,9 +20,9 @@
"dist/*"
],
"scripts": {
"build": "tsc -p ./",
"build": "tsc -p ./tsconfig.build.json",
"clean": "rimraf dist",
"start": "tsc -p ./ -w",
"start": "tsc -p ./tsconfig.build.json -w",
"test": "jest"
},
"devDependencies": {
Expand Down
@@ -1,7 +1,7 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./",
"rootDir": "./src",
"outDir": "./dist",
"declaration": true
},
Expand Down
3 changes: 3 additions & 0 deletions packages/react-docgen-typescript-loader/tsconfig.json
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.json"
}

0 comments on commit c11658b

Please sign in to comment.