Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootlint.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@chrisrebert.com>2015-11-25 11:56:33 +0300
committerChris Rebert <code@chrisrebert.com>2015-11-25 11:59:00 +0300
commite22dd90e7b253c91e71fd7e1454a6d0157c48028 (patch)
treeb5e69e77da622603b4e1dfb15c7551444abfc966
parentd356915d19536b93a10ca6cb69bb86aa145f8782 (diff)
Add cli-main.js which actually invokes cli.js's function; fixes #333
-rw-r--r--.travis.yml6
-rw-r--r--package.json3
-rwxr-xr-xsrc/cli-main.js3
-rw-r--r--[-rwxr-xr-x]src/cli.js1
4 files changed, 8 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index 7a779c6..9bf2272 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,9 +19,9 @@
],
"script": [
"npm test",
- "./src/cli.js bootstrap/_gh_pages/**/index.html",
- "./src/cli.js --disable W003,E001 test/fixtures/doctype/missing.html test/fixtures/viewport/missing.html",
- "./src/cli.js test/fixtures/x-ua-compatible/missing.html &> x-ua-compatible-missing.output.actual.txt",
+ "./src/cli-main.js bootstrap/_gh_pages/**/index.html",
+ "./src/cli-main.js --disable W003,E001 test/fixtures/doctype/missing.html test/fixtures/viewport/missing.html",
+ "./src/cli-main.js test/fixtures/x-ua-compatible/missing.html &> x-ua-compatible-missing.output.actual.txt || true",
"diff test/fixtures/cli/x-ua-compatible-missing.output.txt x-ua-compatible-missing.output.actual.txt"
],
"after_script": [
diff --git a/package.json b/package.json
index d682beb..6a0f231 100644
--- a/package.json
+++ b/package.json
@@ -72,13 +72,14 @@
},
"main": "./src/bootlint.js",
"bin": {
- "bootlint": "./src/cli.js"
+ "bootlint": "./src/cli-main.js"
},
"browser": {
"binary-search": false,
"cheerio": "jquery",
"url": "./src/url.js",
"./src/cli.js": false,
+ "./src/cli-main.js": false,
"./src/location.js": false
},
"files": [
diff --git a/src/cli-main.js b/src/cli-main.js
new file mode 100755
index 0000000..8680a3a
--- /dev/null
+++ b/src/cli-main.js
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+/*eslint-env node */
+require('./cli')();
diff --git a/src/cli.js b/src/cli.js
index 6dfe1c1..c74d544 100755..100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1,4 +1,3 @@
-#!/usr/bin/env node
/*eslint-env node */
/*eslint no-process-exit: 0 */
'use strict';