-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): add command to deploy demo website + storybook
- Loading branch information
Raphaël Benitte
authored and
Raphaël Benitte
committed
Dec 5, 2017
1 parent
eaff4d8
commit e2f5c58
Showing
18 changed files
with
73 additions
and
121 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 |
---|---|---|
@@ -1,70 +1,3 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"transform-es2015-template-literals", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
"transform-es2015-literals", | ||
"transform-es2015-function-name", | ||
"transform-es2015-arrow-functions", | ||
"transform-es2015-block-scoped-functions", | ||
"transform-class-properties", | ||
[ | ||
"transform-es2015-classes", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
"transform-es2015-object-super", | ||
"transform-es2015-shorthand-properties", | ||
[ | ||
"transform-es2015-computed-properties", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
"check-es2015-constants", | ||
[ | ||
"transform-es2015-spread", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
"transform-es2015-parameters", | ||
[ | ||
"transform-es2015-destructuring", | ||
{ | ||
"loose": true | ||
} | ||
], | ||
"transform-es2015-block-scoping", | ||
"transform-object-rest-spread", | ||
"transform-react-jsx", | ||
"syntax-jsx", | ||
"lodash" | ||
], | ||
"env": { | ||
"commonjs": { | ||
"plugins": [ | ||
[ | ||
"transform-es2015-modules-commonjs", | ||
{ | ||
"loose": true | ||
} | ||
] | ||
] | ||
}, | ||
"test": { | ||
"plugins": [ | ||
[ | ||
"transform-es2015-modules-commonjs", | ||
{ | ||
"loose": true | ||
} | ||
] | ||
] | ||
} | ||
} | ||
"presets": ["@nivo/babel-preset"] | ||
} |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
SOURCES = packages | ||
|
||
.PHONY: help init build-all clean-all | ||
.PHONY: help init build-all clean-all demo demo-build demo-deploy storybook storybook-build storybook-deploy deploy-all | ||
|
||
######################################################################################################################## | ||
# | ||
|
@@ -41,7 +41,12 @@ init: ##@init cleanup/install/bootstrap | |
./node_modules/.bin/lerna bootstrap | ||
make build-all | ||
|
||
deploy-all: ##@deploy deploy demo website & storybook | ||
@make demo-deploy | ||
@make storybook-deploy | ||
|
||
build-all: ##@build build all packages | ||
@echo "${YELLOW}Building all packages${RESET}" | ||
$(foreach source, $(SOURCES), $(call clean-source-lib, $(source))) | ||
./node_modules/.bin/lerna run --ignore nivo-demo --ignore nivo-example-retro build | ||
|
||
|
@@ -67,3 +72,42 @@ define clean-source-all | |
rm -rf $(1)/*/node_modules | ||
rm -rf $(1)/*/package-lock.json | ||
endef | ||
|
||
######################################################################################################################## | ||
# | ||
# DEMO | ||
# | ||
######################################################################################################################## | ||
|
||
demo: ##@demo start demo in dev mode | ||
@echo "${YELLOW}Starting demo${RESET}" | ||
@cd demo && yarn start | ||
|
||
demo-build: ##@demo build demo | ||
@echo "${YELLOW}Building demo${RESET}" | ||
@cd demo && yarn build | ||
|
||
demo-deploy: ##@demo build & deploy demo | ||
@make demo-build | ||
|
||
@echo "${YELLOW}Deploying demo${RESET}" | ||
@./node_modules/.bin/gh-pages -d demo/build -r [email protected]:plouc/nivo.git -b gh-pages | ||
|
||
######################################################################################################################## | ||
# | ||
# STORYBOOK | ||
# | ||
######################################################################################################################## | ||
|
||
storybook: ##@storybook start storybook in dev mode on port 6006 | ||
@./node_modules/.bin/start-storybook -p 6006 | ||
|
||
storybook-build: ##@storybook build storybook | ||
@echo "${YELLOW}Building storybook${RESET}" | ||
@./node_modules/.bin/build-storybook | ||
|
||
storybook-deploy: ##@storybook build and deploy storybook | ||
@make storybook-build | ||
|
||
@echo "${YELLOW}Deploying storybook${RESET}" | ||
@./node_modules/.bin/gh-pages -d storybook-static -r [email protected]:plouc/nivo.git -b gh-pages -e 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 |
---|---|---|
|
@@ -5,8 +5,6 @@ | |
"description": "nivo demo", | ||
"author": "Raphaël Benitte <[email protected]>", | ||
"devDependencies": { | ||
"gh-pages": "^1.0.0", | ||
"prettier": "^1.7.4", | ||
"react-scripts": "1.0.14", | ||
"source-map-explorer": "^1.5.0" | ||
}, | ||
|
@@ -51,7 +49,6 @@ | |
"analyze": "source-map-explorer build/static/js/main.*", | ||
"fmt": "prettier --print-width=100 --tab-width=4 --bracket-spacing --no-semi --trailing-comma es5 --single-quote --write 'src/**/*.js' 'src/**/*.css'", | ||
"fmt:check": "prettier --print-width=100 --tab-width=4 --bracket-spacing --no-semi --trailing-comma es5 --single-quote --list-different 'src/**/*.js' 'src/**/*.css'", | ||
"demo:publish": "npm run build && gh-pages -d build -r [email protected]:plouc/nivo.git -b gh-pages", | ||
"sprites": "glue --img src/assets --css src/styles src/assets/icons" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -18,13 +18,14 @@ | |
"keywords": [], | ||
"dependencies": { | ||
"@ekino/config": "^0.3.0", | ||
"@storybook/addon-info": "^3.2.17", | ||
"@nivo/babel-preset": "^0.32.0-9", | ||
"lodash": "^4.17.4", | ||
"prop-types": "^15.5.10", | ||
"puppeteer": "^0.13.0", | ||
"react-motion": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"@storybook/addon-info": "^3.2.17", | ||
"@storybook/addon-knobs": "^3.2.17", | ||
"@storybook/react": "^3.2.17", | ||
"clog-cli": "^1.0.0", | ||
|
@@ -53,11 +54,7 @@ | |
"test:unit:cover": "jest --verbose --coverage ./test", | ||
"fmt": "prettier --print-width=100 --tab-width=4 --bracket-spacing --no-semi --trailing-comma es5 --single-quote --color --write \"{src,specs,test,.storybook,stories}/**/*.js\"", | ||
"fmt:check": "prettier --print-width=100 --tab-width=4 --bracket-spacing --no-semi --trailing-comma es5 --single-quote --list-different \"{src,specs,test,.storybook,stories}/**/*.js\"", | ||
"version": "echo ${npm_package_version}", | ||
"disabledPrepublishOnly": "npm test && npm run build", | ||
"storybook": "start-storybook -p 6006", | ||
"storybook:build": "build-storybook", | ||
"storybook:publish": "npm run storybook:build && gh-pages -d storybook-static -r [email protected]:plouc/nivo.git -b gh-pages -e storybook", | ||
"changelog": "rm CHANGELOG.md && node scripts/generate-changelog.js" | ||
}, | ||
"lint-staged": { | ||
|
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 was deleted.
Oops, something went wrong.
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
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
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
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
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