Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Let's Replace Parcel With Webpack #2641

Merged
merged 8 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ module.exports = {
env: {
browser: true,
es6: true,
mocha: true
mocha: true,
node : true
},
plugins: ["mocha"],
extends: "eslint:recommended",
plugins: ['mocha'],
extends: 'eslint:recommended',
parserOptions: {
sourceType: "module"
sourceType: 'module'
},
rules: {
indent: ["error", 2],
quotes: ["error", "single"],
semi: ["error", "always"]
indent: ['error', 2],
quotes: ['error', 'single'],
semi: ['error', 'always']
}
};
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Choose one of the following options:
npx create-html5-boilerplate new-site
cd new-site
npm install
npm start
npm run start
```

## Features
Expand All @@ -72,7 +72,7 @@ Choose one of the following options:
* [`Apache Server Configs`](https://github.com/h5bp/server-configs-apache)
that improve the web site's performance and security
* Placeholder Open Graph elements and attributes.
* An example package.json file with [Parcel](https://parceljs.org/) commands
* An example package.json file with [WebPack](https://webpack.js.org/) commands
built in to jumpstart application development
* Placeholder CSS Media Queries.
* Useful CSS helper classes.
Expand Down
11 changes: 4 additions & 7 deletions dist/doc/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,11 @@ if you're interested. The fields we provide are as follows:
node environment. There are many [built-in keys](https://docs.npmjs.com/misc/scripts)
related to the package lifecycle that node understands automatically. You can
also define custom scripts for use with your application development. We
provide three custom scripts that work with Parcel to get you up and running
provide three custom scripts that work with WebPack to get you up and running
quickly with a bundler for your assets and a simple development server.

* `start` builds your site and starts a server
* `build` builds your `index.html` using Parcel
* `dev` serves your `index.html` with a simple development server

* `start` serves your `index.html` with a simple development server

* `keywords` - an array of keywords used to discover your app in the npm
registry
* `author` - defines the author of a package. There is also an alternative
Expand All @@ -184,5 +182,4 @@ if you're interested. The fields we provide are as follows:
* `license` - the license for your application. Must conform to
[specific rules](https://docs.npmjs.com/files/package.json#license)
* `devDependencies` - development dependencies for your package. In our case
it's a single dependency, Parcel, which we use to bundle files and run a
simple web server.
we have several dependencies used by WebPack, which we use as a simple development server.
6 changes: 2 additions & 4 deletions dist/doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ A basic HTML5 Boilerplate site initially looks something like this:
├── robots.txt
├── site.webmanifest
├── tile.png
└── tile-wide.png
├── tile-wide.png
└── webpack.config.js
```

What follows is a general overview of each major part and how to use them.
Expand Down Expand Up @@ -110,9 +111,6 @@ need to integrate this starting HTML with your setup.
Make sure that you update the URLs for the referenced CSS and JavaScript if you
modify the directory structure at all.

If you are using Google Universal Analytics, make sure that you edit the
corresponding snippet at the bottom to include your analytics ID.

### humans.txt

Edit this file to include the team that worked on your site/app, and the
Expand Down
2 changes: 0 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" href="/icon.svg" type="image/svg+xml">

<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->

<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
Expand Down
15 changes: 9 additions & 6 deletions dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
"name": " ",
"version": "0.0.1",
"description": "",
"keywords": [""],
"keywords": [
""
],
"license": "",
"author": "",
"scripts": {
"build": "parcel build index.html",
"dev": "parcel index.html --open",
"start": "npm run build && npm run dev",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack-dev-server --open --port 8080"
},
"devDependencies": {
"parcel-bundler": "^1.12.5"
"webpack": "^5.64.1",
"html-webpack-plugin": "^5.5.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.5.0"
}
}
16 changes: 16 additions & 0 deletions dist/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode : 'development',
entry : './js/app.js',
devServer: {
liveReload: true,
hot: true,
open: true,
static: ['./'],
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html'
})
]
};
Loading