Development
To get the development version of the magpie package, clone this repository and install the dependencies by running npm install in the terminal.
Workflow
branches:
- master - Current stable version.
- development - Development version. This is where new features or bug fixes are pushed. When the version is stable, the branch is merged into master.
(1) Source files
libcontains the Command Line interface as well as the scaffolding files for new magpie projectssrc/contains the main source codedocs.mdEach component folder contains a docs.md which will be prepended to the reference for that sectionAPI.mdThis file is created automatically from the JavaScript source files
styleguidist/contains the initialization code for the reference documentationstyleguidist.config.jscontains the configuration for the reference documentation
(2) Build the docs
Option 1: Build the reference documentation while developing
Use npm run docs command from the magpie-base folder to start a process which watches for changes in the files in src and makes a fully built version of the docs available on your local machine.
Option 2: Make changes to the files and then build the reference documentation
Run npm run docs:build from the magpie-base folder. This command outputs the reference docs in the styleguide folder.
(3) Develop experiments with your local version of magpie-base
In order to install your local version of magpie-base in a magpie project without publishing it first...
- Run
npm linkin the foldermagpie-base - Go to your project folder
- Run
npm install - Run
npm link magpie-baseto install the version of magpie-base that you just rannpm linkin.
(4) Merge into master
- include a changelog information in the README
- merge to master
- update the version of magpie in
package.json
(5) Publish to npm
Run npm publish from the magpie-base folder to publish the new version of magpie.
No build step is required before publishing.