kopia lustrzana https://github.com/badgen/badgen.net
Rearrange output dirs
rodzic
69cf7c8c39
commit
e534276e0c
|
@ -1,7 +1,6 @@
|
|||
node_modules
|
||||
yarn.lock
|
||||
public
|
||||
node_modules
|
||||
dist-server
|
||||
dist
|
||||
out
|
||||
.gen
|
||||
.next
|
||||
.gen
|
||||
|
|
2
index.ts
2
index.ts
|
@ -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`
|
||||
|
|
2
now.json
2
now.json
|
@ -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" },
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"outDir": "dist-server",
|
||||
"baseUrl": ".",
|
||||
"lib": ["dom", "esnext"]
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue