Skip to content

Commit 9783f80

Browse files
committed
* chore(vscode): update launch.json configuration
* feat(bin): add cli.js to bin folder * feat(CHANGELOG.md): add instags in bin property * fix(package.json): resolve conflict in bin property * feat(package.json): add commander dependency
2 parents 8d2f1f2 + c7d0c55 commit 9783f80

File tree

5 files changed

+58
-18
lines changed

5 files changed

+58
-18
lines changed

.vscode/launch.json

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,18 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
87
{
9-
"type": "node",
10-
"name": "vscode-jest-tests.v2.insert-file-tag",
11-
"request": "launch",
8+
"name": "Launch Program",
9+
"program": "${workspaceFolder}\\bin\\cli.js",
1210
"args": [
13-
"--runInBand",
14-
"--watchAll=false",
15-
"--testNamePattern",
16-
"${jest.testNamePattern}",
17-
"--runTestsByPath",
18-
"${jest.testFile}"
11+
"SAMPLE_README.md"
12+
],
13+
"request": "launch",
14+
"skipFiles": [
15+
"<node_internals>/**"
1916
],
20-
"cwd": "${workspaceFolder}",
21-
"console": "integratedTerminal",
22-
"internalConsoleOptions": "neverOpen",
23-
"disableOptimisticBPs": true,
24-
"program": "${workspaceFolder}/node_modules/.bin/jest",
25-
"windows": {
26-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
27-
}
17+
"type": "node"
2818
}
19+
2920
]
3021
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# Changelog
22

33
*Changelog created using the [Simple Changelog](https://marketplace.visualstudio.com/items?itemName=tobiaswaelde.vscode-simple-changelog) extension for VS Code.*
4+
5+
## [1.0.0] - 2024-12-16
6+
### Added
7+
- Add instags in bin property
8+
- Added cli.js in bin folder

bin/cli.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env node
2+
3+
const { Command } = require('commander');
4+
const { processAndSaveFileWithTags } = require('../src/source-processor');
5+
const packageJson = require('../package.json');
6+
const path = require('path');
7+
8+
const program = new Command();
9+
10+
program
11+
.name(packageJson.name)
12+
.version(packageJson.version)
13+
.description(packageJson.description)
14+
.argument('<filename>', 'file to process for insert tags')
15+
.option('-o, --output <output>', 'output filename', '')
16+
.action((filename, options) => {
17+
const outputFilename = options.output || filename;
18+
processAndSaveFileWithTags(filename, outputFilename);
19+
});
20+
21+
program.parse(process.argv);
22+
23+
if (!program.args.length) {
24+
program.help();
25+
}
26+

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
],
1212
"main": "index.js",
1313
"bin": {
14+
<<<<<<< HEAD
1415
"instags": "bin/cli.js"
16+
=======
17+
"instags": "../bin/cli.js"
18+
>>>>>>> c7d0c55980af70dda627f0972460ffbf4a5a1937
1519
},
1620
"repository": {
1721
"type": "git",
@@ -30,6 +34,7 @@
3034
"test": "jest"
3135
},
3236
"dependencies": {
37+
"commander": "^12.1.0",
3338
"fs": "^0.0.1-security",
3439
"fs-extra": "^11.1.1"
3540
},

0 commit comments

Comments
 (0)