Skip to content

Commit

Permalink
https://github.com/yarnpkg/yarn/issues/3937
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Jan 28, 2020
1 parent a0598d8 commit b051d87
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,4 @@ node_modules/.cache
.yarn-integrity
jest.config.d.ts
jest.config.js.map
/.npmignore
15 changes: 14 additions & 1 deletion packages/ypx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,30 @@

`npx` equivalent in yarn

this module name is `ynpx` not `ypx`

i wanna use `ypx` for module name, but there already has a fake one on npm modules

## install

```bash
yarn add ynpx
npm install -g ynpx
```

```
ynpx -p esm -p mocha --prefer-offline -- "!(node_modules)/**/*.{test,spec}.{ts,tsx}"
```

### alias

> after install u can use alias name for start it
```
ypnx mocha
yypx mocha
ypx mocha
```

## links

- https://github.com/yarnpkg/yarn/issues/3937
Expand Down
6 changes: 3 additions & 3 deletions packages/ypx/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ypx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function YPX(argv: ITSRequiredWith<Arguments<{
})
;

console.dir(argv);
//console.dir(argv);

await crossSpawnExtra('yarn', [
'add',
Expand Down
50 changes: 42 additions & 8 deletions packages/ypx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,44 @@
"name": "ynpx",
"version": "1.0.0",
"description": "`npx` equivalent in yarn",
"keywords": [
"yarn",
"run",
"local",
"bin",
"scripts",
"script",
"package",
"project",
"npx",
"npm",
"npm exec",
"shell",
"npm bin",
"cli",
"ypx",
"ynpx",
"yypx",
"npm run",
"yarn run",
"alias",
"global"
],
"homepage": "https://github.com/bluelovers/ws-ypx/tree/master/packages/ypx#readme",
"bugs": {
"url": "https://github.com/bluelovers/ws-ypx/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bluelovers/ws-ypx.git"
},
"license": "ISC",
"author": "",
"main": "index.js",
"bin": {
"yypx": "bin/ypx.js",
"ynpx": "bin/ypx.js",
"ypx": "bin/ypx.js"
"ypx": "bin/ypx.js",
"yypx": "bin/ypx.js"
},
"directories": {
"lib": "lib"
Expand Down Expand Up @@ -40,9 +71,6 @@
"yargs-parser-extra": "^1.0.2"
},
"devDependencies": {
"ink": "^2.6.0",
"react": "^16.12.0",
"yargs": "^15.1.0",
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
Expand All @@ -56,10 +84,16 @@
"@types/babel__core": "^7.1.3",
"@types/bluebird": "^3.5.29",
"@types/fs-extra": "^8.0.1",
"@types/node": "^7.8.3",
"@types/node": "^13.5.0",
"@types/react": "^16.9.19",
"@types/tmp": "^0.1.0",
"@types/yargs": "^15.0.2",
"babel-plugin-const-enum": "^0.0.5"
"babel-plugin-const-enum": "^0.0.5",
"ink": "^2.6.0",
"react": "^16.12.0",
"yargs": "^15.1.0"
},
"peerDependencies": {
"yarn": "^1.21.1"
}
}
}

0 comments on commit b051d87

Please sign in to comment.