Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 6b6007c

Browse files
author
Cdok
committed
fix readme & script to reflect '' glob requirement
1 parent 4968818 commit 6b6007c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

copyright/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This tool reads from the `headers/copyright-header.extension` files to select what header to insert, where `extension` is the target file extension
44

5-
**NOTE**: For any new `copyright-header.extension` files, write `Copyright (c) year` instead of writing the numerical year, the tool will find and replace `year` with the current year.
5+
For any new `copyright-header.extension` files, write `Copyright (c) year` instead of writing the numerical year, as the tool will find and replace `year` with the current year.
66

77
## Quick Start
88

@@ -14,6 +14,11 @@ Add the following to your `package.json` under `"scripts": { ... }`
1414
"copyright:update" "copyright 'glob' --update"
1515
```
1616

17+
**NOTE**: The glob must be wrapped in single quotes to ensure that the globbing is handled by the copyright tool.
18+
19+
Without wrapping the glob pattern in single quotes, your shell will expand the glob, and may not return the same directories across different environments.
20+
21+
1722
```bash
1823
npm install mobify-code-style --save
1924
npm run copyright:lint

copyright/copyright.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if (args.length === 0 || args.indexOf('--help') >= 0) {
6969
console.log(`
7070
Usage: node copyright.js [options] 'glob' ['additional globs']
7171
72-
If your glob is not targetting all nested directories, ensure that the glob string is wrapped in quotes
72+
If your glob is not targetting all nested directories, ensure that the glob string is wrapped in single quotes
7373
7474
Example:
7575
${yellow}node copyright.js --fix${defaultFG} 'src/**/*.js'

0 commit comments

Comments
 (0)