You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesi贸n a prueba de IA

Antes: $249

Currency
$209
Suscr铆bete

Termina en:

1 D铆as
4 Hrs
18 Min
3 Seg

Primeros pasos en Parcel

10/23
Resources

What is Parcel and why use it?

Parcel is a tool considered to be one of the most efficient modern packers for JavaScript and other web languages. This tool stands out for its ease of use and minimal configuration, as it does not require complex configuration files to start working. It automatically detects your project's entry point, analyzes the code and generates what you need to put it into production. This makes it an attractive option for developers looking to optimize and deploy applications quickly and seamlessly.

What are the advantages of using Parcel?

  • Minimal configuration: No need to create complex configuration files.
  • Automatic detection: Detects your application's entry point and analyzes the project.
  • Resources for optimization: Offers plugins and resources to optimize the code.
  • Speed: Accelerates the process of creation and preparation for deployment.
  • Community and support: It has an active community that facilitates access to documentation and support.

Parcel also offers the possibility of working with Platzi's Fake API, a tool designed to practice and understand the operation of APIs used in e-commerce.

How to create a project with Parcel?

Creating a project with Parcel involves following certain basic steps that, although repetitive, are essential to comply with modern development standards.

Step 1: Initializing the project

  1. Create project folder:

    mkdir Parcel
  2. Move to the created folder:

    cd Parcel
  3. Initialize the Git repository:

    git init
  4. Initialize npm:

    npm init -y

By performing these steps, you will have created the base of your project. Remember that completing metadata such as description and author in the package.json file is crucial to have well-documented projects.

Step 2: Creating the folder structure

It is important to build a folder structure that facilitates the development and organization of the code.

  1. Open the code editor:

    code .
  2. Create main folder:

    • Inside the project, create a folder called src, which will be where your source code resides.
  3. Essential files:

    • In src, create index.js for the JavaScript logic.
    • Also, add index.html for the HTML structure of the project.

Step 3: Install Parcel

Finally, it's time to install Parcel so you can use all its capabilities within your project.

  1. Install Parcel as development dependency:
    npm install --save-dev parcel

This command will install Parcel and allow you to use the necessary commands to build and optimize your application. Wait for the installation to finish before moving on.

Why is it crucial to explore the documentation?

Each packager has its particularities in terms of structure, commands and optimizations it offers. Exploring Parcel's official documentation will allow you to better understand its functionalities and take full advantage of its benefits. In addition, you will become familiar with conventions and best practices, which can be key to success in projects of any size.

Additional tips

  • Experiment: Don't hesitate to change and improve Parcel projects to suit your needs.
  • Professional portfolio: Use these projects to build a solid portfolio that connects you to the work ecosystem.
  • Continuous training: Take advantage of education platforms like Platzi to continue learning and improving your skills.

Now that you have a clear understanding of how to start a project with Parcel, you are ready to start creating, optimizing and deploying your web applications with confidence and efficiency.

Contributions 3

Questions 1

Sort by:

Want to see more contributions, questions and answers from the community?

En windows pueden poner el comando siguiente comando y les crea todo el proyecto:

mkdir parcel && cd parcel && git init && npm init -y && npm i parcel -D  && mkdir src  && cd src && type nul>index.html && type nul>styles.css && type nul>index.js && cd .. && code .

Estoy yendo ready, espero poder lograr el objetivo y aprender macizo, como hueso.

el curso de npm es buenisimo, se los recomiendo!