├── .babelrc
├── .editorconfig
├── .eslintrc
├── .gitignore
├── LICENSE
├── README.md
├── package.json
├── purgecss.config.js
├── src
├── another-page.html
├── index.html
├── js
│ └── index.js
├── public
│ ├── icon.ico
│ └── images
│ │ ├── image_1.jpg
│ │ ├── image_2.jpg
│ │ └── image_3.jpg
└── scss
│ ├── carousel.css
│ ├── custom.scss
│ └── index.scss
├── webpack.config.js
└── yarn.lock
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | [
4 | "@babel/preset-env",
5 | {
6 | "targets": {
7 | "browsers": ["last 2 versions", "safari >= 7"]
8 | }
9 | }
10 | ]
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | end_of_line = lf
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 | indent_size = 2
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "parser": "babel-eslint",
3 | "extends": ["eslint:recommended", "prettier", "plugin:no-jquery/deprecated-3.5"],
4 | "globals": {
5 | "chrome": true
6 | },
7 | "env": {
8 | "browser": true,
9 | "node": true,
10 | "jquery": true
11 | },
12 | "rules": {
13 | "prettier/prettier": [
14 | "error",
15 | {
16 | "trailingComma": "es5",
17 | "singleQuote": true
18 | }
19 | ],
20 | "no-console": "off"
21 | },
22 | "plugins": ["no-jquery", "babel", "prettier"]
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Node.js related files
2 | node_modules/
3 | dist/
4 | package-lock.json
5 |
6 | # OS generated files
7 | .DS_Store
8 | .Trashes
9 | Thumbs.db
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 - present Homer Chen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Boostrap + Webpack + JQuery Boilerplate
2 |
3 | > Build landing page with **Boostrap** and **jQuery** is so easy.
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | ## Why ?
14 |
15 | React is awesome, and I use it everyday.
16 |
17 | However, not each project needs such a complicated library. jQuery and bootstrap are good enough.
18 |
19 | Hence, this repo is suitable for simple projects.
20 |
21 | ## About DOM manipulation, all you need is...
22 |
23 | #### 🤩 jQuery
24 |
25 | #### ❌ No React
26 |
27 | #### ❌ No Vue
28 |
29 | #### ❌ No Angular
30 |
31 | ## About CSS, all you need is...
32 |
33 | #### 🤩 Bootstrap + CSS
34 |
35 | #### ❌ No CSS Modules
36 |
37 | #### ❌ No styled-components
38 |
39 | ## Features
40 |
41 | - **Bootstrap** and **jQuery** installed
42 | - Hot Module Replacement (**HMR**)
43 | - Support **ES6** Syntax (**Babel 7**)
44 | - **ESLint** + **Prettier** = **Neat Coding Style**
45 | - Webpack production building (**code splitting**, **cache**, **lazy-loading** and [**Terser**](https://github.com/terser-js/terser))
46 |
47 | ## Download and Install
48 |
49 | Let's go!
50 |
51 | ```
52 | $ git clone https://github.com/xxhomey19/bootstrap-webpack-jquery-boilerplate.git
53 | $ cd bootstrap-webpack-jquery-boilerplate
54 | $ yarn // or npm install
55 | ```
56 |
57 | ## Development
58 |
59 | Run development page on **localhost:8080**
60 |
61 | ```
62 | $ npm run dev
63 | ```
64 |
65 | ## Build
66 |
67 | Build for production.
68 |
69 | ```
70 | $ npm run build
71 | ```
72 |
73 | ## Deploy
74 |
75 | Deploy to `gh-pages` branch on GitHub.
76 |
77 | **[DEMO](https://xxhomey19.github.io/bootstrap-webpack-jquery-boilerplate/)**
78 |
79 | ```
80 | $ npm run deploy
81 | ```
82 |
83 | ## License
84 |
85 | MIT © [xxhomey19](https://github.com/xxhomey19)
86 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-webpack-jquery-boilerplate",
3 | "license": "MIT",
4 | "author": "xxhomey19",
5 | "homepage": "https://xxhomey19.github.io/bootstrap-webpack-jquery-boilerplate/",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/xxhomey19/bootstrap-webpack-jquery-boilerplate/tree/master"
9 | },
10 | "bugs": {
11 | "url": "https://github.com/xxhomey19/bootstrap-webpack-jquery-boilerplate/issues"
12 | },
13 | "version": "1.6.4",
14 | "scripts": {
15 | "build": "webpack -p --progress --mode production --config webpack.config.js",
16 | "predeploy": "npm run build && npm run purge",
17 | "deploy": "gh-pages -d dist",
18 | "dev": "cross-env NODE_ENV=dev webpack-dev-server --open --config webpack.config.js",
19 | "lint": "eslint src/js",
20 | "lint:fix": "npm run lint -- --fix",
21 | "purge": "purgecss --config purgecss.config.js --output dist/css",
22 | "start": "npm run dev"
23 | },
24 | "dependencies": {
25 | "bootstrap": "^4.3.1",
26 | "jquery": "^3.5.1",
27 | "popper.js": "^1.15.0"
28 | },
29 | "devDependencies": {
30 | "@babel/core": "^7.4.5",
31 | "@babel/preset-env": "^7.4.5",
32 | "babel-eslint": "^10.0.2",
33 | "babel-loader": "^8.0.6",
34 | "clean-webpack-plugin": "^3.0.0",
35 | "copy-webpack-plugin": "^5.0.3",
36 | "cross-env": "^5.2.0",
37 | "css-loader": "^3.0.0",
38 | "css-url-relative-plugin": "^1.0.0",
39 | "eslint": "^6.0.1",
40 | "eslint-config-prettier": "^6.0.0",
41 | "eslint-plugin-babel": "^5.3.0",
42 | "eslint-plugin-import": "^2.18.0",
43 | "eslint-plugin-jsx-a11y": "^6.2.1",
44 | "eslint-plugin-no-jquery": "^2.4.1",
45 | "eslint-plugin-prettier": "^3.1.0",
46 | "eslint-plugin-react": "^7.14.2",
47 | "file-loader": "^4.0.0",
48 | "gh-pages": "^2.0.1",
49 | "glob": "^7.1.4",
50 | "html-webpack-plugin": "^4.0.0-beta.5",
51 | "husky": "^2.7.0",
52 | "image-webpack-loader": "^5.0.0",
53 | "lint-staged": "^8.2.1",
54 | "mini-css-extract-plugin": "^0.7.0",
55 | "node-sass": "^4.12.0",
56 | "optimize-css-assets-webpack-plugin": "^5.0.3",
57 | "preload-webpack-plugin": "^3.0.0-beta.3",
58 | "prettier": "^1.18.2",
59 | "prettier-package-json": "^2.1.0",
60 | "purgecss": "^3.0.0",
61 | "sass-loader": "^7.1.0",
62 | "terser-webpack-plugin": "^1.3.0",
63 | "url-loader": "^2.0.1",
64 | "webpack": "^4.35.0",
65 | "webpack-cli": "^3.3.5",
66 | "webpack-dev-server": "^3.7.2"
67 | },
68 | "husky": {
69 | "hooks": {
70 | "pre-commit": "lint-staged"
71 | }
72 | },
73 | "lint-staged": {
74 | "package.json": [
75 | "prettier-package-json --write",
76 | "git add"
77 | ],
78 | "*.js": [
79 | "eslint --fix",
80 | "git add"
81 | ]
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/purgecss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: ['dist/**/*.html', 'dist/js/**/*.js'],
3 | css: ['dist/css/**/*.css'],
4 | };
5 |
--------------------------------------------------------------------------------
/src/another-page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
176 | Donec sed odio dui. Etiam porta sem malesuada magna mollis 177 | euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. 178 | Morbi leo risus, porta ac consectetur ac, vestibulum at eros. 179 | Praesent commodo cursus magna. 180 |
181 |182 | View details » 185 |
186 |198 | Duis mollis, est non commodo luctus, nisi erat porttitor ligula, 199 | eget lacinia odio sem nec elit. Cras mattis consectetur purus sit 200 | amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor 201 | mauris condimentum nibh. 202 |
203 |204 | View details » 207 |
208 |220 | Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, 221 | egestas eget quam. Vestibulum id ligula porta felis euismod 222 | semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris 223 | condimentum nibh, ut fermentum massa justo sit amet risus. 224 |
225 |226 | View details » 229 |
230 |246 | Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id 247 | ligula porta felis euismod semper. Praesent commodo cursus magna, 248 | vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus 249 | commodo. 250 |
251 |270 | Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id 271 | ligula porta felis euismod semper. Praesent commodo cursus magna, 272 | vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus 273 | commodo. 274 |
275 |293 | Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id 294 | ligula porta felis euismod semper. Praesent commodo cursus magna, 295 | vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus 296 | commodo. 297 |
298 |