@nestjs/schematics
Advanced tools
Comparing version 0.0.0 to 1.0.0-rc.1
@@ -7,5 +7,6 @@ "use strict"; | ||
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [ | ||
schematics_1.template(Object.assign({ classify: core_1.classify }, options)) | ||
schematics_1.template(Object.assign({}, core_1.strings, options)), | ||
schematics_1.move(options.path) | ||
])); | ||
} | ||
exports.main = main; |
@@ -15,4 +15,28 @@ { | ||
"description": "Create a Nest controller." | ||
}, | ||
"service": { | ||
"factory": "./service/factory#main", | ||
"description": "Create a Nest service." | ||
}, | ||
"middleware": { | ||
"factory": "./middleware/factory#main", | ||
"description": "Create a Nest middleware." | ||
}, | ||
"exception": { | ||
"factory": "./exception/factory#main", | ||
"description": "Create a Nest exception." | ||
}, | ||
"pipe": { | ||
"factory": "./pipe/factory#main", | ||
"description": "Create a Nest pipe." | ||
}, | ||
"guard": { | ||
"factory": "./guard/factory#main", | ||
"description": "Create a Nest guard." | ||
}, | ||
"interceptor": { | ||
"factory": "./interceptor/factory#main", | ||
"description": "Create a Nest interceptor." | ||
} | ||
} | ||
} |
@@ -5,8 +5,9 @@ "use strict"; | ||
const schematics_1 = require("@angular-devkit/schematics"); | ||
const path = require("path"); | ||
function main(options) { | ||
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [ | ||
schematics_1.template(Object.assign({ classify: core_1.classify }, options)), | ||
schematics_1.move(options.rootDir), | ||
schematics_1.template(Object.assign({}, core_1.strings, options)), | ||
schematics_1.move(path.join(options.rootDir, options.path)) | ||
])); | ||
} | ||
exports.main = main; |
@@ -5,8 +5,9 @@ "use strict"; | ||
const schematics_1 = require("@angular-devkit/schematics"); | ||
const path = require("path"); | ||
function main(options) { | ||
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [ | ||
schematics_1.template(Object.assign({ classify: core_1.classify }, options)), | ||
schematics_1.move(options.rootDir), | ||
schematics_1.template(Object.assign({}, core_1.strings, options)), | ||
schematics_1.move(path.join(options.rootDir, options.path)) | ||
])); | ||
} | ||
exports.main = main; |
{ | ||
"name": "@nestjs/schematics", | ||
"version": "0.0.0", | ||
"version": "1.0.0-rc.1", | ||
"description": "Nestjs schematics project for @nestjs/cli", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"lint:test": "tslint --project test/tsconfig.json", | ||
"test": "mocha test/**/*.ts --require ts-node/register" | ||
"test": "nyc mocha test/**/*.ts --require ts-node/register" | ||
}, | ||
@@ -26,7 +26,6 @@ "repository": { | ||
"homepage": "https://github.com/ThomRick/nest-cli-schematics#readme", | ||
"dependencies": { | ||
"@angular-devkit/core": "0.0.29", | ||
"@angular-devkit/schematics": "0.0.52" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@angular-devkit/core": "^0.4.2", | ||
"@angular-devkit/schematics": "^0.4.2", | ||
"@types/chai": "^4.1.2", | ||
@@ -37,6 +36,29 @@ "@types/mocha": "^2.2.48", | ||
"mocha": "^5.0.0", | ||
"nyc": "^11.4.1", | ||
"ts-lint": "^4.5.1", | ||
"ts-node": "^4.1.0", | ||
"typescript": "^2.7.1" | ||
}, | ||
"schematics": "./collection.json", | ||
"nyc": { | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"test" | ||
], | ||
"extension": [ | ||
".ts" | ||
], | ||
"require": [ | ||
"ts-node/register" | ||
], | ||
"reporter": [ | ||
"text-summary", | ||
"html" | ||
], | ||
"sourceMap": true, | ||
"instrument": true | ||
} | ||
} |
[![Build Status](https://travis-ci.org/nestjs/schematics.svg?branch=master)](https://travis-ci.org/nestjs/schematics) | ||
# @nestjs/schematics | ||
Nestjs project and architecture element generation based on @angular-dekit/schematics engine | ||
Nestjs architecture element generation based on @angular-dekit/schematics engine | ||
## Build : | ||
- `git clone https://github.com/nestjs/schematics.git` | ||
### Steps with Docker | ||
in the schematics folder : | ||
- `make prepare` | ||
- `make build` | ||
### Steps without Docker | ||
in the schematics folder : | ||
- `npm install` | ||
- `rm -rf schematics && mkdir schematics` | ||
- `npm run -s build` | ||
- `cp -R src/* schematics` | ||
- `find schematics/ -name '*.ts' -delete` | ||
- `find src -name '*.js' -delete` | ||
- `cp -R LICENSE package.json package-lock.json README.md .npmrc schematics` | ||
## Usages: | ||
### With @angular-devkit/schematics-cli | ||
install @angular-devkit/schematics-cli globally. | ||
run `schematics [path_to_nestjs_schematics]:<nestjs_schematic_name> [...options]` | ||
## Schematics: | ||
| Name | Usage | | ||
|-------------|---------------------------------------------------------------------------------------------------------------| | ||
| application | .:application --extension=[ts OR js] --path=[your_path] | | ||
| controller | .:controller --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| exception | .:exception --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| guard | .:guard --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| interceptor | .:interceptor --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| middleware | .:middleware --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| module | .:module --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| pipe | .:pipe --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | | ||
| service | .:service --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13362
0
32
163
41
11
- Removed@angular-devkit/core@0.0.29
- Removed@angular-devkit/schematics@0.0.52
- Removed@angular-devkit/core@0.0.29(transitive)
- Removed@angular-devkit/schematics@0.0.52(transitive)
- Removed@ngtools/json-schema@1.2.0(transitive)
- Removedajv@5.5.2(transitive)
- Removedanymatch@1.3.2(transitive)
- Removedarr-diff@2.0.04.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-unique@0.2.10.3.2(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedasync-each@1.0.6(transitive)
- Removedatob@2.1.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbinary-extensions@1.13.1(transitive)
- Removedbindings@1.5.0(transitive)
- Removedbraces@1.8.52.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedchokidar@1.7.0(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedco@4.6.0(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removedexpand-brackets@0.1.52.1.4(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@0.3.22.0.4(transitive)
- Removedfast-deep-equal@1.1.0(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.44.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfsevents@1.2.13(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-value@2.0.6(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedglob-parent@2.0.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-binary-path@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-extglob@1.0.0(transitive)
- Removedis-glob@2.0.1(transitive)
- Removedis-number@2.1.03.0.04.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedjson-schema-traverse@0.3.1(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmicromatch@2.3.113.1.10(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedms@2.0.0(transitive)
- Removednan@2.20.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removednormalize-path@2.1.1(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedprocess-nextick-args@2.0.1(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedreadable-stream@2.3.8(transitive)
- Removedreaddirp@2.2.1(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedrxjs@5.5.12(transitive)
- Removedsafe-buffer@5.1.2(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedset-value@2.0.1(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedstring_decoder@1.1.1(transitive)
- Removedsymbol-observable@1.0.1(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)