0.1.4 • Published 10 years ago
angelscripts-stack-use v0.1.4
angel-stack-use v0.1.4
Manage current working project's stack
usage
install
$ npm install angelscripts-stack-use$ angel stack use
Applies stack upgrade within cwd.
$ angel stack use {remote} {updatePath} {branch}arguments
remote- optional, git repo url or name of stack upgradeupdatePath- relative path to eitherremoteor current working directorybranch- optional, used with gitremoteto specify remote's source code branch
logic behind
- read
upgrade.json(upgrade) from stack upgrade root folder (stackRootFolder)
upgrade.main- pointer to relative directory containing the upgrade files, default''upgrade.name- name of the upgradeupgrade.version- version of the upgradeupgrade.dependencies- key value pairs ofname: versionupgrade.peerUpgrades- key value pairs ofname: relativePath
upgrade.depencenciesshould be present as key instack-upgradeswithinpackage.json- apply stack upgrade - copy recursively all files from
stackRootFolder + upgrade.mainwhere:
.jsonfiles are deep merged.gitignorefiles are rewritten only with the unique lines- any other file is overridden
- apply stack upgrade peers - use the same method as within step 3) for every
upgrade.peerUpgradesmatch towardsstack-upgradeshash frompackage.json - store within
package.json'sstack-upgradeshash the applied upgrade{name: version}
$ angel stack list
List available stack upgrades within cwd.
$ angel stack list$ angel stack configure
Prompt once for unique {{{placeholders}}} within files at cwd and replace them with provided values.
$ angel stack configurehow to create stack upgrade
- create a standard
npm packageasmy-stack-upgrade - place
upgrade.jsonthere - have fun &&
$ mkdir ../my-upgraded-app && cd ../my-upgraded-app && angel stack use ../my-stack-upgrade