artifact-project / npmy Goto Github PK
View Code? Open in Web Editor NEW`npm/npx/npm link` on steroids.
`npm/npx/npm link` on steroids.
I saw "npm link
on steroids" and thought of this project, which you might be interested in:
Command failed: rsync -a C:\Users{user_name}\Documents\work\projects{path}_bundles C:\Users{win_user}\AppData\Local\Temp{dest} --exclude '.git/'
Reproduction: use README steps on any package on Win machine
Now npmy doesn't add files in node_modules/.bin directory. Will be nice if you add ability to link binaries.
For example:
npmy --rc package-name:/path/to/folder
So the problem I have with current {"%TARGET_DEPENDENCY%": "%LOCAL_PATH_TO_PACKAGE_FOLDER%"}
is that I have two computers that was configured at different times.
So on one computer I have b checkout to
/some/folder/b
On other
/some/other/very/long/folder/that/i/don't/want/to/write/each/time/b
If I could run
cd /some/folder/b
npm link
<--- creates symlink to global npm modules
cd /some/folder/a
npmy link b
<--- resolves global symlink and inserts a real folder to .npmyrc
This would be awesome.
package
{
"name": "package",
"version": "0.0.0",
"description": "Clone of autolink2 with mrg modifications",
"main": "index.js"
}
result
Unhandled Rejection at: Promise Promise {
<rejected> TypeError: Cannot read property 'hasOwnProperty' of undefined
at ObservablePackage.hasHook (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:33:34)
at ObservablePackage.<anonymous> (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:37:22)
at Generator.next (<anonymous>)
at /Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:7:71
at new Promise (<anonymous>)
at __awaiter (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:3:12)
at ObservablePackage.execHook (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:36:16)
at addTask (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/ObservablePackage/ObservablePackage.js:42:33)
at ObservablePackage.<anonymous> (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/ObservablePackage/ObservablePackage.js:152:27)
at Generator.next (<anonymous>) } reason: TypeError: Cannot read property 'hasOwnProperty' of undefined
at ObservablePackage.hasHook (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:33:34)
at ObservablePackage.<anonymous> (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:37:22)
at Generator.next (<anonymous>)
at /Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:7:71
at new Promise (<anonymous>)
at __awaiter (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:3:12)
at ObservablePackage.execHook (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/Package/Package.js:36:16)
at addTask (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/ObservablePackage/ObservablePackage.js:42:33)
at ObservablePackage.<anonymous> (/Users/marinatells/.nvm/versions/node/v8.10.0/lib/node_modules/npmy/src/ObservablePackage/ObservablePackage.js:152:27)
at Generator.next (<anonymous>)
works
{
"name": "package",
"version": "0.0.0",
"description": "Clone of autolink2 with mrg modifications",
"main": "index.js",
"scripts": {}
}
Ubuntu 19.04
nodejs v12.8.0
I get an error if i add more than 2 packages to .npmyrc:
{
"@my/my-blocks": "../my-blocks",
"@my/my-controls": "../my-controls",
"@my/my-sidebar": "../my-sidebar"
}
➜ my-app git:(my-1777) ✗ npmy
NPMy (ctrl+c -> exit)
- tmp: /tmp/_home_user_Projects_work_my-app
---------------------
/home/user/Projects/work/my-app
/
[@my/my-blocks] -> /home/user/Projects/work/my-blocks
[@my/my-sidebar] -> /home/user/Projects/work/my-sidebar
Running
----------------------------
Unhandled Rejection at promise: Promise {
<rejected> RangeError: Maximum call stack size exceeded
at Array.values (<anonymous>)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:25
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:40:35
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:40:35
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
}
Reason: RangeError: Maximum call stack size exceeded
at Array.values (<anonymous>)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:25
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:40:35
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
at /home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:40:35
at Array.reduce (<anonymous>)
at Manager.preparePackage (/home/user/.npm-global/lib/node_modules/npmy/src/Manager/Manager.js:39:18)
----------------------------
I've created a .npmrc:
{
"mylib-web": "../../mylib/web",
"mylib-common": "../../mylib/common"
}
I ran a npmy
, but it has published only one package.
NPMy (ctrl+c -> exit)
- tmp: /tmp
---------------------
/home/user/project/ui
/
[mylib-web] -> /home/user/mylib/web
[mylib-common] -> /home/user/mylib/common
Running
[project] npm install react-hot-loader@"next"
[mylib-common] Start watcher
[mylib-common] Published
(node:5298) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: ENOENT: no such file or directory, unlink '/home/user/project/ui/node_modules/.bin/0'
(node:5298) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Preset:
package A depends on package B
package C depends on A and B
changing B causes republishing of B
wanted:
changing B causes republishing of B and republishing of A
Rollup sees only the first change of development package till i stop rollup and start it again.
Create .npmyrc
automatically upon calling
npmy [path] [--include=pattern]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.