Skip to content

Commit

Permalink
updating express files
Browse files Browse the repository at this point in the history
  • Loading branch information
Wes Dollar committed Oct 5, 2021
1 parent ef86d06 commit eb76503
Show file tree
Hide file tree
Showing 100 changed files with 7,181 additions and 34,362 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
dist
coverage
.vscode
files/express/*
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .husky/pre-commit

This file was deleted.

2 changes: 1 addition & 1 deletion dist/dg.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
commander_1.program
.version("%%VERSION%%")
.version("3.1.5")
.description("scaffold files to skip the annoying stuff")
.command("express", "scaffold express project")
.command("express-route", "scaffold express route")
Expand Down
8 changes: 4 additions & 4 deletions files/express/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=30303
ENV=develop
DATABASE_URL=mongodb+srv://pl_db_adm1n:[email protected]/test
API_BASE=localhost:30303
PORT=80
ENV=prod
API_BASE=localhost:80
APP_URI_BASE=/proganywhere/orchestrator
4 changes: 2 additions & 2 deletions files/express/.env.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=30303
ENV=develop
DATABASE_URL=mongodb+srv://pl_db_adm1n:[email protected]/test
ENV=local
API_BASE=localhost:30303
APP_URL_BASE=
3 changes: 3 additions & 0 deletions files/express/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ dist
coverage
.vscode
.DS_Store
*.md
*.mdx
docs
11 changes: 1 addition & 10 deletions files/express/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
"globals": {
"strapi": true
},
"extends": [
"plugin:prettier/recommended",
"plugin:mdx/recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"plugin:jest/recommended"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/ban-ts-comment": [
"error",
Expand Down Expand Up @@ -149,7 +141,6 @@
"no-alert": "error",
"max-classes-per-file": ["error", 1],
"curly": "error",
"no-console": "warn",
"multiline-comment-style": ["error", "starred-block"]
"no-console": "warn"
}
}
2 changes: 1 addition & 1 deletion files/express/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
.env
.env.local
dist
.DS_Store
coverage
4 changes: 3 additions & 1 deletion files/express/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run test-build
yarn orc:test-build
yarn rn:test-build
yarn rn:pretty-quick
npx lint-staged
4 changes: 3 additions & 1 deletion files/express/.vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"silvenon.mdx",
"cssho.vscode-svgviewer",
"ban.spellright",
"prisma.prisma"
"prisma.prisma",
"xyc.vscode-mdx-preview",
"nixon.env-cmd-file-syntax"
],
"unwantedRecommendations": []
}
14 changes: 8 additions & 6 deletions files/express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,30 @@

After cloning repo,

- Run `npm install` inside project root to install all dependencies.
- Run `npm run develop` to launch server with a watcher that will automatically recompile changes on save
- Add `@gritbit` as a registry `npm config set '@gritbit:registry' https://node.bit.dev`

- Run `yarn install` inside project root to install all dependencies.
- Run `yarn run develop` to launch server with a watcher that will automatically recompile changes on save

### Start the Server

During development, simple run the following command to launch the server with a watcher that recompiles on save.

`npm run develop`
`yarn run develop`

### Build Scripts

There are a few different ways to build this project depending on what you're looking to accomplish.

`npm run develop`
`yarnnpm run develop`

> Fastest option. Watches `src` files and rebuilds on changes. No files are deleted from `dist` and files are not copied from `./public/` to `./dist/public`. Restarts the server after successful build.
`npm run dev`
`yarn run dev`

> Watches `src` files and rebuilds on changes. The build process deletes all files in `dist` before building the changed files. It then copies all of the files in `./public` to the `dist` folder. Restarts the server after successful build.
`npm run build`
`yarn run build`

> Deletes all files in the `dist` directory and rebuilds the entire project, including copying files from `./public` to `./dist/public`. This build script is useful for CI/CD or other "release" needs.
Expand Down
159 changes: 0 additions & 159 deletions files/express/docs/.eslintrc

This file was deleted.

20 changes: 0 additions & 20 deletions files/express/docs/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions files/express/docs/.vscode/extensions.json

This file was deleted.

26 changes: 0 additions & 26 deletions files/express/docs/.vscode/launch.json

This file was deleted.

Loading

0 comments on commit eb76503

Please sign in to comment.