Skip to content
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

Use Now 2.0 for building and deployment #611

Merged
merged 1 commit into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .nowignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.github
LICENSE
README.md
bin
node_modules
cypress
cypress.json
docs
13 changes: 0 additions & 13 deletions Dockerfile

This file was deleted.

23 changes: 15 additions & 8 deletions now.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
"name": "carbon",
"type": "static",
"version": 2,
"public": true,
"static": {
"rewrites": [
{
"source": "!/?(about)?(embed)",
"destination": "/index.html"
}
]
"builds": [
{ "src": "package.json", "use": "@now/static-build" }
],
"routes": [
{ "src": "^/about(.*)", "dest": "/about" },
{ "src": "^/embed(.*)", "dest": "/embed" },
{ "src": "^/_next/(.*)", "dest": "/_next/$1" },
{ "src": "^/static/(.*)", "dest": "/static/$1" },
{ "src": "^/(.*)", "dest": "/index.html" }
],
"build": {
"env": {
"NODE_ENV": "production"
}
},
"github": {
"autoAlias": false
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
"contrib:add": "all-contributors add",
"contrib:build": "all-contributors generate",
"cy:run": "cypress run",
"cy:open": "cypress open"
"cy:open": "cypress open",
"now-build": "cross-env NODE_ENV=production yarn build && yarn export -o dist"
},
"dependencies": {
"axios": "^0.18.0",
"codemirror": "^5.40.2",
"codemirror-graphql": "0.7.1",
"codemirror-mode-elixir": "^1.1.1",
"cross-env": "^5.2.0",
"dom-to-image": "^2.5.2",
"downshift": "^3.1.4",
"dropperx": "0.2.1",
Expand All @@ -34,6 +36,7 @@
"ms": "^2.0.0",
"next": "^7.0.2",
"next-offline": "^3.0.3",
"prettier": "^1.14.3",
"react": "^16.6.0",
"react-addons-shallow-compare": "^15.6.2",
"react-click-outside": "^3.0.0",
Expand All @@ -60,8 +63,7 @@
"hex2rgb": "^2.2.0",
"husky": "^1.1.2",
"lint-staged": "^7.3.0",
"now": "^11.4.6",
"prettier": "^1.14.3"
"now": "^11.4.6"
},
"lint-staged": {
"*.js": [
Expand Down
14 changes: 11 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,14 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"

cross-env@^5.2.0:
version "5.2.0"
resolved "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz#6ecd4c015d5773e614039ee529076669b9d126f2"
integrity sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==
dependencies:
cross-spawn "^6.0.5"
is-windows "^1.0.0"

cross-fetch@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.2.tgz#a47ff4f7fc712daba8f6a695a11c948440d45723"
Expand Down Expand Up @@ -3903,7 +3911,7 @@ is-typedarray@~1.0.0:
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=

is-windows@^1.0.2:
is-windows@^1.0.0, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==
Expand Down Expand Up @@ -5300,9 +5308,9 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier@^1.14.3:
prettier@1.14.3:
version "1.14.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
resolved "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895"
integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==

pretty-bytes@^4.0.2:
Expand Down