Skip to content

Commit 99c96b1

Browse files
committed
Merge branch 'master' into dev
2 parents 6b4120b + 8ff6a72 commit 99c96b1

File tree

19 files changed

+14233
-14136
lines changed

19 files changed

+14233
-14136
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": ["env"]
2+
"presets": ["@babel/preset-env"]
33
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.js]
12+
indent_size = 4

.eslintrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parserOptions": {
3+
"ecmaVersion": 2020,
4+
"sourceType": "module"
5+
},
6+
"rules": {
7+
"indent": [2, 4, {"SwitchCase": 1}],
8+
"quotes": [2, "backtick"],
9+
"semi": [2, "always"],
10+
"linebreak-style": [2, "unix"],
11+
"max-len": [1, 85]
12+
},
13+
"env": {
14+
"es6": true,
15+
"node": true,
16+
"browser": true
17+
},
18+
"extends": "eslint:recommended"
19+
}

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
# A Set of Gulp v4.0.0 Tasks for Creating Web Projects Using HTML, CSS/Sass, and JavaScript
22

3-
(v4.0.1)
3+
(v4.0.2)
44

55
---
66

77
## Installation
8-
You need to have Java installed before continuing, as the browser refresh module requires it. Additionally, all the required Node modules need to be installed before you can use this template. From the root folder of this project, type `npm install`. This will create a folder called `node_modules` and download the plugins listed under the `devDependencies` section in the `package.json` file. If you encounter an `ERR!` message about `EACCES`, then you’ll need to run the command as the super user: `sudo npm install`. Because the Gulp tasks amount to about 112MB, expect to wait.
8+
Before continuing, make sure Java is installed, as the browser refresh module requires it. Additionally, all the required Node modules need to be installed before you can use this template. From the root folder, type `npm install`. This will create a folder called `node_modules` and download the plugins listed under the `devDependencies` section in the `package.json` file. If you encounter an `ERR!` message about `EACCES` on macOS, then run the command as the super user: `sudo npm install`.
99

1010
## Tasks
11-
Typing `gulp --tasks`, or simply `gulp`, will provide you with a list of tasks included in `gulpfile.js`. Tasks such as `build` and `serve` invoke other tasks and are nested in the output of `gulp --tasks` and are executed in `<series>`.
11+
Typing `gulp --tasks`, or simply `gulp`, will render a list of tasks included in `gulpfile.js`. Tasks such as `build` and `serve` invoke other tasks and are executed in `<series>`.
1212

1313
Each task can be run on its own. For example, if all you want to do is validate your HTML, you can type `gulp validateHTML`.
1414

1515
## Running the Project
16-
All your work must be added to the sub-folders under the `dev` folder: your markup in `html`, your Sass/CSS in `styles`, your JavaScript in `scripts`, and your images in `img`.
16+
All your work must be added to the sub-folders under the `dev` folder: your markup in `html`, your Sass/CSS in `styles`, your JavaScript in `scripts`, and, your images in `img`.
1717

1818
During development, run `gulp serve`, which runs multiple development-related tasks, then launches your default browser and reloads on file changes.
1919

2020
For production-ready projects, run `build`, which creates a folder called `prod`. This is the folder you’d upload to your server if you were going live with your project.
21+
22+
## Issues
23+
As of this writing, 14 Oct 2021, you’ll need to have [`stylelint` installed](https://stylelint.io/user-guide/get-started) to run `gulp-stylelint`, which is included in a task called `lintCSS`. However, there’s a bug in this project that, when adding the following to the `serve` task, the browser won’t reload on changes to CSS files.
24+
25+
```javascript
26+
watch(`dev/styles/**/*.css`, lintCSS)
27+
.on(`change`, reload);
28+
```

dev/scripts/app.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/*jslint browser, es6 */
2-
/*global window */
3-
4-
window.onload = function () {
1+
window.onload = () => {
52
const CSSPreProcessor = `Sass`;
63
const JSVersion = `ES6`;
74

dev/styles/css/main.css

Whitespace-only changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)