Skip to content

Commit

Permalink
Test netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardo-forina committed Oct 9, 2019
1 parent 0782b00 commit 550b1d2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ coverage
.rts2_cache_esm
.rts2_cache_umd
dist
storybook-static
storybook-static
# Local Netlify folder
.netlify
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"react-app-polyfill": "^1.0.4"
},
"alias": {
"use-patternfly": "../.",
"react": "../node_modules/react",
"react-dom": "../node_modules/react-dom/profiling",
"react-router": "../node_modules/react-router",
Expand Down
21 changes: 21 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# example netlify.toml
[build]
command = "yarn run build-netlify"
functions = "functions"
publish = "example/dist"

## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
[[redirects]]
from = "/*"
to = "/index.html"
status = 200

## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection
#[dev]
# command = "yarn start" # Command to start your dev server
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file

## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"test-with-coverage": "tsdx test --coverage --coverageReporters=text-lcov | coveralls",
"lint": "tsdx lint",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"build-netlify": "yarn run build && cd example && yarn && yarn run build --no-minify"
},
"peerDependencies": {
"@patternfly/react-core": "^3.77.2",
Expand Down

0 comments on commit 550b1d2

Please sign in to comment.