You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
@@ -50,8 +50,8 @@ This is not to say that WSK cannot be used in browsers older than those reflecte
50
50
| Easy start | We don't use responsive boilerplate. You are free to make your own decision in what way to make responsive for the site. Just start with `index.html` from `src/html`. |
51
51
| HTML templating | Used [gulp-file-include](https://github.com/haoxins/gulp-file-include) for templating html files. |
52
52
| Sass support | Compile [Sass](http://sass-lang.com/) into CSS with ease, bringing support for variables, mixins and more (run `gulp` for project compiling). In our WSK we use [Dart-Sass](https://sass-lang.com/dart-sass) version compiler and follow [Sass guidelines](https://sass-guidelin.es/#architecture). |
53
-
| PostCSS support | PostCSS connecting most usable plugins library for CSS optimisation. In our WSK we use [autoprefixer](https://github.com/postcss/autoprefixer), [cssnano](https://github.com/cssnano/cssnano), [sort-css-media-queries](https://github.com/solversgroup/postcss-sort-media-queries), etc. |
54
-
| JavaScript ES6+ Support | Optional JavaScript ES6+ support .You can use all kind of ES6+ features here. ES6+ source code will be automatically transpiled to ES5 for wide browser support. For bundling and transpiling used [Browserify](http://browserify.org/) and [Babel](https://babeljs.io/). |
53
+
| PostCSS support | PostCSS connecting most usable plugins library for CSS optimisation. In our WSK we use [autoprefixer](https://github.com/postcss/autoprefixer), [cssnano](https://github.com/cssnano/cssnano), [postcss-sort-media-queries](https://github.com/solversgroup/postcss-sort-media-queries), etc. |
54
+
| JavaScript ES6+ Support | Optional JavaScript ES6+ support .You can use all kind of ES6+ features here. ES6+ source code will be automatically transpiled to ES5 for wide browser support. For bundling and transpiling used [Rollup](https://rollupjs.org/) and [Babel](https://babeljs.io/). |
55
55
| Code Linting | JavaScript code linting is done using [esLint](https://eslint.org/) - a linter tool for identifying and reporting on patterns in JavaScript (used [airbnb-base rules](https://www.npmjs.com/package/eslint-config-airbnb-base)). HTML code linting is done using [HTMLHint](https://github.com/htmlhint/HTMLHint). |
56
56
| Performance optimization | Minify and concatenate JavaScript, CSS, HTML and images to help keep your pages lean (run `gulp` to create an optimised version of your project to `assets`). |
57
57
| Built-in HTTP Server | A built-in server for previewing your site locally while you develop and iterate. |
@@ -98,7 +98,7 @@ Once you have verified that your system can run WSK, check out the [commands](#c
98
98
### [Node.js](https://nodejs.org)
99
99
100
100
Bring up a terminal and type `node --version`.
101
-
Node should respond with a version at or above 8.0.x.
101
+
Node should respond with a version at or above 10.0.x.
102
102
If you need to install Node, go to [nodejs.org](https://nodejs.org) and click on the big green Install button.
103
103
104
104
### [Gulp](http://gulpjs.com)
@@ -143,7 +143,7 @@ This includes linting as well as image, script, stylesheet and HTML optimization
143
143
Also, a [browsersync](https://browsersync.io/) script will be automatically generated, which will take care of precaching your sites resources.
144
144
145
145
146
-
### Production mode
146
+
### Build (production) mode
147
147
148
148
Serve the Fully Built & Optimized Site
149
149
@@ -167,7 +167,7 @@ Included in `gulp` and `gulp build` tasks.
167
167
$ gulp fix-js
168
168
```
169
169
170
-
`gulp fix-js` task run auto-fix (eslint fix method) and lint for JS files.
170
+
`gulp fix-js` task run lint and auto-fix (eslint method) for JS files.
171
171
**Not included in any tasks**.
172
172
173
173
## Structure
@@ -177,9 +177,11 @@ Your folder structure for WSK:
177
177
178
178
```
179
179
├── assets #Folder with files after compiling
180
+
├── helpers #Folder with helpers function for tasks
180
181
├── src #Folder with sources
181
-
├── sys_icon#Folder with system icons for notification
182
+
├── system_files #Folder with system files
182
183
├── tasks #Folder with tasks for gulpfile
184
+
├── .babelrc #Config for Babel
183
185
├── .browserslistrc #Config for autoprefixer
184
186
├── .editorconfig #Config for IDE
185
187
├── .eslintignore #Eslint ignore list
@@ -226,10 +228,11 @@ In `package.json` you can find all the dependencies. Folder `tasks` - for gulpfi
226
228
├── styles.scss #Main file to import project styles (used for importing another files)
227
229
├── vendor_entries #Folder for vendor entries (plugins)
228
230
├── vendor.js #File for plugins js
231
+
├── vendor-compile.js #File for compiling (bunling) plugins js
229
232
├── vendor.scss #File for plugins styles
230
233
```
231
234
232
-
Use `images` folder to add your graphic files, `modules` to add your javascript modules (don't forget to include it in app.js), `scss` folder to add your styles for the project. You can create, delete files and folders in `scss`, but don't forget to include them in `scss/styles.scss` file.
235
+
Use `images` folder to add your graphic files, `modules` to add your javascript modules (don't forget to include it in app.js), `scss` folder to add your styles for the project. You can create, delete files and folders in `scss`, but don't forget to include them in `scss/styles.scss` file.
233
236
234
237
Use `vendor_entries` to include plugins into your project.
235
238
@@ -252,7 +255,7 @@ So while normal CSS doesn’t yet allow things like variables, mixins (reusable
252
255
* All **extensions** must be installed by the [npm](https://docs.npmjs.com/cli/install);
253
256
* After installing the extension you must **include** its **css** or **sass** files in `src/vendor_entries/vendor.scss` using `@import`.
254
257
255
-
You are able to add your own **custom sass files** and optionally **disable/enable**[postcss-sort-css-media-queries](https://github.com/solversgroup/postcss-sort-media-queries).
258
+
You are able to add your own **custom sass files** and optionally **disable/enable**[postcss-sort-media-queries](https://github.com/solversgroup/postcss-sort-media-queries).
256
259
You can see this property `getFilesForStylesCustom` in the `gulp-config.js` file:
@@ -267,9 +270,9 @@ In our WSK you can use [PostCSS](https://postcss.org/). PostCSS is a tool for tr
267
270
268
271
* You **don't need** to write **prefixes** for different browsers like `-webkit` it will be done by the [autoprefixer](https://github.com/postcss/autoprefixer).
269
272
270
-
In **production** mode we use:
273
+
In **build (production)** mode we use:
271
274
272
-
***Group and sort CSS media queries** by [sort-css-media-queries](https://github.com/solversgroup/postcss-sort-media-queries). By **default** we use `desktop-first` sorting type, but you can change it in `gulp-config.js` to `mobile-first`.
275
+
***Group and sort CSS media queries** by [postcss-sort-media-queries](https://github.com/solversgroup/postcss-sort-media-queries). By **default** we use `desktop-first` sorting type, but you can change it in `gulp-config.js` to `mobile-first`.
273
276
***Minifying**`.css` files by [cssnano](https://github.com/cssnano/cssnano).
274
277
275
278
In our WSK we use **CSS3 custom properties** and **relative units**`rem`. By default `1rem = 10px`.
@@ -280,29 +283,30 @@ In our WSK we use **CSS3 custom properties** and **relative units** `rem`. By de
280
283
281
284
It is not an alternative syntax or language like CoffeeScript or TypeScript. It's good ol' fashioned JavaScript. The reason so many people are excited is that this version introduces a lot of much-needed improvements to the language.
282
285
283
-
For bundling and transpiling `.js` files in our WSK we used [Browserify](http://browserify.org/) and [Babel](https://babeljs.io/).
286
+
For bundling and transpiling `.js` files in our WSK we used [Rollup](https://rollupjs.org/) and [Babel](https://babeljs.io/).
284
287
285
288
* All custom **javascript** files are located in `js` folder;
286
289
* Entry point for javascript is `src/js/app.js` you can **import** all your **javascript** files from here using [ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) feature;
287
290
* All **javascript** is **babelified** so yes! You can use all kind of [ES6 features](https://babeljs.io/docs/learn-es2015/) here.
288
291
* All **extensions** must be installed by the [npm](https://docs.npmjs.com/cli/install);
289
292
* After installing the extension you must **include** its **javascript** files in `src/vendor_entries/vendor.js` by adding new elements to the **array**.
293
+
* If you using ES modules or any types of modules, please import your modules in `src/vendor_entries/vendor-compile.js`.
290
294
291
-
In **production** mode we use:
295
+
In **build (production)** mode we use:
292
296
293
-
***Uglifying**`.js` files by [uglifyJS](https://github.com/mishoo/UglifyJS2).
297
+
***Minify**`.js` files by [terser](https://github.com/terser/terser).
294
298
295
299
For linting javascript files in WSK used [esLint](https://eslint.org/). esLint a linter tool for identifying and reporting on patterns in JavaScript (used [airbnb-base rules](https://www.npmjs.com/package/eslint-config-airbnb-base)) and some custom rules in file configuration `.eslintrc`.
296
300
297
301
## Watching
298
302
299
303
After run `gulp` by default gulp watching for your files in `src` and `assets` folders.
300
-
For `js`, `scss`, `html` and `vendors_entries` folders after change in included files, watcher run they tasks for compiling. For `images` and other folders (and files in `src` root) watcher run tasks for copy files.
304
+
For `js`, `scss`, `html` and `vendors_entries` folders after change in included files, watcher run they tasks for compiling. For `images` and other folders (and files in `src` root) watcher run tasks for copy files & reload browser.
301
305
302
306
## Images copy and minify
303
307
304
-
In our WSK by default in [development and production mode](#commands), task `build-images` only copy images.
305
-
For minify images used [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin). If you want to minify your images in production mode, please switch option `buildImages.isImageMin = true` in `gulp-config.js`.
308
+
In our WSK by default in [development and build (production) mode](#commands), task `build-images` only copy images.
309
+
For minify images used [gulp-imagemin](https://github.com/sindresorhus/gulp-imagemin). If you want to minify your images in build (production) mode, please switch option `buildImages.isImageMin = true` in `gulp-config.js`.
306
310
307
311
## Tasks
308
312
@@ -315,8 +319,7 @@ For minify images used [gulp-imagemin](https://github.com/sindresorhus/gulp-imag
315
319
| build-styles | Compiles all scss from `src/scss` to `assets/css` folder. |
316
320
| build-styles-custom | Compiles all custom scss files listed in the `gulp-config.js` to `assets/css` folder |
317
321
| build-styles-vendors | Compiles all vendor styles from `src/vendor_entries` to `assets/css` folder. |
0 commit comments