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
@@ -25,7 +25,7 @@ Web Starter Kit (WSK) - is an opinionated boilerplate for web development. Tools
25
25
26
26
## Install
27
27
28
-
Instruction for installation WSK please read in `master` branch[README.md](https://github.com/justcoded/web-starter-kit/blob/master/README.md#install)
28
+
Instruction for installation WSK please read in main repo[README.md](https://github.com/justcoded/web-starter-kit/blob/master/README.md#install)
29
29
30
30
31
31
## Commands
@@ -45,7 +45,7 @@ This includes linting as well as script, stylesheet and HTML compiling.
45
45
Also, a [browsersync](https://browsersync.io/) script will be automatically generated, which will take care of precaching your sites resources.
46
46
47
47
48
-
### Production mode
48
+
### Build (production) mode
49
49
50
50
Serve the Fully Built & Optimized Site
51
51
@@ -69,7 +69,7 @@ Included in `gulp` and `gulp build` tasks.
69
69
$ gulp fix-js
70
70
```
71
71
72
-
`gulp fix-js` task run auto-fix (eslint fix method) and lint for JS files.
72
+
`gulp fix-js` task run lint and auto-fix (eslint method) for JS files.
73
73
**Not included in any tasks**.
74
74
75
75
## Structure
@@ -100,11 +100,13 @@ If you want to use our WSK, you need to know something about the structure.
100
100
├── layout #Global layout
101
101
├── pages #Global styles for pages
102
102
├── styles.scss #Main scss file (can be used for importing another files)
103
-
├── sys_icon#Folder with system icons for notification
103
+
├── system_files #Folder with system files
104
104
├── tasks #Folder with tasks for gulpfile
105
105
├── vendor_entries #Folder for vendor entries (plugins)
106
106
├── vendor.js #File for plugins js
107
+
├── vendor-compile.js #File for compiling (bunling) plugins js
107
108
├── vendor.scss #File for plugins styles
109
+
├── .babelrc #Config for Babel
108
110
├── .browserslistrc #Config for autoprefixer
109
111
├── .editorconfig #Config file for IDE
110
112
├── .eslintignore #Eslint ignore list
@@ -152,7 +154,7 @@ So while normal CSS doesn’t yet allow things like variables, mixins (reusable
152
154
* All **extensions** must be installed by the [npm](https://docs.npmjs.com/cli/install);
153
155
* After installing the extension you must **include** its **css** or **sass** files in `assets/vendor_entries/vendor.scss` using `@import`.
154
156
155
-
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).
157
+
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).
156
158
You can see this property `getFilesForStylesCustom` in the `gulp-config.js` file:
Also, you might want to add these sass files to the ignore list (check `getPathesToCopyForProduction` and `getPathesToCopy` properties in the `gulp-config.js` file). By default they will be copied to the `public/css` without grouping css media queries.
166
+
Also, you might want to add these sass files to the ignore list (check `getFilesToCopyProd` and `getFilesToCopy` properties in the `gulp-config.js` file). By default they will be copied to the `public/css` without grouping css media queries.
165
167
166
168
In our WSK you can use [PostCSS](https://postcss.org/). PostCSS is a tool for transforming CSS with JavaScript. Currently, PostCSS has more than 200 plugins. You can find all of the plugins in the [plugins list](https://github.com/postcss/postcss/blob/master/docs/plugins.md).
167
169
168
170
* You **don't need** to write **prefixes** for different browsers like `-webkit` it will be done by the [autoprefixer](https://github.com/postcss/autoprefixer).
169
171
170
-
In **production** mode we use:
172
+
In **build (production)** mode we use:
171
173
172
-
***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`.
174
+
***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`.
173
175
174
176
In our WSK we use **CSS3 custom properties** and **relative units**`rem`. By default `1rem = 10px`.
175
177
@@ -179,20 +181,21 @@ In our WSK we use **CSS3 custom properties** and **relative units** `rem`. By de
179
181
180
182
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.
181
183
182
-
For bundling and transpiling `.js` files in our WSK we used [Browserify](http://browserify.org/) and [Babel](https://babeljs.io/).
184
+
For bundling and transpiling `.js` files in our WSK we used [Rollup](https://rollupjs.org/) and [Babel](https://babeljs.io/).
183
185
184
186
* All custom **javascript** files are located in `js` folder;
185
187
* Entry point for javascript is `assets/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;
186
188
* All **javascript** is **babelified** so yes! You can use all kind of [ES6 features](https://babeljs.io/docs/learn-es2015/) here.
187
189
* All **extensions** must be installed by the [npm](https://docs.npmjs.com/cli/install);
188
190
* After installing the extension you must **include** its **javascript** files in `assets/vendor_entries/vendor.js` by adding new elements to the **array**.
191
+
* If you using ES modules or any types of modules, please import your modules in `assets/vendor_entries/vendor-compile.js`.
189
192
190
193
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`.
191
194
192
195
## Watching
193
196
194
-
After run `gulp` by default gulp watching for your files in `src` and `assets` folders.
195
-
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.
197
+
After run `gulp` by default gulp watching for your files in `assets` and `public` folders.
198
+
For `js`, `scss`, `html` and `vendors_entries` folders after change in included files, watcher run they tasks for compiling. For other folders and files in `public`watcher reload browser.
0 commit comments