A custom python application that serves as command line tool to better manage npm applications with
child modules. The npm
documentation says that npm link
should be used for that.
However, this approach is not very elegant, and particularly useless when you have different versions
of the same module in different contexts, as npm link
works globally. Furthermore, npm link
is not working
that well under Windows.
The screwdriver
manages npm modules manually, cloning modules which have a git version field, and using npm install
for others.
dependencies: {
"handlebars": "*",
"substance": "substance/substance#master",
"other": "substance/other#ea60d5e057bc1c6dcee62346a6433b01cbfeeb2c",
}
Only those modules are considered as source modules which have non-SHA-1 branch tag. In the above example, "substance" would be cloned as a git repo, but other
would be installed via npm install
.
Clone the Screwdriver repository into some arbitrary folder:
$ git clone https://github.com/substance/screwdriver.git
Run setup:
$ cd screwdriver
$ sudo python setup.py install --record screwdriver.files
Ǹow you should be able to run the Screwdriver app from command line:
$ screwdriver --help
You can remove all files using:
$ cd screwdriver
$ sudo rm $(cat screwdriver.files)
-
git checkout -b :branch_name
-
Adapt
package.json
if you want to switch to a dev branch of a module (optional) -
screwdriver --update
(necessary after switching a branch of a module) -
Do development
-
Bump module shas (optional)
-
Merge changes back into master
-
Commit and push changes
-
screwdriver --update
(necessary if you were on a branch of a module)