This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 11## Mobify Copyright Headers
22
3- This tool reads from the ` headers/copyright.extension.txt ` text files to select what header to insert, where ` extension ` is the target file extension
3+ This tool reads from the ` headers/copyright-header .extension ` files to select what header to insert, where ` extension ` is the target file extension
44
55## Quick Start
66
77Add the following to your ` package.json `
88
99``` json
10- "copyright:lint" : " copyright.js glob --lint " ,
11- " copyright:fix" " copyright.js glob"
10+ "copyright:lint" : " copyright.js glob" ,
11+ " copyright:fix" " copyright.js glob --fix "
1212```
1313
1414``` bash
@@ -22,14 +22,16 @@ npm run lint:copyright
2222node copyright.js ../../some-project/bin/** /* .js
2323```
2424
25- This command would add the copyright header from ` headers/copyright.js.txt ` to all ` .js ` files in the ` some-project/bin ` directory
25+ This command would add the copyright header from ` headers/copyright-header .js ` to all ` .js ` files in the ` some-project/bin ` directory
2626
2727## Lint Mode
2828
29- Passing the ` --lint ` flag to this tool will enable lint mode.
29+ Passing the ` --fix ` flag to this tool will disable lint mode.
3030
3131With lint mode enabled, the process will exit if any of the target directories contain files which do not have copyright headers.
3232
33+ In fix mode, the tool will add the copyright headers to any targetted files.
34+
3335### Developing
3436
3537` node --inspect --debug-brk copyright.js ../../some-project/source-folder/**/*.js `
You can’t perform that action at this time.
0 commit comments