@sprocketbot/listodo
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -5,3 +5,3 @@ #!/usr/bin/env node | ||
const lib_1 = require("./lib"); | ||
(0, lib_1.listodo)({ | ||
const fail = (0, lib_1.listodo)({ | ||
files: ["test"], | ||
@@ -14,1 +14,3 @@ searchUntracked: true, | ||
}); | ||
if (fail) | ||
process.exitCode = 1; |
@@ -90,3 +90,4 @@ "use strict"; | ||
todos.map(exports.todoToStr).forEach(t => console.log(t + "\n")); | ||
return Boolean(todos.length); | ||
}; | ||
exports.listodo = listodo; |
{ | ||
"name": "@sprocketbot/listodo", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -10,3 +10,4 @@ "bin": "bin/index.js", | ||
"build": "rimraf bin && tsc", | ||
"listodo": "listodo" | ||
"listodo": "listodo", | ||
"prepare": "husky install" | ||
}, | ||
@@ -25,8 +26,6 @@ "repository": { | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^8.3.0", | ||
"@sprocketbot/listodo": "^0.0.5", | ||
"@sprocketbot/listodo": "^0.0.8", | ||
"husky": "^7.0.4", | ||
"nodemon": "^2.0.15", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.60.2", | ||
"rollup-plugin-preserve-shebang": "^1.0.1", | ||
"ts-node": "^10.4.0", | ||
@@ -33,0 +32,0 @@ "typescript": "^4.5.2" |
@@ -8,4 +8,4 @@ # listodo | ||
Install `listodo` into your project | ||
```shell | ||
$ npm i -D @sprocketbot/listodo | ||
```sh | ||
npm i -D @sprocketbot/listodo | ||
``` | ||
@@ -16,5 +16,3 @@ | ||
{ | ||
... | ||
"scripts": { | ||
... | ||
"todo": "listodo" | ||
@@ -26,10 +24,30 @@ } | ||
Run `listodo` | ||
```shell | ||
$ npm run todo | ||
```sh | ||
npm run todo | ||
``` | ||
## Husky Integration | ||
To have listodo run before committing (or with any other [Git hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)), you need to install and configure [husky](https://github.com/typicode/husky) | ||
```sh | ||
# Install husky | ||
npm install husky -D | ||
# Configure your project to set up husky | ||
npm set-script prepare "husky install" | ||
npm run prepare | ||
``` | ||
Then, you can add a hook to run listodo | ||
```sh | ||
# Run listodo pre-commit | ||
npx husky add .husky/pre-commit "npx listodo" | ||
# Run listodo on another hook | ||
npx husky add .husky/<git-hook> "npx listodo" | ||
``` | ||
## Future plans | ||
- Expose options through configuration file | ||
- Testing | ||
- Document integration with husky | ||
- Open for community contribution |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7005
6
7
108
51