Rearrange output dirs

pull/282/head
Amio 2019-06-03 21:37:41 +08:00
rodzic 69cf7c8c39
commit e534276e0c
5 zmienionych plików z 7 dodań i 8 usunięć

7
.gitignore vendored
Wyświetl plik

@ -1,7 +1,6 @@
node_modules
yarn.lock
public
node_modules
dist-server
dist
out
.gen
.next
.gen

Wyświetl plik

@ -25,7 +25,7 @@ const isStatic = (url) => {
const server = http.createServer(async (req, res) => {
// handle statics
if (isStatic(req.url)) {
return serveHandler(req, res, { public: path.join(__dirname, 'out') })
return serveHandler(req, res, { public: path.join(__dirname, 'dist') })
}
// handle `/docs/:name`

Wyświetl plik

@ -7,7 +7,7 @@
"regions": ["sfo", "lhr", "hnd"],
"builds": [
{ "src": "endpoints/*.ts", "use": "@now/node" },
{ "src": "package.json", "use": "@now/static-build", "config": { "distDir": "out" } }
{ "src": "package.json", "use": "@now/static-build" }
],
"routes": [
{ "src": "/(?<name>[^/]+)/.*", "dest": "/endpoints/$name.ts" },

Wyświetl plik

@ -10,7 +10,7 @@
"dev": "nodemon -e ts,js -w endpoints -w libs -x 'ts-node index.ts'",
"dev:web": "next",
"tools": "ts-node tools/gen-examples.ts",
"now-build": "npm run tools && next build && next export",
"now-build": "npm run tools && next build && next export -o dist",
"pretest": "npm run lint",
"test": "tap test/*.js --reporter spec -j12",
"start": "node service.js",

Wyświetl plik

@ -10,7 +10,7 @@
"moduleResolution": "node",
"esModuleInterop": true,
"sourceMap": true,
"outDir": "dist",
"outDir": "dist-server",
"baseUrl": ".",
"lib": ["dom", "esnext"]
},