-
Notifications
You must be signed in to change notification settings - Fork 538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy Node app to Now #226
Conversation
This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push. |
"files": [ | ||
"examples", | ||
"rollup.config.js", | ||
"src" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know why these files needed to be explicitly whitelisted, but Now doesn't seem to want to copy them by default.
"public": "docs", | ||
"rewrites": [ | ||
{"source": "/components/*", "destination": "/index.html"}, | ||
{"source": "/demos/*", "destination": "/index.html"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These redirects make the component and demo subpages work dynamically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAY! Looks great!
<meta name='og:title' content='Primer React'> | ||
<meta name='description' content='Primer components built with React.js.'> | ||
<link rel='icon' href='https://primer.github.io/favicon.png'> | ||
<link rel='stylesheet' href='${basename}/dist/css/build.css'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAY!
This builds on #221 and configures the app to deploy with Node app rather than statically.
TODO
"type": "static"
fromnow.json
build:docs
npm run-script tobuild
so that Now will build docs on deploymentserve
and use it to serve the builtdocs
folderdocs
directory from git, and add it to.gitignore