Skip to content
textlint npm-run-scripts CLI help to create textlint rule.
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
configs
example-ts
example
scripts
test
.gitignore
.npmrc
.travis.yml
LICENSE
README.md
package.json
register-ts.js
register.js
renovate.json
yarn.lock

README.md

textlint-scripts Build Status

textlint npm-run-scripts CLI help to create textlint rule.

Install

Install with npm:

npm install textlint-scripts --save-dev

Usage

Use textlint-scripts as npm-scripts.

{
    "scripts" : {
        "build": "textlint-scripts build",
        "test": "textlint-scripts test"
    }
}

textlint-scripts build

Build source codes in src/ and output to lib/.

It is built by Babel with env preset.

Additionally, build command inline Node fs calls with babel-plugin-static-fs for browser compatibility.

textlint-scripts test

Test test codes in test/ by Mocha.

Usually test textlint rule using textlint-tester.

Notes: register script

textlint-scripts also provide register script for run-time build. It will help to run tests from your IDE like WebStorm.

# js
mocha --require textlint-scripts/register "test/**/*.js"
# ts
mocha --require textlint-scripts/register-ts "test/**/*.ts"

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

You can’t perform that action at this time.