-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(externs): Resolve externs from node_modules.
- Loading branch information
Kevin Schmidt
committed
Jan 4, 2018
1 parent
dfe407e
commit 3b3050a
Showing
4 changed files
with
87 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
module.exports = { | ||
"extends": "opensphere", | ||
"rules": { | ||
"max-len": [ | ||
1, | ||
120, | ||
4, | ||
{ | ||
"ignoreComments": true, | ||
"ignoreUrls": true | ||
}] | ||
} | ||
"extends": "google", | ||
"parserOptions": { | ||
"ecmaVersion": 6 | ||
}, | ||
"rules": { | ||
// don't dangle commas | ||
"comma-dangle": ["error", "never"], | ||
// pre-ES6 engines need to be able to use objects as maps | ||
"guard-for-in": "off", | ||
// increase max line length | ||
"max-len": ["error", { "code": 120 }], | ||
// This is silly. Negated conditions are highly useful and often much more concise than | ||
// their complements. | ||
"no-negated-condition": "off", | ||
// allow use of var | ||
"no-var": "off" | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
const childProcess = require('child_process'); | ||
const Promise = require('bluebird'); | ||
const path = require('path'); | ||
|
||
const dossierJarPath = path.join(path.dirname(require.resolve('js-dossier/package.json')), 'dossier.jar'); | ||
|
||
let args; | ||
if (process.argv.length < 3) { | ||
console.error('Please provide the js-dossier arguments'); | ||
process.exit(1); | ||
} else { | ||
args = process.argv.slice(2); | ||
} | ||
|
||
const compile = function(args) { | ||
return new Promise(function(resolve, reject) { | ||
let javaArgs = ['-jar', dossierJarPath].concat(args); | ||
|
||
const process = childProcess.spawn('java', javaArgs); | ||
process.stdout.on('data', function(data) { | ||
console.log(data.toString()); | ||
}); | ||
|
||
process.stderr.on('data', function(data) { | ||
console.log(data.toString()); | ||
}); | ||
|
||
process.on('error', function(err) { | ||
throw new Error('js-dossier failed: ' + (err.message || 'Unspecified error')); | ||
}); | ||
|
||
process.on('exit', function(code) { | ||
resolve(); | ||
}); | ||
}); | ||
}; | ||
|
||
compile(args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters