glyphhanger запустить из под gulp
Task
const fonts = (cb) => {
child_process.exec(
`glyphhanger --formats=woff2 --subset="My-mega-font.ttf"`,
{
cwd: path.resolve(__dirname, 'fonts'),
},
(error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
}
console.log(`stderr: ${stderr}`);
console.log(`stdout: ${stdout}`);
}
)
cb()
}
Output:
(node:19432) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19432) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:19432) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:19432) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:19432) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:19432) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
[02:10:58] Using gulpfile XXXXX\src\gulpfile.js
[02:10:58] Starting 'fonts'...
[02:10:58] Finished 'fonts' after
Я так понимаю что он не может вызвать сам glyphhanger или что то в этом роде, т.к. просто в консоли это работает
UPD Дело даже не в gulp, это просто не работает в ноде