@jsenv/cli
v0.3.77
Published
Command Line Interface for jsenv
Readme
@jsenv/cli
Overview
@jsenv/cli is a command-line tool for quickly setting up JavaScript projects with jsenv configurations and best practices.
It provides templates for various project types to get you started immediately.
Installation & Usage
Run the CLI directly with npx:
npx @jsenv/cli
npxcommand is installed with Node.js. If you don't have it, you must install Node.js.
Getting Started
The command initializes jsenv in a directory. It can be a new directory or an existing one.
> npx @jsenv/cli
Welcome in jsenv CLI
? Enter a directory: ›Templates
After specifying a directory, you'll be prompted to select a template:
> npx @jsenv/cli
✔ Enter a directory: › demo
? Select a template: › - Use arrow-keys. Return to submit.
❯ web
web-components
web-react
web-preact
node-packageAvailable Templates
- web: Basic web application with HTML, CSS, and JavaScript
- web-components: Project setup for creating reusable web components
- web-react: React-based web application configuration
- web-preact: Preact-based web application (lighter alternative to React)
- node-package: Configuration for creating a Node.js package
A template is a project pre-configured with jsenv. For example, selecting "web" would initialize the web template:
> npx @jsenv/cli
✔ Enter a directory: › demo
✔ Select a template: › web
✔ init jsenv in "[...]/demo/" (done in 0.01 second)
----- 3 commands to run -----
cd demo
npm install
npm start
-----------------------------Next Steps
After initialization:
- Navigate to your project directory:
cd your-directory - Install dependencies:
npm install - Start the development server:
npm start
