https://github.com/danielkov/modernist
Automagic 🦄 Project Scaffolding with Code Generation.
https://github.com/danielkov/modernist
Last synced: about 1 year ago
JSON representation
Automagic 🦄 Project Scaffolding with Code Generation.
- Host: GitHub
- URL: https://github.com/danielkov/modernist
- Owner: danielkov
- License: mit
- Created: 2019-11-21T16:41:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-02T22:10:46.000Z (about 1 year ago)
- Last Synced: 2025-05-02T23:19:55.856Z (about 1 year ago)
- Language: TypeScript
- Size: 505 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Modernist - Automagic 🦄 Project Scaffolding with Code Generation.
Use Modernist to build generate code for your projects or as a tool for more complex code generation needs.
The CLI requires a file named `.modernistrc.js` anywhere in the directory tree you're in, e.g.: next to `package.json`.
```sh
yarn add modernist
```
## Example
```js
// .modernistrc.js
module.exports = {
example({ name }) {
return {
[name]: ({ name }) => `Hello, ${name}!`
};
}
};
```
Now when you run
```sh
modernist example --name World
```
The following structure will be generated (relative to `.modernistrc.js`):
```
.modernistrc.js
└── World # with the contents: Hello, World!
```
It also supports async functions for template and structure generation.
More complex example can be found in this repository in [`.modernistrc.js`](./.modernistrc.js).