Skip to content

Commit 11dd14f

Browse files
committed
docs: Adding scripts and configuration to deploy Storybook on Now.sh
1 parent d564f78 commit 11dd14f

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
coverage/
22
dist/
33
node_modules/
4+
storybook-static/
45
package-lock.json
56
yarn.lock
67
*.log

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const AppWithRange = ({ onDateChange }) => (
5757
);
5858
```
5959

60+
More examples [here](https://react-semantic-ui-datepickers.now.sh).
61+
6062
## Supported Props
6163

6264
### Own Props

now.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"alias": "react-semantic-ui-datepickers",
3+
"name": "react-semantic-ui-datepickers"
4+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
"scripts": {
77
"add-contributor": "kcd-scripts contributors add",
88
"build": "kcd-scripts build --bundle cjs.minify",
9+
"deploy": "now --public ./storybook-static -A ../now.json && now alias",
910
"lint": "kcd-scripts lint",
1011
"precommit": "kcd-scripts precommit",
12+
"predeploy": "npm run storybook:build",
1113
"semantic-release": "semantic-release",
12-
"storybook": "start-storybook -p 9001 -c .storybook",
14+
"storybook": "start-storybook -p 9001 -c stories",
15+
"storybook:build": "build-storybook -c stories",
16+
"storybook:serve": "serve ./storybook-static -p 6006",
1317
"test": "kcd-scripts test",
1418
"travis-deploy-once": "travis-deploy-once",
1519
"validate": "kcd-scripts validate"
@@ -44,6 +48,7 @@
4448
"semantic-release": "^15.8.1",
4549
"semantic-ui-css": "^2.3.1",
4650
"semantic-ui-react": "^0.79.1",
51+
"serve": "^9.4.0",
4752
"travis-deploy-once": "^5.0.1"
4853
},
4954
"peerDependencies": {

.storybook/config.js renamed to stories/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { configure } from '@storybook/react';
22

33
function loadStories() {
4-
require('../stories/index.js');
4+
require('./index.js');
55
// You can require as many stories as you need.
66
}
77

0 commit comments

Comments
 (0)