mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore(nestjs) add scripts directory
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nestjs",
|
"name": "nestjs",
|
||||||
"version": "5.3.8",
|
"version": "5.3.10",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
49
package.json
49
package.json
@@ -5,14 +5,10 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"test":
|
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec",
|
||||||
"nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec",
|
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register",
|
||||||
"integration-test":
|
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
|
||||||
"mocha integration/**/*.spec.ts --reporter spec --require ts-node/register",
|
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
|
||||||
"lint":
|
|
||||||
"tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
|
|
||||||
"format":
|
|
||||||
"prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
|
|
||||||
"build": "gulp build && gulp move",
|
"build": "gulp build && gulp move",
|
||||||
"build:lib": "gulp build --dist bundle",
|
"build:lib": "gulp build --dist bundle",
|
||||||
"postinstall": "opencollective",
|
"postinstall": "opencollective",
|
||||||
@@ -21,16 +17,11 @@
|
|||||||
"prepare:rc": "npm run build:lib && npm run copy-docs",
|
"prepare:rc": "npm run build:lib && npm run copy-docs",
|
||||||
"prepare:next": "npm run build:lib && npm run copy-docs",
|
"prepare:next": "npm run build:lib && npm run copy-docs",
|
||||||
"prepare:beta": "npm run build:lib && npm run copy-docs",
|
"prepare:beta": "npm run build:lib && npm run copy-docs",
|
||||||
"publish":
|
"publish": "npm run prepare && ./node_modules/.bin/lerna publish --exact -m \"chore(@nestjs) publish %s release\"",
|
||||||
"npm run prepare && ./node_modules/.bin/lerna publish --exact -m \"chore(@nestjs) publish %s release\"",
|
"publish:rc": "npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=rc -m \"chore(@nestjs) publish %s release\"",
|
||||||
"publish:rc":
|
"publish:next": "npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=next --skip-git -m \"chore(@nestjs) publish %s release\"",
|
||||||
"npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=rc -m \"chore(@nestjs) publish %s release\"",
|
"publish:beta": "npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=beta -m \"chore(@nestjs) publish %s release\"",
|
||||||
"publish:next":
|
"publish:test": "npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\""
|
||||||
"npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=next --skip-git -m \"chore(@nestjs) publish %s release\"",
|
|
||||||
"publish:beta":
|
|
||||||
"npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=beta -m \"chore(@nestjs) publish %s release\"",
|
|
||||||
"publish:test":
|
|
||||||
"npm run prepare && ./node_modules/.bin/lerna publish --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\""
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8.9.0"
|
"node": ">= 8.9.0"
|
||||||
@@ -139,7 +130,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nyc": {
|
"nyc": {
|
||||||
"include": ["packages/**/*.ts"],
|
"include": [
|
||||||
|
"packages/**/*.ts"
|
||||||
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules/",
|
"node_modules/",
|
||||||
"packages/**/*.spec.ts",
|
"packages/**/*.spec.ts",
|
||||||
@@ -158,13 +151,23 @@
|
|||||||
"packages/common/serializer/**/*",
|
"packages/common/serializer/**/*",
|
||||||
"packages/common/services/logger.service.ts"
|
"packages/common/services/logger.service.ts"
|
||||||
],
|
],
|
||||||
"extension": [".ts"],
|
"extension": [
|
||||||
"require": ["ts-node/register"],
|
".ts"
|
||||||
"reporter": ["text-summary", "html"],
|
],
|
||||||
|
"require": [
|
||||||
|
"ts-node/register"
|
||||||
|
],
|
||||||
|
"reporter": [
|
||||||
|
"text-summary",
|
||||||
|
"html"
|
||||||
|
],
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"instrument": true
|
"instrument": true
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"packages/**/*.{ts,json}": ["npm run format", "git add"]
|
"packages/**/*.{ts,json}": [
|
||||||
|
"npm run format",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
scripts/run-integration.sh
Normal file
8
scripts/run-integration.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 1. Build fresh packages and move them integration dit
|
||||||
|
npm run build &>/dev/null
|
||||||
|
|
||||||
|
# 2. Start docker containers to perform integration tests
|
||||||
|
cd integration && docker-compose up -d
|
||||||
|
|
||||||
|
# 3. Run integration tests
|
||||||
|
npm run integration-test
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
|
# Run both unit and integration tests
|
||||||
npm run test
|
npm run test
|
||||||
npm run integration-test
|
npm run integration-test
|
||||||
Reference in New Issue
Block a user