@rivantmedia/next-template
v2.0.0
Published
A project template cli for rivant media
Downloads
5
Readme
How to setup our Template
Right now our npx Template CLI have only one template i.e. NextJs Template.
Prerequisites:
- NodeJS & NPM Installation
Downloading and Installation if a project folder had not been yet created
To install the NextJs Template for @rivantmedia, run the following command
$ npx @rivantmedia/next-template@latest
Give the desired Project Name as shown:
? Project name: project-name-of-your-choice
Them select any of the package installation manager (use arrow keys to navigate and enter to select):
? Which installation package manager would you like to choose?
> npm
pnpm
yarn
Type the following command to run the project:
for NPM
$ cd [project-name] && npm run dev
for PNPM
$ cd [project-name] && pnpm dev
for YARN
$ cd [project-name] && yarn dev
Downloading and Installation if a project folder had been created
To install the NextJs Template for @rivantmedia, run the following command
$ npx @rivantmedia/next-template@latest
Give the "." as Project Name as shown:
? Project name: .
Them select any of the package installation manager (use arrow keys to navigate and enter to select):
? Which installation package manager would you like to choose?
> npm
pnpm
yarn
Type the following command to run the project:
for NPM
$ npm run dev
for PNPM
$ pnpm dev
for YARN
$ yarn dev
How to add more Templates
- Right now our npx Template CLI have only one template i.e. NextJs Template.
- To add more templates, Create a template of your choice with everything you need.
- Make sure that template does not have
package-lock.json
oryarn.lock
orpnpm-lock.yaml
. - Then, you need to add that template in the
template
folder. - After, this commit and publish the package.
- You are now able to select the template of your choice to download and install.
How to select a template if multiple template are present:
$ npx @rivantmedia/next-template@latest
Now you can select any of the template (use arrow keys to navigate and enter to select):
? Which template would you like to choose?
> nextjs-ts-rivant-template
nextjs-js-rivant-template
react-js-rivant-template
react-ts-rivant-template
Give the desired Project Name as shown:
? Project name: project-name-of-your-choice
Them select any of the package installation manager (use arrow keys to navigate and enter to select):
? Which installation package manager would you like to choose?
> npm
pnpm
yarn