Create a new project with exp init
exp init
is a command-line tool that helps you create a new project from scratch. Here's a step-by-step guide on how to use it:
Prerequisites:
- Make sure you have Node.js installed on your system.
- Install
exp init
globally by runningnpm install -g exp init
oryarn global add exp init
.
Creating a new project:
- Open your terminal or command prompt.
- Run the following command to create a new project:
exp init <project-name>
Replace<project-name>
with the name of your project.
For example: exp init my-new-project
- Follow the prompts to set up your project:
a. Choose a template: You'll be presented with a list of templates to choose from. These templates provide a basic structure for your project. You can choose from popular frameworks like React, Angular, Vue.js, or start from a blank slate.
b. Set up your project name and description: Enter a name and description for your project.
c. Choose a package manager: You can choose between npm and yarn as your package manager.
d. Set up your project structure: You can choose to use a default structure or customize it to your liking.
e. Initialize your project: Once you've made your choices, exp init
will create a new project directory with the chosen template and structure.
Example output:
Here's an example of what the output might look like:
? Choose a template: (Use arrow keys)
> React
> Angular
> Vue.js
> Blank Slate
? Project name: my-new-project
? Project description: A new project created with exp init
? Choose a package manager: (Use arrow keys)
> npm
> yarn
? Set up project structure: (Use arrow keys)
> Default structure
> Customize structure
? Initialize project: Creating project directory...
? Initializing project...
? Project initialized successfully!
Your new project is ready to go! Run `cd my-new-project` and `npm start` to get started.
That's it! You've successfully created a new project using exp init
.