mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
build: update gulp/package.json scripts
This commit is contained in:
16
gulpfile.js
16
gulpfile.js
@@ -16,7 +16,7 @@ const packages = {
|
||||
const modules = Object.keys(packages);
|
||||
const source = 'packages';
|
||||
const distId = process.argv.indexOf('--dist');
|
||||
const dist = distId < 0 ? 'node_modules/@nestjs' : process.argv[distId + 1];
|
||||
const dist = distId < 0 ? source : process.argv[distId + 1];
|
||||
|
||||
gulp.task('default', function() {
|
||||
modules.forEach(module => {
|
||||
@@ -30,23 +30,23 @@ gulp.task('default', function() {
|
||||
gulp.task('copy-misc', function() {
|
||||
return gulp
|
||||
.src(['Readme.md', 'LICENSE', '.npmignore'])
|
||||
.pipe(gulp.dest('packages/common'))
|
||||
.pipe(gulp.dest('packages/core'))
|
||||
.pipe(gulp.dest('packages/microservices'))
|
||||
.pipe(gulp.dest('packages/websockets'))
|
||||
.pipe(gulp.dest('packages/testing'));
|
||||
.pipe(gulp.dest(`${source}/common`))
|
||||
.pipe(gulp.dest(`${source}/core`))
|
||||
.pipe(gulp.dest(`${source}/microservices`))
|
||||
.pipe(gulp.dest(`${source}/websockets`))
|
||||
.pipe(gulp.dest(`${source}/testing`));
|
||||
});
|
||||
|
||||
gulp.task('clean:output', function() {
|
||||
return gulp
|
||||
.src(['packages/**/*.js', 'packages/**/*.d.ts'], {
|
||||
.src([`${source}/**/*.js`, `${source}/**/*.d.ts`], {
|
||||
read: false,
|
||||
})
|
||||
.pipe(clean());
|
||||
});
|
||||
|
||||
gulp.task('clean:dirs', function(done) {
|
||||
deleteEmpty.sync('packages/');
|
||||
deleteEmpty.sync(`${source}/`);
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
55
package.json
55
package.json
@@ -5,21 +5,30 @@
|
||||
"scripts": {
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"precommit": "lint-staged",
|
||||
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
|
||||
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
|
||||
"test":
|
||||
"nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"integration-test":
|
||||
"mocha integration/**/*.spec.ts --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"lint":
|
||||
"tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
|
||||
"format":
|
||||
"prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
|
||||
"clean": "gulp clean:bundle",
|
||||
"build": "gulp build && gulp move",
|
||||
"build:lib": "npm run clean && gulp build --dist packages",
|
||||
"build": "npm run clean && gulp build",
|
||||
"build:dev": "gulp build --dist node_modules/@nestjs && gulp move",
|
||||
"postinstall": "opencollective",
|
||||
"copy-misc": "gulp copy-misc",
|
||||
"prepare:npm": "npm run build:lib && npm run copy-misc",
|
||||
"publish": "npm run prepare:npm && ./node_modules/.bin/lerna publish --exact -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:rc": "npm run prepare:npm && ./node_modules/.bin/lerna publish --npm-tag=rc -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:next": "npm run prepare:npm && ./node_modules/.bin/lerna publish --npm-tag=next --skip-git -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:beta": "npm run prepare:npm && ./node_modules/.bin/lerna publish --npm-tag=beta -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:test": "npm run prepare:npm && ./node_modules/.bin/lerna publish --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\""
|
||||
"prepare": "npm run build:lib && npm run copy-misc",
|
||||
"publish":
|
||||
"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:next":
|
||||
"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": {
|
||||
"node": ">= 8.9.0"
|
||||
@@ -129,9 +138,7 @@
|
||||
}
|
||||
},
|
||||
"nyc": {
|
||||
"include": [
|
||||
"packages/**/*.ts"
|
||||
],
|
||||
"include": ["packages/**/*.ts"],
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"packages/**/*.spec.ts",
|
||||
@@ -150,23 +157,13 @@
|
||||
"packages/common/serializer/**/*",
|
||||
"packages/common/services/logger.service.ts"
|
||||
],
|
||||
"extension": [
|
||||
".ts"
|
||||
],
|
||||
"require": [
|
||||
"ts-node/register"
|
||||
],
|
||||
"reporter": [
|
||||
"text-summary",
|
||||
"html"
|
||||
],
|
||||
"extension": [".ts"],
|
||||
"require": ["ts-node/register"],
|
||||
"reporter": ["text-summary", "html"],
|
||||
"sourceMap": true,
|
||||
"instrument": true
|
||||
},
|
||||
"lint-staged": {
|
||||
"packages/**/*.{ts,json}": [
|
||||
"npm run format",
|
||||
"git add"
|
||||
]
|
||||
"packages/**/*.{ts,json}": ["npm run format", "git add"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "./../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "./../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "./../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "./../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"extends": "./../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./",
|
||||
"baseUrl": "./"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
|
||||
Reference in New Issue
Block a user