-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,6 @@ node_modules | |
!.idea/inspectionProfiles/ | ||
.awcache/ | ||
.jest/cache/ | ||
|
||
# Storybook | ||
storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ src | |
.travis.yml | ||
Dockerfile | ||
wallaby.conf.js | ||
storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
export NODE_DEBUG=gh-pages | ||
npm i gh-pages | ||
npm run doc:build | ||
|
||
if [ -z "$TRAVIS_TAG" ]; then | ||
echo "it's not a tag build, publishing branch document" | ||
npm run doc:publish $TRAVIS_BRANCH | ||
export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi) | ||
curl -X POST \ | ||
https://api.github.com/repos/crazyfactory/shop-webapp-components/issues/$TRAVIS_PULL_REQUEST/comments \ | ||
-H "authorization: token $GH_TOKEN" \ | ||
-H 'content-type: application/json' \ | ||
-d "{ | ||
\"body\": \"Hi there, the generated documentation has been made available [gh-pages/$BRANCH](https://crazyfactory.github.io/shop-webapp-components/$BRANCH). Don't forget to delete from [gh-pages/](https://github.com/crazyfactory/shop-webapp-components/tree/gh-pages/) branch once this PR is merged!\" | ||
}" | ||
else | ||
echo "it's a tag, publishing main document" | ||
npm run doc:publish | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const ghpages = require('gh-pages'); | ||
|
||
const args = process.env.npm_config_argv ? JSON.parse(process.env.npm_config_argv).remain : []; | ||
const branch = args.length > 0 ? args[0] : '.'; | ||
|
||
ghpages.publish('storybook', { | ||
dest: branch | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"lint": "eslint \"src/**/**.ts*\"", | ||
"lint:fix": "npm run lint -s -- --fix", | ||
"doc": "start-storybook -p 6060", | ||
"doc:build": "build-storybook -o storybook", | ||
"prepublish": "npm run clean && npm run build" | ||
}, | ||
"author": "Crazy Factory <[email protected]>", | ||
|