You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<spanstyle="white-space:nowrap">`-w` or `--watch`</span> | Use Chokidar to watch for changes on concerned source files and run their scripts when changes are detected.
1223
-
<spanstyle="white-space:nowrap">`-nd` or `--nondescript`</span> | Silence detailed logging (such as file writing writing) for commands. All other logs (such as script start and success) will display. **This can be used on all commands**.
1224
-
<spanstyle="white-space:nowrap">`-s` or `--silent`</span> | Disable all logging output. Note, some output will always log such as linting and errors. **This can be used on all commands**.
1225
-
<spanstyle="white-space:nowrap">`-nl` or `--no-lint`</span> | Disable ESLint and stylelint. This only works the `rollup` and `sass` command respectively. Running `npx pttrn lint -nl` will have no effect.
1226
-
<spanstyle="white-space:nowrap">`-np` or `--no-pa11y`</span> | Disable Pa11y linting. This only works for the `slm` command. Running `npx pttrn pa11y -np` command will have no effect.
<divstyle="white-space:nowrap">`-w` or `--watch`</div> | Use Chokidar to watch for changes on concerned source files and run their scripts when changes are detected.
1225
+
<divstyle="white-space:nowrap">`-nd` or `--nondescript`</div> | Silence detailed logging (such as file writing writing) for commands. All other logs (such as script start and success) will display. **This can be used on all commands**.
1226
+
<divstyle="white-space:nowrap">`-s` or `--silent`</div> | Disable all logging output. Note, some output will always log such as linting and errors. **This can be used on all commands**.
1227
+
<divstyle="white-space:nowrap">`-nl` or `--no-lint`</div> | Disable ESLint and stylelint. This only works the `rollup` and `sass` command respectively. Running `npx pttrn lint -nl` will have no effect.
1228
+
<divstyle="white-space:nowrap">`-np` or `--no-pa11y`</div> | Disable Pa11y linting. This only works for the `slm` command. Running `npx pttrn pa11y -np` command will have no effect.
1227
1229
1228
1230
### Alerts
1229
1231
@@ -1233,6 +1235,18 @@ Flag | Description
1233
1235
1234
1236
You may have noticed the `scaffold` command will create a `.config/rollup.mjs` configuration file. [Node.js has stable support of the ECMAScript module spec](https://nodejs.org/api/esm.html) and they can be imported into CommonJS (Node modules). The configuration script will resolve ES modules with the **.mjs** extension over **.js** files, however, use of ES module configuration hasn't been fully tested with all of the commands.
1235
1237
1238
+
### Custom Commands
1239
+
1240
+
As the commands above will look for a custom configuration file for each command in the **./config** directory of your project the CLI will also resolve custom command scripts in the **./bin** directory of your project. A [sample script](bin/_sample.js) is included in this repo and can be used to start the creation of a custom command. The bare minimum a command script should include is a `run()` method.
1241
+
1242
+
```javascript
1243
+
module.exports= {
1244
+
run: () => {
1245
+
console.log('My custom command');
1246
+
}
1247
+
};
1248
+
```
1249
+
1236
1250
### NPM Scripts
1237
1251
1238
1252
The recommended [npm scripts](https://docs.npmjs.com/misc/scripts) below create shortcuts for using the cli and hook into other npm methods to make starting, versioning, and publishing more convenient. They can be modified to suit the needs of a particular project. Add them to your project's *package.json* file.
0 commit comments