@rivantmedia/next-template
v2.0.0
Published
A project template cli for rivant media
Downloads
18
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@latestGive the desired Project Name as shown:
? Project name: project-name-of-your-choiceThem 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
yarnType the following command to run the project:
for NPM
$ cd [project-name] && npm run devfor PNPM
$ cd [project-name] && pnpm devfor YARN
$ cd [project-name] && yarn devDownloading and Installation if a project folder had been created
To install the NextJs Template for @rivantmedia, run the following command
$ npx @rivantmedia/next-template@latestGive 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
yarnType the following command to run the project:
for NPM
$ npm run devfor PNPM
$ pnpm devfor YARN
$ yarn devHow 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.jsonoryarn.lockorpnpm-lock.yaml. - Then, you need to add that template in the
templatefolder. - 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@latestNow 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-templateGive the desired Project Name as shown:
? Project name: project-name-of-your-choiceThem 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