magicspace
magicspace copied to clipboard
Toolkit for living boilerplate.
Magicspace
Toolkit for living boilerplate.
Features
- Composable boilerplate mechanism.
- Git-powered conflict resolution for boilerplate update.
Installation
npm install --global magicspace
# Install a boilerplate package
npm install --global @mufan/code-boilerplates
Usage
Initialize
-
Initialize Git repository.
-
Create magicspace configuration file:
# Assuming you have installed both `magicspace` and `makeflow/mufan-code-boilerplates` globally. magicspace create @mufan/code-boilerplates/typescript --schemaReview the generated
.magicspace/boilerplate.jsonfile and make relevant changes. -
Initialize magicspace:
magicspace initMagicspace will generate an initial patch and merge it into the current branch without committing changes.
-
Review generated changes, resolve conflicts if any (probably none as we are initializing an empty project).
-
Commit changes to complete the merge process initiated by magicspace; otherwise use
git merge --abortto abort the initialization.You would probably want to abort the merge process and initialize magicspace again if you need to make other changes to the configuration file during this process.
Update
-
After updating the boilerplate package or making changes to the magicspace configuration file:
magicspace updateMagicspace will generate an update patch and merge it into the current branch without committing changes.
-
Review generated changes and resolve conflicts if any.
-
Commit changes to complete the merge process initiated by magicspace; otherwise use
git merge --abortto abort the update.
Boilerplate authoring
Examples
- Boilerplate URL
- Mufan Code Boilerplates
License
MIT License.