@azrico/azcli 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +2 -49
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1,49 +1,2 @@
1
- #!/usr/bin/env node
2
- /* -------------------------------------------------------------------------- */
3
- import chalk from 'chalk';
4
- import figlet from 'figlet';
5
- import get_builder_commands from './libs/builder/index';
6
- import get_clear_commands from './libs/cleaner/index';
7
- import get_yarn_commands from './libs/yarnhelp/index';
8
- import { hideBin } from 'yargs/helpers';
9
- import yargs from 'yargs';
10
- /* -------------------------------------------------------------------------- */
11
- /* Consts */
12
- /* -------------------------------------------------------------------------- */
13
- const header = chalk.red(figlet.textSync('Az-cli', { font: 'Cyberlarge', horizontalLayout: 'full' }));
14
- /* -------------------------------------------------------------------------- */
15
- /* Start */
16
- /* -------------------------------------------------------------------------- */
17
- const yg = yargs(hideBin(process.argv));
18
- yg.usage(header);
19
- /* -------------------------------------------------------------------------- */
20
- applycmd(yg, get_clear_commands());
21
- applycmd(yg, get_builder_commands());
22
- applycmd(yg, get_yarn_commands());
23
- /* -------------------------------------------------------------------------- */
24
- yg.demandCommand(1).options({
25
- quiet: {
26
- alias: ['q', 's'],
27
- describe: 'quiet mode',
28
- demandOption: false,
29
- },
30
- });
31
- /* -------------------------------------------------------------------------- */
32
- const ygresult = yg.parse();
33
- /* -------------------------------------------------------------------------- */
34
- /* Helper functions */
35
- /* -------------------------------------------------------------------------- */
36
- function applycmd(yinstance, cmd) {
37
- if (!yinstance)
38
- return;
39
- if (Array.isArray(cmd)) {
40
- if (Array.isArray(cmd[0])) {
41
- //2D Command
42
- cmd.forEach((sub_cmd) => {
43
- applycmd(yinstance, sub_cmd);
44
- });
45
- }
46
- else
47
- yinstance.command(cmd[0], cmd[1], cmd[2], cmd[3]);
48
- }
49
- }
1
+ #!/usr/bin/env node
2
+ /* -------------------------------------------------------------------------- */"use strict";var _chalk=_interopRequireDefault(require("chalk")),_figlet=_interopRequireDefault(require("figlet")),_index=_interopRequireDefault(require("./libs/builder/index")),_index2=_interopRequireDefault(require("./libs/cleaner/index")),_index3=_interopRequireDefault(require("./libs/yarnhelp/index")),_helpers=require("yargs/helpers"),_yargs=_interopRequireDefault(require("yargs"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}/* -------------------------------------------------------------------------- */ /* Consts */ /* -------------------------------------------------------------------------- */var header=_chalk["default"].red(_figlet["default"].textSync("Az-cli",{font:"Cyberlarge",horizontalLayout:"full"})),yg=(0,_yargs["default"])((0,_helpers.hideBin)(process.argv));/* -------------------------------------------------------------------------- */ /* Start */ /* -------------------------------------------------------------------------- */yg.usage(header),applycmd(yg,(0,_index2["default"])()),applycmd(yg,(0,_index["default"])()),applycmd(yg,(0,_index3["default"])()),yg.demandCommand(1).options({quiet:{alias:["q","s"],describe:"quiet mode",demandOption:!1}});/* -------------------------------------------------------------------------- */var ygresult=yg.parse();/* -------------------------------------------------------------------------- */ /* Helper functions */ /* -------------------------------------------------------------------------- */function applycmd(a,b){!a||Array.isArray(b)&&(Array.isArray(b[0])?b.forEach(function(b){applycmd(a,b)}):a.command(b[0],b[1],b[2],b[3]))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/azcli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/cli.js",
6
6
  "scripts": {