Skip to content

Commit

Permalink
stop storybook build creating .d.ts files in src
Browse files Browse the repository at this point in the history
  • Loading branch information
South-Paw committed Jan 4, 2020
1 parent dde0fda commit cff2f50
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
.cache
coverage
dist
storybook-static
17 changes: 16 additions & 1 deletion .storybook/presets.js
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
module.exports = ['@storybook/preset-typescript'];
const path = require('path');

module.exports = [
{
name: '@storybook/preset-typescript',
options: {
tsLoaderOptions: {
configFile: path.resolve(__dirname, './tsconfig.json'),
},
tsDocgenLoaderOptions: {
tsconfigPath: path.resolve(__dirname, './tsconfig.json'),
},
include: [path.resolve(__dirname, '../src')],
},
},
];
6 changes: 6 additions & 0 deletions .storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"declaration": false,
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ If you manage to find any, please report them [here](https://github.com/South-Pa

Pull the repo and then install dependencies with `yarn`.

In the root directory, use `yarn storybook:start` to run Storybook on `localhost:9000`
In the root directory, use `yarn start:storybook` to run Storybook on `localhost:9000`

See `the package.json` for other scripts such as `clean`, `test` and `lint`.

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"url": "https://github.com/South-Paw/spicy-ui.git"
},
"scripts": {
"clean": "rimraf dist",
"clean": "rimraf dist storybook-static",
"start": "tsdx watch",
"start:storybook": "start-storybook -p 9000",
"build": "tsdx build",
"build:storybook": "build-storybook",
"lint": "tsdx lint",
"test": "tsdx test --passWithNoTests",
"prepare": "tsdx build",
"storybook:start": "start-storybook -p 9000",
"storybook:build": "build-storybook"
"prepare": "tsdx build"
},
"dependencies": {
"@styled-system/core": "^5.1.2",
Expand Down

0 comments on commit cff2f50

Please sign in to comment.