diff --git a/.eslintignore b/.eslintignore index 1d129375..c9d7c3f3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,4 +7,5 @@ jest.config.js czvinyl.config.js webpack.config.js dist -scripts \ No newline at end of file +scripts +bin \ No newline at end of file diff --git a/bin/inflint.js b/bin/inflint.js new file mode 100644 index 00000000..1c443c62 --- /dev/null +++ b/bin/inflint.js @@ -0,0 +1,6 @@ +#!/usr/bin/env node + +// to use V8's code cache to speed up instantiation time +require('v8-compile-cache'); + +require('../dist/index'); diff --git a/package.json b/package.json index 7c0bfe74..5b6ded70 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,12 @@ }, "main": "dist/index.js", "files": [ - "dist/index.js" + "dist/index.js", + "bin" ], + "bin": { + "inflint": "./bin/inflint.js" + }, "scripts": { "preinstall": "is-ci || npx only-allow yarn", "husky:install": "husky install", @@ -52,6 +56,7 @@ "inquirer": "8.2.2", "micromatch": "4.0.5", "minimist": "1.2.6", + "v8-compile-cache": "2.3.0", "yaml": "2.0.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index d55758cd..25447425 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4113,7 +4113,7 @@ v8-compile-cache-lib@^3.0.0: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8" integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA== -v8-compile-cache@^2.0.3: +v8-compile-cache@2.3.0, v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==