|
2 | 2 | "name": "express-typescript-boilerplate", |
3 | 3 | "version": "1.7.0", |
4 | 4 | "description": "A delightful way to building a RESTful API with NodeJs & TypeScript", |
5 | | - "main": "src/index.ts", |
| 5 | + "main": "src/app.ts", |
6 | 6 | "scripts": { |
7 | | - "test": "NODE_ENV=test ./node_modules/.bin/jest ./test/unit", |
8 | | - "test:pretty": "NODE_ENV=test ./node_modules/.bin/jest ./test/unit --verbose", |
9 | | - "test:coverage": "NODE_ENV=test ./node_modules/.bin/jest ./test/unit --coverage", |
10 | | - "test:black-box": "NODE_ENV=test ./node_modules/.bin/jest ./test/black-box -i", |
11 | | - "test:black-box:pretty": "NODE_ENV=test ./node_modules/.bin/jest ./test/black-box -i --verbose", |
| 7 | + "banner": "./node_modules/.bin/ts-node --fast ./src/console/lib/banner.ts", |
| 8 | + "pretest": "./node_modules/.bin/tslint -c ./tslint.json -t stylish './test/unit/**/*.ts'", |
| 9 | + "test:pretty": "npm run test -- --verbose", |
| 10 | + "test:coverage": "npm run test -- --coverage", |
| 11 | + "pretest:black-box": "./node_modules/.bin/tslint -c ./tslint.json -t stylish './test/black-box/**/*.ts'", |
| 12 | + "test:black-box": "npm run banner test && NODE_ENV=test ./node_modules/.bin/jest ./test/black-box -i", |
| 13 | + "test:black-box:pretty": "npm run test:black-box -- --verbose", |
12 | 14 | "lint": "./node_modules/.bin/tslint -c ./tslint.json -p tsconfig.json 'src/**/*.ts' --format stylish", |
13 | | - "build": "npm run lint && npm run clean:dist && npm run transpile && npm run copy:assets", |
14 | 15 | "transpile": "./node_modules/.bin/tsc", |
15 | 16 | "clean:dist": "./node_modules/.bin/rimraf ./dist", |
16 | 17 | "copy:assets": "npm run copy:swagger && npm run copy:public", |
17 | 18 | "copy:swagger": "./node_modules/.bin/copyup ./src/api/swagger.json ./dist", |
18 | 19 | "copy:public": "./node_modules/.bin/copyup ./src/public/* ./dist", |
19 | | - "db:migrate": "./node_modules/.bin/knex migrate:latest", |
20 | | - "db:migrate:rollback": "./node_modules/.bin/knex migrate:rollback", |
21 | | - "db:seed": "./node_modules/.bin/knex seed:run", |
| 20 | + "db:migrate": "npm run banner migrate && ./node_modules/.bin/knex migrate:latest", |
| 21 | + "db:migrate:rollback": "npm run banner rollback && ./node_modules/.bin/knex migrate:rollback", |
| 22 | + "db:seed": "npm run banner seed && ./node_modules/.bin/knex seed:run", |
22 | 23 | "db:reset": "npm run console db:reset", |
23 | 24 | "console": "./node_modules/.bin/ts-node --fast ./src/console/commander.ts", |
24 | 25 | "console:dev": "./node_modules/.bin/ts-node ./src/console/commander.ts", |
25 | 26 | "console:help": "./node_modules/.bin/ts-node --fast ./src/console/commander.ts --help", |
26 | | - "serve": "./node_modules/.bin/nodemon --watch 'src/**/*.ts' --watch 'src/**/*.json' --watch '.env'", |
27 | | - "start": "node dist/index.js" |
| 27 | + "setup": "yarn install && npm run db:migrate && npm run db:seed", |
| 28 | + "serve": "npm run banner serve && ./node_modules/.bin/nodemon --watch 'src/**/*.ts' --watch 'src/**/*.json' --watch '.env'", |
| 29 | + "test": "npm run banner test && NODE_ENV=test ./node_modules/.bin/jest ./test/unit", |
| 30 | + "build": "npm run banner build && npm run lint && npm run clean:dist && npm run transpile && npm run copy:assets", |
| 31 | + "start": "node dist/app.js" |
28 | 32 | }, |
29 | 33 | "repository": "git+ssh://git@github.com/w3tec/express-typescript-boilerplate.git", |
30 | 34 | "engines": { |
|
57 | 61 | "@types/bluebird": "^3.5.4", |
58 | 62 | "@types/body-parser": "^1.16.3", |
59 | 63 | "@types/bookshelf": "^0.9.1", |
| 64 | + "@types/chalk": "^0.4.31", |
60 | 65 | "@types/commander": "^2.9.0", |
61 | 66 | "@types/cors": "^2.8.1", |
62 | | - "@types/debug": "0.0.29", |
63 | 67 | "@types/dotenv": "^4.0.0", |
64 | 68 | "@types/express": "^4.0.35", |
65 | 69 | "@types/faker": "^4.1.0", |
|
82 | 86 | "body-parser": "^1.17.2", |
83 | 87 | "bookshelf": "^0.10.3", |
84 | 88 | "bookshelf-camelcase": "^1.1.4", |
| 89 | + "chalk": "^1.1.3", |
85 | 90 | "class-validator": "^0.7.0", |
86 | 91 | "commander": "^2.9.0", |
87 | 92 | "compression": "^1.6.2", |
88 | 93 | "copyfiles": "^1.2.0", |
89 | 94 | "cors": "^2.8.1", |
90 | | - "debug": "^2.6.8", |
91 | 95 | "dotenv": "^4.0.0", |
92 | 96 | "express": "^4.15.3", |
93 | 97 | "express-status-monitor": "^0.1.9", |
94 | 98 | "faker": "^4.1.0", |
| 99 | + "figlet": "^1.2.0", |
95 | 100 | "glob": "^7.1.2", |
96 | 101 | "handlebars": "^4.0.10", |
97 | 102 | "helmet": "^3.6.1", |
|
125 | 130 | }, |
126 | 131 | "jest": { |
127 | 132 | "transform": { |
128 | | - ".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js" |
| 133 | + ".(ts|tsx)": "<rootDir>/test/preprocessor.js" |
129 | 134 | }, |
130 | 135 | "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", |
131 | 136 | "moduleFileExtensions": [ |
|
0 commit comments