Skip to content

Commit 112eda3

Browse files
committed
Set up "repo-toolbox" project
1 parent e7e0d6a commit 112eda3

File tree

9 files changed

+103
-0
lines changed

9 files changed

+103
-0
lines changed

repo-scripts/repo-toolbox/gulpfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
const build = require('@microsoft/node-library-build');
4+
5+
build.initialize(require('gulp'));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "repo-toolbox",
3+
"version": "1.0.0",
4+
"private": true,
5+
"description": "Used to execute various operations specific to this repo",
6+
"license": "MIT",
7+
"scripts": {
8+
"build": "gulp test --clean"
9+
},
10+
"dependencies": {
11+
"@microsoft/node-core-library": "3.15.0",
12+
"@microsoft/rush-lib": "5.13.1",
13+
"@microsoft/ts-command-line": "4.3.1"
14+
},
15+
"devDependencies": {
16+
"@microsoft/rush-stack-compiler-3.4": "0.2.2",
17+
"@microsoft/node-library-build": "6.2.2",
18+
"@types/node": "8.10.54",
19+
"gulp": "~4.0.2"
20+
}
21+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
node ./lib/start.js %*
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See the @microsoft/rush package's LICENSE file for license information.
3+
4+
import {
5+
CommandLineAction
6+
} from '@microsoft/ts-command-line';
7+
8+
export class ReadmeAction extends CommandLineAction {
9+
public constructor() {
10+
super({
11+
actionName: 'readme',
12+
summary: 'Generates README.md project table based on rush.json inventory',
13+
documentation: 'Use this to update the repo\'s README.md'
14+
});
15+
}
16+
17+
protected onExecute(): Promise<void> { // abstract
18+
console.log('hi');
19+
return Promise.resolve();
20+
}
21+
22+
protected onDefineParameters(): void { // abstract
23+
}
24+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See the @microsoft/rush package's LICENSE file for license information.
3+
4+
import {
5+
CommandLineParser
6+
} from '@microsoft/ts-command-line';
7+
import { ReadmeAction } from './ReadmeAction';
8+
9+
export class ToolboxCommandLine extends CommandLineParser {
10+
11+
public constructor() {
12+
super({
13+
toolFilename: 'toolbox',
14+
toolDescription: 'Used to execute various operations specific to this repo'
15+
});
16+
17+
this.addAction(new ReadmeAction());
18+
}
19+
20+
protected onDefineParameters(): void { // abstract
21+
}
22+
23+
protected onExecute(): Promise<void> { // override
24+
return super.onExecute();
25+
}
26+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See the @microsoft/rush package's LICENSE file for license information.
3+
4+
import { ToolboxCommandLine } from './ToolboxCommandLine';
5+
6+
const commandLine: ToolboxCommandLine = new ToolboxCommandLine();
7+
commandLine.execute();
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.4/includes/tsconfig-node.json",
3+
4+
"compilerOptions": {
5+
"types": [
6+
"node"
7+
]
8+
}
9+
}

repo-scripts/repo-toolbox/tslint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@microsoft/rush-stack-compiler-3.4/includes/tslint.json"
3+
}

rush.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,12 @@
644644
"reviewCategory": "libraries",
645645
"shouldPublish": false
646646
},
647+
{
648+
"packageName": "repo-toolbox",
649+
"projectFolder": "repo-scripts/repo-toolbox",
650+
"reviewCategory": "libraries",
651+
"shouldPublish": false
652+
},
647653

648654
// "stack" folder (alphabetical order)
649655
{

0 commit comments

Comments
 (0)