modernist
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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.

yarn add modernist

Example

// .modernistrc.js
module.exports = {
  example({ name }) {
    return {
      [name]: ({ name }) => `Hello, ${name}!`,
    };
  },
};

Now when you run

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.

Readme

Keywords

none

Package Sidebar

Install

npm i modernist

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

9.41 kB

Total Files

6

Last publish

Collaborators

  • danielkov