Add an example implementation for "my-bulk-command"

This commit is contained in:
Pete Gonzalez 2019-06-17 21:03:28 -07:00
Родитель 4144804bea
Коммит 52054cda87
6 изменённых файлов: 20 добавлений и 5 удалений

Просмотреть файл

@ -4,7 +4,8 @@
"description": "An example application that consumes the my-controls library",
"license": "MIT",
"scripts": {
"build": "node_modules/.bin/my-build"
"build": "node_modules/.bin/my-build",
"my-bulk-command": "node_modules/.bin/my-bulk-command"
},
"dependencies": {
"my-controls": "^1.0.0",

Просмотреть файл

@ -1,4 +1,4 @@
// This script provides the implementation for an example custom command that is
// This script provides the implementation for the example custom command "my-global-command"
// defined in common/config/rush/command-line.json.
console.log('Invoking ' + __filename);

Просмотреть файл

@ -6,7 +6,8 @@
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"scripts": {
"build": "node_modules/.bin/my-build"
"build": "node_modules/.bin/my-build",
"my-bulk-command": "node_modules/.bin/my-bulk-command"
},
"dependencies": {},
"devDependencies": {

Просмотреть файл

@ -0,0 +1,2 @@
#!/usr/bin/env node
require('../lib/startCommand.js')

Просмотреть файл

@ -4,10 +4,12 @@
"description": "An example toolchain used to build projects in this repo",
"license": "MIT",
"bin": {
"my-build": "bin/my-build.js"
"my-build": "bin/my-build.js",
"my-bulk-command": "bin/my-bulk-command.js"
},
"scripts": {
"build": "rimraf ./lib/ && tsc"
"build": "rimraf ./lib/ && tsc",
"my-bulk-command": ""
},
"dependencies": {
"colors": "^1.3.2"

Просмотреть файл

@ -0,0 +1,9 @@
// This script provides the implementation for the example custom command "my-bulk-command"
// that is defined in common/config/rush/command-line.json and launched via my-toolchain/bin/my-bulk-command.js
console.log('Invoking ' + __filename);
// The first two args will be node.exe and the script itself
let args = process.argv.slice(2);
console.log('\nScript args are: ' + JSON.stringify(args));