Coder Social home page Coder Social logo

inchjs's Issues

Unify config syntax with Inch

Rather than using a specific inch.json file, use a .inch.yml config file.

Even though for InchJS itself, inch.json is more standard for JS projects, for Inch-CI, .inch.yml convention (invisible file, named after the name of a service, in YAML) is aligned with that of many other CI services.

Getting "Could not find jsdoc executable" even if jsdoc exists

Currently, we are finding the jsdoc manually inside the node_modules directory inside the lib:

function getJSDocCommand() {
  var inchjs_dir = Path.join(__dirname, '..', '..');
  var finder = "find "+inchjs_dir+" -type l -name jsdoc";
  var out = sh.exec(finder, {silent: true}).output;
  var found = out.split("\n")[0].trim();
  if( found == "" ) {
    throw("Could not find jsdoc executable");
  } else {
    return found;
  }
}

But with the new version of npm we have flat dependencies, so jsdoc will be installed in the root node_modules directory

So we need to update it and just check if jsdoc exists or not

function getJSDocCommand() {
  try {
    return require('jsdoc/package.json');
  } catch(e) {
    throw("Could not find jsdoc executable");
  }
}

Sending the parsed data directly to runner

So instead of writing to the file-system and passing the filename, then reading it again, it's better and much faster to directly passing the data

So instead of:

function runApiInch(inch_args, filename) {
  inch_args = inch_args || [];
  var json = JSON.parse( fs.readFileSync(filename) );
  json['args'] = inch_args;
  var data = JSON.stringify(json);
  var url = require('url').parse(getInchCliEndPoint());
  var options = {
    host: url.hostname,
    port: url.port,
    path: url.path,
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Content-Length': Buffer.byteLength(data, 'utf8')
    }
  };

Do:

function runApiInch(inch_args, parsed_data) {
  ...
  ...

  var options = {
    host: url.hostname,
    port: url.port,
    path: url.path,
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Content-Length': Buffer.byteLength(parsed_data, 'utf8')
    }
  };

  ...
  ...

  req.write(parsed_data);

And apply that in all other places.

npm install inchjs

I'm tried adding InchJS to a grunt plugin project. After running "npm install inchjs" and trying "inchjs", I get "-bash: inch: command not found"

If I use the full path of the bin, it seems to work...

jd:grunt-jira-actions jd$ node_modules/inchjs/bin/inchjs

# Undocumented:
┃  U  →  group.createJiraIssue_asValidStoryDescrFromOption_should_PASS in /test/createJiraIssue_tests.js
┃  U  →  group.createJiraIssue_asValidStoryWithPriority_should_PASS in /test/createJiraIssue_tests.js
...

When I install globally, it works...

jd:grunt-jira-actions jd$ npm install inchjs -g
/usr/local/bin/inchjs -> /usr/local/lib/node_modules/inchjs/bin/inchjs
[email protected] /usr/local/lib/node_modules/inchjs
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
jd:grunt-jira-actions jd$ inchjs

# Undocumented:
┃  U  →  group.createJiraIssue_asValidStoryDescrFromOption_should_PASS in /test/createJiraIssue_tests.js
┃  U  →  group.createJiraIssue_asValidStoryWithPriority_should_PASS in /test/createJiraIssue_tests.js
┃  U  →  group.createJiraIssue_asValidTaskDescrFromFile_should_PASS in /test/createJiraIssue_tests.js
┃  U  →  group.createJiraIssue_asValidStoryMarkedDone_should_PASS in /test/createJiraIssue_tests.js

Any idea why the --save-dev install isn't working?

@example not identified

take a look at http://inch-ci.org/github/sagiegurari/angular-web-notification
specifically at function webNotification.showNotification
it has an example tag (see below), but i still get
Suggestions:
Add a code example (optional).

webNotification.showNotification('Example Notification', {
body: 'Notification Text...',
icon: 'my-icon.ico'
}, function onShow(error, hide) {
if (error) {
window.alert('Unable to show notification: ' + error.message);
} else {
setTimeout(function hideNotification() {
hide();
}, 5000);
}
});

Language not registered: javascript

I get the following error with inch and inchjs installed:

$ sudo npm install -g inchjs
[sudo] password for aureooms: 
/usr/bin/inchjs -> /usr/lib/node_modules/inchjs/bin/inchjs
[email protected] /usr/lib/node_modules/inchjs
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
$ sudo gem install inch
Fetching: yard-0.8.7.6.gem (100%)
Successfully installed yard-0.8.7.6
Fetching: tins-1.3.5.gem (100%)
Successfully installed tins-1.3.5
Fetching: term-ansicolor-1.3.0.gem (100%)
Successfully installed term-ansicolor-1.3.0
Fetching: sparkr-0.4.1.gem (100%)
Successfully installed sparkr-0.4.1
Fetching: method_source-0.8.2.gem (100%)
Successfully installed method_source-0.8.2
Fetching: slop-3.6.0.gem (100%)
Successfully installed slop-3.6.0
Fetching: coderay-1.1.0.gem (100%)
Successfully installed coderay-1.1.0
Fetching: pry-0.10.1.gem (100%)
Successfully installed pry-0.10.1
Fetching: inch-0.5.10.gem (100%)
Successfully installed inch-0.5.10
Parsing documentation for yard-0.8.7.6
Installing ri documentation for yard-0.8.7.6
Parsing documentation for tins-1.3.5
Installing ri documentation for tins-1.3.5
Parsing documentation for term-ansicolor-1.3.0
Installing ri documentation for term-ansicolor-1.3.0
Parsing documentation for sparkr-0.4.1
Installing ri documentation for sparkr-0.4.1
Parsing documentation for method_source-0.8.2
Installing ri documentation for method_source-0.8.2
Parsing documentation for slop-3.6.0
Installing ri documentation for slop-3.6.0
invalid options: -SNw2
(invalid options are ignored)
Parsing documentation for coderay-1.1.0
Installing ri documentation for coderay-1.1.0
Parsing documentation for pry-0.10.1
Installing ri documentation for pry-0.10.1
Parsing documentation for inch-0.5.10
Installing ri documentation for inch-0.5.10
Done installing documentation for yard, tins, term-ansicolor, sparkr, method_source, slop, coderay, pry, inch after 29 seconds
9 gems installed
$ ls js/src/**/*.js -1
js/src/attr/attr.js
js/src/attr/len.js
js/src/decreasing.js
js/src/fn.js
js/src/increasing.js
js/src/lexicographical/colexicographical.js
js/src/lexicographical/fixedcolexicographical.js
js/src/lexicographical/fixedlexicographical.js
js/src/lexicographical/lexicographical.js
js/src/lexicographical/quasicolexicographical.js
js/src/lexicographical/quasilexicographical.js
js/src/lexicographical/rangedcolexicographical.js
js/src/lexicographical/rangedlexicographical.js
js/src/reverse.js
js/src/sign.js
$ inchjs js/src/**/*.js
/var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/config.rb:13:in `instance': Language not registered: javascript (RuntimeError)
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/config.rb:38:in `for'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command/base.rb:117:in `to_config'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command/base_list.rb:24:in `prepare_codebase'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command/suggest.rb:24:in `run'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command/base.rb:50:in `run'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command_parser.rb:99:in `run_command'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command_parser.rb:62:in `run'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/lib/inch/cli/command_parser.rb:52:in `run'
    from /var/lib/gems/2.1.0/gems/inch-0.5.10/bin/inch:23:in `<top (required)>'
    from /usr/local/bin/inch:23:in `load'
    from /usr/local/bin/inch:23:in `<main>'

While the error looks like a complete crash, it is able to generate a docs.json file:

$ cat docs.json 
{"language":"javascript","client_name":"inchjs","args":[],"client_version":"0.2.17","git_repo_url":"https://[email protected]/aureooms/js-compare","branch_name":"master","objects":[{"comment":"","meta":{"range":[5,118],"filename":"attr.js","lineno":2,"path":"/js/src/attr","code":{"id":"astnode494753372","name":"attr","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","key"]},"vars":{"":false}},"undocumented":true,"name":"attr","kind":"function","longname":"attr","scope":"global"},{"comment":"","meta":{"range":[5,115],"filename":"len.js","lineno":2,"path":"/js/src/attr","code":{"id":"astnode99403445","name":"len","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"undocumented":true,"name":"len","kind":"function","longname":"len","scope":"global"},{"comment":"","meta":{"range":[5,89],"filename":"decreasing.js","lineno":2,"path":"/js/src","code":{"id":"astnode1875923134","name":"decreasing","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["a","b"]}},"undocumented":true,"name":"decreasing","kind":"function","longname":"decreasing","scope":"global"},{"comment":"","meta":{"range":[5,135],"filename":"fn.js","lineno":2,"path":"/js/src","code":{"id":"astnode2064783959","name":"fn","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","callable"]},"vars":{"":false}},"undocumented":true,"name":"fn","kind":"function","longname":"fn","scope":"global"},{"comment":"","meta":{"range":[5,89],"filename":"increasing.js","lineno":2,"path":"/js/src","code":{"id":"astnode278908925","name":"increasing","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["a","b"]}},"undocumented":true,"name":"increasing","kind":"function","longname":"increasing","scope":"global"},{"comment":"/**\n* Generates a binary colexicographical comparator\n* from a binary comparator.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n*\n* compare( a, b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n* compare should express an increasing ordering\n*/","meta":{"range":[358,716],"filename":"colexicographical.js","lineno":16,"path":"/js/src/lexicographical","code":{"id":"astnode99199079","name":"colexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"description":"Generates a binary colexicographical comparator\nfrom a binary comparator.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n\ncompare( a, b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b\n\ncompare should express an increasing ordering","name":"colexicographical","kind":"function","longname":"colexicographical","scope":"global"},{"comment":"/**\n* Generates a binary colexicographical comparator for fixed size arrays.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n*\n* compare( a , b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n*/","meta":{"range":[304,617],"filename":"fixedcolexicographical.js","lineno":14,"path":"/js/src/lexicographical","code":{"id":"astnode1085947180","name":"fixedcolexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","len"]},"vars":{"":false}},"description":"Generates a binary colexicographical comparator for fixed size arrays.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n\ncompare( a , b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b","name":"fixedcolexicographical","kind":"function","longname":"fixedcolexicographical","scope":"global"},{"comment":"/**\n* Generates a binary lexicographical comparator for fixed size arrays.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order\n*\n* compare( a , b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n*/","meta":{"range":[280,596],"filename":"fixedlexicographical.js","lineno":14,"path":"/js/src/lexicographical","code":{"id":"astnode1400175288","name":"fixedlexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","len"]},"vars":{"":false}},"description":"Generates a binary lexicographical comparator for fixed size arrays.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order\n\ncompare( a , b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b","name":"fixedlexicographical","kind":"function","longname":"fixedlexicographical","scope":"global"},{"comment":"/**\n* Generates a binary lexicographical comparator\n* from a binary comparator.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order\n*\n* compare( a, b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n* compare should express an increasing ordering\n*/","meta":{"range":[334,683],"filename":"lexicographical.js","lineno":16,"path":"/js/src/lexicographical","code":{"id":"astnode204592882","name":"lexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"description":"Generates a binary lexicographical comparator\nfrom a binary comparator.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order\n\ncompare( a, b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b\n\ncompare should express an increasing ordering","name":"lexicographical","kind":"function","longname":"lexicographical","scope":"global"},{"comment":"/**\n* Generates a binary quasicolexicographical comparator\n* from a binary comparator.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order\n* https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n*\n* compare( a, b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n* compare should express an increasing ordering\n*/","meta":{"range":[444,849],"filename":"quasicolexicographical.js","lineno":17,"path":"/js/src/lexicographical","code":{"id":"astnode546561740","name":"quasicolexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"description":"Generates a binary quasicolexicographical comparator\nfrom a binary comparator.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n\ncompare( a, b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b\n\ncompare should express an increasing ordering","name":"quasicolexicographical","kind":"function","longname":"quasicolexicographical","scope":"global"},{"comment":"/**\n* Generates a binary quasilexicographical comparator\n* from a binary comparator.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order\n*\n* compare( a, b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n* compare should express an increasing ordering\n*/","meta":{"range":[365,761],"filename":"quasilexicographical.js","lineno":16,"path":"/js/src/lexicographical","code":{"id":"astnode764191203","name":"quasilexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"description":"Generates a binary quasilexicographical comparator\nfrom a binary comparator.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Quasi-lexicographic_order\n\ncompare( a, b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b\n\ncompare should express an increasing ordering","name":"quasilexicographical","kind":"function","longname":"quasilexicographical","scope":"global"},{"comment":"/**\n* Generates a binary colexicographical comparator for ranges of arrays.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n*\n* compare( a , b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n*/","meta":{"range":[303,636],"filename":"rangedcolexicographical.js","lineno":14,"path":"/js/src/lexicographical","code":{"id":"astnode1219450701","name":"rangedcolexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","begin","end"]},"vars":{"":false}},"description":"Generates a binary colexicographical comparator for ranges of arrays.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order\n\ncompare( a , b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b","name":"rangedcolexicographical","kind":"function","longname":"rangedcolexicographical","scope":"global"},{"comment":"/**\n* Generates a binary lexicographical comparator for ranges of arrays.\n*\n* https://en.wikipedia.org/wiki/Lexicographical_order\n*\n* compare( a , b ) should always return\n*   - a negative value if a < b\n*   - a positive value if a > b\n*   - zero if a === b\n*\n*/","meta":{"range":[279,610],"filename":"rangedlexicographical.js","lineno":14,"path":"/js/src/lexicographical","code":{"id":"astnode1227528003","name":"rangedlexicographical","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare","begin","end"]},"vars":{"":false}},"description":"Generates a binary lexicographical comparator for ranges of arrays.\n\nhttps://en.wikipedia.org/wiki/Lexicographical_order\n\ncompare( a , b ) should always return\n  - a negative value if a < b\n  - a positive value if a > b\n  - zero if a === b","name":"rangedlexicographical","kind":"function","longname":"rangedlexicographical","scope":"global"},{"comment":"","meta":{"range":[5,105],"filename":"reverse.js","lineno":2,"path":"/js/src","code":{"id":"astnode314589054","name":"reverse","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["compare"]},"vars":{"":false}},"undocumented":true,"name":"reverse","kind":"function","longname":"reverse","scope":"global"},{"comment":"","meta":{"range":[5,69],"filename":"sign.js","lineno":2,"path":"/js/src","code":{"id":"astnode158016789","name":"sign","type":"FUNCTION","node":"<Object>","value":"FUNCTION","paramnames":["v"]}},"undocumented":true,"name":"sign","kind":"function","longname":"sign","scope":"global"}]}

Use "jsdoc-api" lib instead of "jsdoc" cli

Why jsdoc-api?

A programmatic interface for jsdoc3 with a few features:

Sync and async (Promise) interfaces on the two main jsdoc operations ('explain' and 'render documentation').
Input (source code) can supplied as a string or set of file names/globs.
Optional caching, dramatically speeding up future invocations with the same input.
Supports html input

[InchJS] Parsing failed. on windows

It is because find on windows is a different one. https://github.com/rrrene/inchjs/blob/master/lib/docs/jsdoc_runner.js#L49

Just tested simply return "jsdoc"; because i have installed this global. But then it returns only the js doc commandline help. Seems that shelljs does not pass parms correctly on windows.
Do you think it is possible to require("jsdocs") or something like that to avoid shell issues over different platforms? It is not optimal that {silent: true} eats all shell errors.

Improve show command

Will be great, if inchjs could support show command more in depth, like it done in inch.

When I'm calling inchjs show, I'm expecting to get an output similar to this one:

$ inch show Inch::SourceParser#find_object

# Inch::SourceParser#find_object

┃ -> lib/inch/source_parser.rb:16
┃ ------------------------------------------------------
┃ Grade: C - Needs work
┃ ------------------------------------------------------
┃ + Add a comment describing the method
┃ + Describe the parameter 'path'
┃ + Describe the return type of 'find_object'
┃ + Add a code example (optional)
┃ ------------------------------------------------------

Getting "301 Moved Permanently" when run locally

When I'm trying to run inchjs locally, I'm getting the following:

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.2.1</center>
</body>
</html>

After some debugging I found that the issue is with using http module, and now the API endpoint is moved to https://inch-ci.org/api/v1/cli (http >> https)

[InchJS] Parsing failed using v10.16.0

Node version: v10.16.0
npm version: 6.9.0

I tried installing InchJS using

npm install inchjs --save-dev

But it gave me the following error

found 1 high severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details

The result of npm audit

│ High │ Regular Expression Denial of Service
│ Package │ minimatch
│ Patched in │ >=3.0.2
│ Dependency of │ inchjs [dev]
│ Path │ inchjs > glob > minimatch
│ More info │ https://npmjs.com/advisories/118

When i tried to run npm audit fix as suggested, the issue was not fixed and i got:

npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
removed 4 packages in 17.92s
fixed 0 of 1 vulnerability in 886146 scanned packages
  1 vulnerability required manual review and could not be updated

SyntaxError: Unexpected end of input

Just installed inchjs and I got :

$ git clone [email protected]:FGRibreau/doxx.git
$ cd doxx
$ npm install inchjs -g
$ inchjs suggest **/**.js

undefined:0

^
SyntaxError: Unexpected end of input
    at Object.parse (native)
    at Socket.<anonymous> (/Users/fg/.nvm/v0.10.35/lib/node_modules/inchjs/lib/docs/jsdoc_runner.js:23:24)
    at Socket.emit (events.js:117:20)
    at Pipe.close (net.js:466:12)

inchjs: v0.1.6
nodejs : v0.10.35

Any idea @rrrene ?

Problem using inchjs . "Parsing failed."

Hi.

I am beginner in node js and want to use this module for jsdoc code coverage measurement.
It was used for this jsdoc

/**
 * @summary ثبت نام یک سامانه
 * @param {!Object} request.data 
 * @param {!String} request.data.username 
 * @param {!String} request.data.password 
 * @param {!Object} request.headers 
 * @param {!String} request.headers.user 
 * @return {undefined}
 */

and run in command line with "inches ... .js" but return " [InchJS] Parsing failed.".

Do you know what caused this problem?

es6 syntax support

Trying to run inchjs on the following file

$ cat js/src/map/map.js 

let map = function* ( callable , iterable ) {

    for ( let item of iterable ) yield callable( item ) ;

} ;

exports.map = map ;

I get a parsing error

$ inchjs js/src/map/map.js

[InchJS] Parsing failed.

How difficult would it be to allow es6 syntax in inch/inchjs?

Problems running InchJS

Hi,

I'm running into problems running InchJS. When I run

yarn add inchjs
yarn global add inchjs
node node_modules/.bin/inchjs
node /home/***/.yarn/bin/inchjs 

I get the following

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.2.1</center>
</body>
</html>

The files contain the following content:

#!/usr/bin/env node

(function() {
  'use strict';

  var Inch = require('../lib/inch'),
      options = {},
      inch_args = process.argv.slice(2, process.argv.length);

  if( inch_args == '-v' || inch_args == '--version' ) {
    console.log("inchjs "+Inch.version)
  } else if( inch_args == '--dry-run' ) {
    options.dry_run = true;
    inch_args = [];
  }

  if( inch_args == '--report' ) {
    Inch.report();
  } else {
    Inch.run(inch_args, options);
  }
})();

Do you know what caused this problem?

[InchJS] Parsing failed with node v4.1.2 and v5.0.0

Note that I'm not running inchjs over any es6 code. Works fine with node v0.12.7.

[InchJS] Parsing failed.

npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/boris/.nvm/versions/node/v4.1.2/bin/node" "/Users/boris/.nvm/versions/node/v4.1.2/bin/npm" "run" "inch" "echo" "1"
npm ERR! node v4.1.2
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.