mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Revert "allow "npm link" of the tool (#4974)"
This reverts commit e8f179e84d
.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
// tslint:disable: no-var-requires adf-file-name
|
||||
|
||||
const minimist = require('minimist');
|
||||
const path = require('path');
|
||||
|
||||
@@ -8,11 +6,12 @@ const args = minimist(process.argv.slice(2), {
|
||||
boolean: ['verbose']
|
||||
});
|
||||
const scriptName = args._.shift();
|
||||
const scriptPath = path.join(__dirname, 'scripts', scriptName);
|
||||
const scriptPath = path.join('../scripts', scriptName);
|
||||
|
||||
const cwd = process.cwd();
|
||||
process.chdir(path.join(__dirname, '..'));
|
||||
|
||||
|
||||
// This might get awkward, so we fallback to console if there was an error.
|
||||
let logger = null;
|
||||
try {
|
||||
@@ -30,7 +29,6 @@ try {
|
||||
case 'warn': color = yellow; break;
|
||||
case 'error': color = red; output = process.stderr; break;
|
||||
case 'fatal': color = x => bold(red(x)); output = process.stderr; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
output.write(color(entry.message) + '\n');
|
||||
@@ -43,10 +41,11 @@ try {
|
||||
warn: console.warn.bind(console),
|
||||
error: console.error.bind(console),
|
||||
fatal: x => { console.error(x); process.exit(100); },
|
||||
createChild: () => logger
|
||||
createChild: () => logger,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
Promise.resolve()
|
||||
.then(() => require(scriptPath).default(args, logger, cwd))
|
||||
|
Reference in New Issue
Block a user