spawn node-gyp
This commit is contained in:
parent
53dfe6a62a
commit
8821ce9fee
28
bin/build.js
28
bin/build.js
@ -2,19 +2,19 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
// const cp = require('child_process');
|
const cp = require('child_process');
|
||||||
const llparse = require('llparse');
|
const llparse = require('llparse');
|
||||||
|
|
||||||
// const gyp = cb => {
|
const gyp = cb => {
|
||||||
// console.log('build');
|
console.log('build');
|
||||||
// const proc = cp.spawn('node-gyp', ['configure', 'build']);
|
const proc = cp.spawn('node-gyp', ['configure', 'build']);
|
||||||
// proc.stderr.on('data', data => {
|
proc.stderr.on('data', data => {
|
||||||
// console.error(data.toString());
|
console.error(data.toString());
|
||||||
// });
|
});
|
||||||
// proc.on('close', (cb || (() => {
|
proc.on('close', (cb || (() => {
|
||||||
// console.log('done');
|
console.log('done');
|
||||||
// })));
|
})));
|
||||||
// };
|
};
|
||||||
|
|
||||||
const objection = lut => arg => arg.split(/\s+/).reduce((res, key) => {
|
const objection = lut => arg => arg.split(/\s+/).reduce((res, key) => {
|
||||||
if (lut[key] === undefined) {
|
if (lut[key] === undefined) {
|
||||||
@ -43,7 +43,7 @@ const properties = {
|
|||||||
napi_env: 'ptr'
|
napi_env: 'ptr'
|
||||||
};
|
};
|
||||||
|
|
||||||
const generate = (/* cb */) => {
|
const generate = (cb) => {
|
||||||
// const llparseDot = require('llparse-dot');
|
// const llparseDot = require('llparse-dot');
|
||||||
|
|
||||||
const prj = 'vcd_parser';
|
const prj = 'vcd_parser';
|
||||||
@ -281,9 +281,9 @@ const generate = (/* cb */) => {
|
|||||||
// const dot = new llparseDot.Dot();
|
// const dot = new llparseDot.Dot();
|
||||||
// fs.writeFileSync(prj + '.dot', dot.build(declaration));
|
// fs.writeFileSync(prj + '.dot', dot.build(declaration));
|
||||||
|
|
||||||
// cb();
|
cb();
|
||||||
};
|
};
|
||||||
|
|
||||||
generate(/* gyp */);
|
generate(gyp);
|
||||||
|
|
||||||
/* eslint camelcase: 0 */
|
/* eslint camelcase: 0 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user