Deployments with now

This commit is contained in:
Nicholas Zuber 2019-04-06 16:04:12 -04:00
parent d8874ca3ef
commit fda2341e63
3 changed files with 22 additions and 2 deletions

View File

@ -19,8 +19,8 @@ const paths = require('./paths');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const gitHash = execSync('git rev-parse --short HEAD').toString().trim();
// const gitHash = execSync('git rev-parse --short HEAD').toString().trim();
const gitHash = '';
// Webpack uses `publicPath` to determine where the app is being served from.
// It requires a trailing slash, or the file assets will get an incorrect path.

19
now.json Normal file
View File

@ -0,0 +1,19 @@
{
"version": 2,
"name": "meteorite",
"alias": "meteorite.dev",
"builds": [{
"src": "package.json",
"use": "@now/static-build",
"config": {"distDir": "build"}
}],
"routes": [
{"src": "^/static/(.*)", "dest": "/static/$1"},
{"src": "^/favicon.ico", "dest": "/favicon.ico"},
{"src": "^/manifest.json", "dest": "/manifest.json"},
{"src": "^/(.*)", "dest": "/index.html"}
],
"github": {
"enabled": false
}
}

View File

@ -70,6 +70,7 @@
"scripts": {
"start": "node scripts/start.js",
"build": "node scripts/build.js && cp build/index.html build/200.html",
"now-build": "npm run build",
"test": "node scripts/test.js",
"deploy": "npm run build && surge ./build"
},