How to use the aurelia-cli.NPM function in aurelia-cli

To help you get started, we’ve selected a few aurelia-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / aurelia / test / js-framework-benchmark / frameworks / keyed / aurelia / aurelia_project / tasks / run.ts View on Github external
import { NPM } from 'aurelia-cli';
import * as kill from 'tree-kill';

const npm =  new NPM();

const run = () => {
  console.log('`au run` is an alias of the `npm start`, you may use either of those; see README for more details.');
  const args = process.argv.slice(3);
  return npm.run('start', ['--', ...args]);
};

const shutdownAppServer = () => {
  if (npm.proc) {
    kill(npm.proc.pid);
  }
};

export { run as default, shutdownAppServer };
github aurelia / aurelia / test / js-framework-benchmark / frameworks / keyed / aurelia / aurelia_project / tasks / build.ts View on Github external
export default function () {
  console.log('`au build` is an alias of the `npm run build`, you may use either of those; see README for more details.');

  const args = process.argv.slice(3);
  return (new NPM()).run('run', ['build', '--', ...args]);
}