electrode-io / xarc-run

npm run scripts concurrently and serially, and more.
Apache License 2.0
42 stars 9 forks source link

why did task order change from npm, pkg and files to file, npm and pkg? #10

Closed kishorenekkalapudi closed 6 years ago

kishorenekkalapudi commented 6 years ago

The order changed from npm, pkg ,files(electrode) to file(electrode), npm, pkg in 0.2.21. Scripts are dependent on this order, which order should we follow?

example In 0.2.21

    "_nsOrder": {
        "_namespaces": [
            "electrode",
            "npm",
            "pkg"
        ],
        "_overrides": {
            "electrode": {
                "value": 1,
                "others": []
            },
            "npm": {
                "value": 1,
                "others": []
            },
            "pkg": {
                "value": 1,
                "others": []
            }
        }
    },

In 0.2.20

    "_nsOrder": {
        "_namespaces": [
            "npm",
            "pkg",
            "electrode"
        ],
        "_overrides": {
            "npm": {
                "value": 1,
                "others": []
            },
            "pkg": {
                "value": 1,
                "others": []
            },
            "electrode": {
                "value": 1,
                "others": []
            }
        }
    }
jchip commented 6 years ago

I just verified that order is still npm first, do you have a sample to show otherwise?

$ clap -n
[12:57:51] xclap version 0.2.21 at CWD/node_modules/xclap
[12:57:51] NodeJS version v8.9.4 at /Users/xchen11/.nvm/versions/node/v8.9.4/bin/node
[12:57:51] CWD is /Users/xchen11/dev/tmp
[12:57:51] Applied xclap options from CWD/package.json
[12:57:51] Loaded npm scripts from CWD/package.json into namespace npm
[12:57:51] Loaded xclap tasks from CWD/package.json into namespace pkg
[12:57:51] Loaded tasks from CWD/xclap.js into namespace clap
Namespace 'npm'
Primary Tasks

  test . echo npm

Namespace 'pkg'
Primary Tasks

  test . echo pkg

Namespace 'clap'
Primary Tasks

  test . echo script

clap [options] [--] [task1 [task options] task2 [task options] ...]
 Help: clap -h  Example: clap build

$ clap -n test
[12:57:53] xclap version 0.2.21 at CWD/node_modules/xclap
[12:57:53] NodeJS version v8.9.4 at /Users/xchen11/.nvm/versions/node/v8.9.4/bin/node
[12:57:53] CWD is /Users/xchen11/dev/tmp
[12:57:53] Applied xclap options from CWD/package.json
[12:57:53] Loaded npm scripts from CWD/package.json into namespace npm
[12:57:53] Loaded xclap tasks from CWD/package.json into namespace pkg
[12:57:53] Loaded tasks from CWD/xclap.js into namespace clap
[12:57:53] Added CWD/~/.bin to PATH
[12:57:53] Execute npm/test echo npm
npm
[12:57:53] Done Execute npm/test echo npm (12 ms)
$ 
kishorenekkalapudi commented 6 years ago

thank you @jchip