Skip to content
Sample project for using parcel.js (parceljs.org)
HTML CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
package-lock.json
package.json

README.md

Parcel.js Sample Project

For the Parcel project at https://parceljs.org/.

I just discovered this today (11 Feb 2020) and had this sample project up and running in 5 minutes (including typos).

Seriously worth considering from front-end development as an alternative to the bloat of webpack.

Setup Instructions

It's super simple:

  1. Run `npm init -y` to setup Node Package Manager and create the packages.json file.
  2. Run `npm install parcel --save-dev` to install parcel locally. This is a better option than global because you're kind of self-documenting the dependency in packages.json for other project developers.
  3. Create your site code code that need to compile.
  4. Run `parcel server src/index.html` from the terminal. Nope, that doesn't work when installed locally. So go to the next step
  5. So add the "dev" and "test" scripts you'll see in the package.json file. Then you just need to run `npm run dev` in development to build the site and setup the local server. Everything gets bundled into a new "dist" folder.

Notes

If you read the documentation you'll see both "parcel" and "parcel-bundler" packages references. Wondering what the difference is? Me too. I searched "npm install parcel-bundler vs parcel" and come across https://github.com/parcel-bundler/parcel/issues/2360

You can’t perform that action at this time.