scripts-sort

0.0.2 • Public • Published

scripts-sort

Sort package.scripts.

Installation

npm i scripts-sort -S

Usage

const { sortScripts } = require('scripts-sort');
 
const result = sortScripts({
  open: 'open',
 
  /*
   * This task is treated as without modifier, because the task `x` not exists.
   */
  prex: 'prex',
 
  /*
   * This task is treated as one with modifier.
   */
  prey: 'prey',
  y: 'y',
 
  test: 'test',
  pretest: 'pretest',
  prepare: 'prepare',
 
  /*
   * This task is treated as without modifier, even if `install` not exists.
   */
  preinstall: 'preinstall',
});
 
console.dir(result);
 
// { preinstall: 'preinstall',
//   open: 'open',
//   prepare: 'prepare',
//   prex: 'prex',
//   pretest: 'pretest',
//   test: 'test',
//   prey: 'prey',
//   y: 'y' }

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i scripts-sort

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

5.47 kB

Total Files

3

Last publish

Collaborators

  • nak2k