cyto
v0.6.2
Published
A better boilerplate generator
Downloads
34
Readme
A declarative boilerplate generator designed to help you write less meaningless code.
Installation
Cyto is primarily meant to be used as a global command line tool:
> yarn global add cyto
# or `npm install -g cyto`
> cyto init
Note: If you installed yarn
via homebrew, you may need to update your config. Following the steps outlined in this comment should resolve that.
Cyto can also be used as a library in any node.js application (more on this later)
Why Use Cyto?
Boilerplate generation is not a new problem. Many libraries have tried to solve this issue before, the most notable being Yeoman. Yeoman was and still is great for spinning up boilerplate projects and has undoubtedly shaped how many people develop applications today. However, I've always some issues with it's approach to boilerplate generation, the most major being that it always felt like too much work to create your own generators. The Yeoman API is dense, to say the least, and although it does a lot for you, any truly useful generator always seemed to turn into a massive codebase on it's own (check out the Yeoman Angular generator as an example). I've always felt that boilerplate generation is a hard problem to solve because every developer has slightly different preferences. If you can't create your own generator easily, you're forced to use generators written by others. These almost always do too much or too little and lock you into someone else's design choices, which can be irritating at best and more work in the long run at worst.
Cyto is different. While Yeoman solves boilerplate generation through an imperative API, Cyto is declarative. Instead of programming out what actions to take in a generator, Cyto instead requires that you declare what you need through templates. By following a simple yet powerful declarative API, these templates are smaller, easier to reuse, and simpler to reason about than Yeoman generators.
Docs
- Getting Started
- Argument Types
- Creating Your Own Template
- Composing Templates
- Runtime Dependencies
- Partial Templates
- Base Templates
- Template Options
- Best Practices
- API Reference
Contributing
- Read the docs on contributing here and sign the CLA
- Clone this repository
- Run
yarn
ornpm i
- Run
npm run watch
and leave it running - Run
npm link
in a separate terminal - You should now have the cyto command installed! It will update with your latest changes while you have
npm watch
active
Contributors
Cyto is written and maintained by Connor Taylor @taylorc93. However, it wouldn't have been possible without the help of these amazing people:
- Scott Staniewicz scottstanie
- For all of the documentation edits and user testing
- Alicia Payette apayette
- For designing the awesome logo
- Alex Kasemir annarichardson
- For documentation edits and user testing
- Anna Richardson alexkasemir
- For user testing