Since I have a pull request out ("keyed-vdom"), and I would like to continue my personal project using my forked version of hyperapp, I tried
npm install zaceno/hyperapp#keyed-vdom
(as well as adding that line to dependencies in my package json and doing npm install).
But that does'nt work... npm pulls down something for me that looks right, but there is no dist/ folder. Nothing gets built. And rollup config file is missing besides.
The only way of getting "my" hyperapp-branch into my project is to:
~~~
cd node_modules
git clone https://github.com/zaceno/hyperapp.git
cd hyperapp
git checkout keyed-vdom
npm install
~~~
I don't know enough about package.json scripts and publishing packages on npm to know if it's possible, but it would be great just to be able to specify a forked repo and branch in the "dependencies": {... of my project. And have npm install just do all the work.
Make sense?
@zaceno I think that wat @dodekeract is saying is that you can remove dist/ from the .gitignore in your fork and then commit the files to git.
You can also use rawgit.
I don't know if there are other options?
Now that the weekend has started, I finally have time to go over the PRs that have been accumulating and start merging stuff.
Thanks for both suggestions @dodekeract & @jbucaran
You can also use local file path 馃槃
From npm cli install docs
npm install <folder>:
Install a package that is sitting in a folder on the filesystem.
@zaceno I am not 100% on this but could you add a postinstall script to the package.json of your fork. It should build the project (thus creating the dist folder and contents) upon install.
"scripts": {
"postinstall": "npm run build"
}
Point npm to your fork of hyperapp in the dependencies of your project
"dependencies": {
"hyperapp": "git://github.com/<user>/<project>.git#<branch>"
}
and run npm install
@lukejacksonn Wouldn't this fail because the development dependencies aren't installed?
I am not 100% on this
@dodekeract are most probably right! 馃槄
@lukejackson thanks for the tip, but even if that worked, I would be adding something to my fork that wouldn't belong in any PR's I make from that fork later. So I don't really need the tips myself so much as want it in the main repo (wishing it was there already).
I'll look into making a PR specifically for this (later, when I'm done with the PR I'm already working on ;) )