0.6.1 • Published 12 months ago

tsnew v0.6.1

Weekly downloads
252
License
MIT
Repository
github
Last release
12 months 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

12 months ago

0.4.1

12 months ago

0.4.0

12 months ago

0.6.1

12 months ago

0.6.0

12 months ago

0.1.0

1 year ago

0.3.0

12 months ago

0.2.0

1 year ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago