Skip to content

Commit

Permalink
enable Express starter, building ok
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-burel committed Mar 11, 2022
1 parent 424d513 commit 4e215a4
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ dist
node_modules
package-lock.json
.yalc
.yalc.lock
starters/express/yalc.lock

#vscode extension
.vscode/snipsnap.code-snippets
Expand Down
2 changes: 1 addition & 1 deletion packages/mongo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@vulcanjs/crud": "^0.5.4-alpha.7",
"@vulcanjs/model": "^0.5.4-alpha.7",
"@vulcanjs/utils": "^0.5.4-alpha.7",
"escape-string-regexp": "4.0.0",
"escape-string-regexp": "^5.0.0",
"lodash": "^4.17.20"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion starters/express/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Experimental!

Starters are not yet exposed, we need to figure how to include them in a monorepo context.
Starters are not yet exposed, we need to figure how to include them in a monorepo context.
7 changes: 7 additions & 0 deletions starters/express/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"watch": ["src"],
"ignore": ["src/**/*.test.ts"],
"ext": "ts,mjs,js,json,graphql",
"exec": "yarn run build && node ./dist/app.js",
"legacyWatch": true
}
10 changes: 8 additions & 2 deletions starters/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@
"name": "vulcan-express",
"version": "0.0.1",
"description": "Vulcan Express",
"main": "app.ts",
"main": "./dist/app.mjs",
"private": true,
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node ./dist/app.js",
"build": "tsc"
"dev": "nodemon",
"dev:esbuild": "node -r esbuild-register ./src/app.ts # Not working yet",
"transpile": "tsc # Beware, this won't resolve local dependencies (missing .js)",
"build:tsup": "tsup-node",
"build": "yarn run build:tsup"
},
"author": "Eric Burel (LBKE)",
"license": "MIT",
"devDependencies": {
"esbuild": "^0.14.25",
"esbuild-register": "^3.3.2",
"nodemon": "^2.0.15",
"tsup": "^5.12.1",
"typescript": "^4.6.2"
},
"dependencies": {
Expand Down
19 changes: 19 additions & 0 deletions starters/express/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineConfig } from "tsup";
import path from "path";

const commonConfig = {
clean: true,
splitting: false,
// Skip until .d.ts.map is also supported https://github.com/egoist/tsup/issues/564
// dts: true,
sourcemap: true,
tsconfig: path.resolve(__dirname, "./tsconfig.json"),
};
export default defineConfig([
{
entry: ["./src/app.ts"],
...commonConfig,
format: ["esm"],
outDir: "dist",
},
]);
Loading

0 comments on commit 4e215a4

Please sign in to comment.