- ramdisk.git
- bin
- p3x-ramdisk.js
This file ( 1kB ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
#!/usr/bin/env node
//const os = require('os');
//const process = require('process');
//const cores = os.cpus().length < 4 ? 4 : os.cpus().length;
//process.env.UV_THREADPOOL_SIZE = cores;
//console.debug(`P3X sets UV_THREADPOOL_SIZE to ${cores} thread pool`)
if (!require('fs').existsSync(`${__dirname}/../node_modules`)) {
require('child_process').execSync(`cd ${__dirname}/.. && npm install --only=prod`, {
stdio: 'inherit'
});
}
const commander = require('commander');
const utils = require('corifeus-utils');
const pkg = require('../package.json');
const mz = require('mz');
const start = async() => {
// command
// <command> required
// [command] optional
// [command ...] variable options
commander
.version(pkg.version)
.usage('[command]')
.action((command, options) => {
console.error(`unknown command: ${command}`)
})
;
require('../src/command/install')
require('../src/command/start')
require('../src/command/load')
require('../src/command/watch')
require('../src/command/save')
require('../src/command/stop')
require('../src/command/link')
require('../src/command/status')
commander.parse(process.argv);
if (!process.argv.slice(2).length) {
commander.outputHelp();
}
}
start();