0.6.1 • Published 2 years ago

tsnew v0.6.1

Weekly downloads
252
License
MIT
Repository
github
Last release
2 years ago

🆕 tsnew

🚧 COMING SOON - Experimental stage. Not ready for public usage yet.

Code scaffolding tool for TypeScript projects.

⏩ Set up tsnew in your project

  1. Install tsnew as a development dependency:
npm install tsnew --save-dev
  1. Run the interactive prompt:
npx tsnew

🔠 Template API

Templates are defined in .template.ts files:

import { defineTemplate } from 'tsnew';

export default defineTemplate({
  input: {
    name: { type: 'text', message: 'What is the name of this feature?' },
    jsx: { type: 'confirm', message: 'Will this feature have components?' },
  },
  path: async ({ input }) =>
    `features/${input.name}.${input.jsx ? 'tsx' : 'ts'}`,
  content: async ({ input }) =>
    `// Starter file for the ${input.name} feature.`,
});

Templating with tsnew is powerful! You can import other packages and run asynchronous data processing.

🎦 Development

The contribution experience is still a work in progress.

Prerequisites: NVM

  1. nvm use
  2. npm install
  3. npm run dev
  4. npm link

You can now run tsnew commands.

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago