Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.
/ sample-parcel-js Public archive

Sample project for using parcel.js (parceljs.org)

Notifications You must be signed in to change notification settings

jsnelders/sample-parcel-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

20 July 2021: Respository is now obsolete and archived.


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 parcel-bundler/parcel#2360

About

Sample project for using parcel.js (parceljs.org)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published