49

Parcel-app a simple command-line to create react application with parcel

 4 years ago
source link: https://www.tuicool.com/articles/muaYFva
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Parcel App :rocket:

Parcel (like Webpack) allows you to create React projects (and bundle different things such as images, files etc). With Parcel you don't need to configure anything - everything is configured for you. Also, Parcel follows a very strong and strict philosophy: "Be fast, be simple" (yeah, they don't say that in their website, but it's obvious). So, Parcel App (this project) allows you to create a React application without configuring anything.s

If something doesn't work please create a new issue .

Quick Overview

npx parcel-app app-name
cd app-name
npm start

The application will run at http://localhost:1234/

If you are ready to publish to npm, you can run npm run build .

ruumqur.gif

Just run start

Parcel was created to make your project production fast. Using Parcel, you don't need to configure anything because everything was created for you.

Create an app

If you want to use Parcel App you will need to have the latest version of Node.You can download it through its website here . With Parcel App you only need to write the command and the project name, similar to create-react-app <app-name> .

npx

npx parcel-app <app-name>

Tree

<app-name>
├── node_modules
├── public
|   ├── index.html
├── src
|   ├── App.js
|   ├── index.js
|   ├── style.css
├── .babelrc
├── package.json

Inspiration

I had inspiration from create-react-app. I used this command a lot when I was a beginner. I know that I need to learn more about it, but I wanted to create something for the community and give something to the beginners to go under the hood more easily. Now, building a React project is easier!

Why Parcel?

When I'm building a project I first think about if I will need to use Parcel or Webpack, because if you want to build a small application it's better to use Parcel - it's fast, easy and very small (compact).

Methodology?

I'm trying to use git all the time, but sometimes I don't. Please don't be like me. I just followed this:

  • I tried to study a lot.
  • Watch a lot of videos about it (yeeep, this is the reality, Bro).
  • Read posts about the topic written for people that have more experience than me.
  • Advice: use git all the time.

Can I take this code and improve it?

Yeah, everything on my GitHub is accessible and you can improve it or use it as an example. Just please, share my networks (if you want).

Tools

esm allows you to use import. Treat to use it. More infomation here .

listr allows you to create a task list on the console. More infomation here .

ncp allows you to copy a file of a directory and paste in another. More infomation here .

shelljs allows you to run shell commands. More infomation here .

figlet can allow you to use amazing fonts on the console. More information here .

Next Features

  • ESLint

License

MIT © Jhornan Colina MIT License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK