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
Copy file name to clipboardexpand all lines: README.md
+47-16
Original file line number
Diff line number
Diff line change
@@ -49,19 +49,28 @@ This is not to say that WSK cannot be used in browsers older than those reflecte
49
49
| --- | --- |
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
-
| 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). |
52
+
| Sass support | Compile [Sass](http://sass-lang.com/) into CSS with ease, bringing support for variables, mixins and more (run `npm run dev` or `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
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
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 [Webpack](https://webpack.js.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
-
| 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`). |
56
+
| Performance optimization | Minify and concatenate JavaScript, CSS, HTML and images to help keep your pages lean (run `npm run dev` or `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. |
58
-
| Live Browser Reloading | Reload the browser in real-time anytime an edit is made without the need for an extension (run `gulp` and edit your files). |
59
-
| Cross-device Synchronization | Synchronize clicks, scrolls, forms and live-reload across multiple devices as you edit your project. Powered by [BrowserSync](http://browsersync.io) (run `gulp` and open up the IP provided on other devices on your network). |
58
+
| Live Browser Reloading | Reload the browser in real-time anytime an edit is made without the need for an extension (run `npm run dev` or `gulp` and edit your files). |
59
+
| Cross-device Synchronization | Synchronize clicks, scrolls, forms and live-reload across multiple devices as you edit your project. Powered by [BrowserSync](http://browsersync.io) (run `npm run dev` or `gulp` and open up the IP provided on other devices on your network). |
60
60
61
61
62
62
## Install
63
63
64
-
Init your project using [jcn](https://github.com/justcoded/npm-jcn) or directly [download WSK](https://github.com/justcoded/web-starter-kit/releases/latest) and run `$ npm install --global gulp && npm install` in that directory to get started.
64
+
Init your project using [jcn](https://github.com/justcoded/npm-jcn) or directly [download WSK](https://github.com/justcoded/web-starter-kit/releases/latest).
65
+
66
+
To get started please run
67
+
```sh
68
+
$ npm install
69
+
```
70
+
if you want use Gulp in global context please run
71
+
```sh
72
+
$ npm install --global gulp && npm install
73
+
```
65
74
66
75
67
76
To take advantage of WSK you need to:
@@ -130,15 +139,24 @@ You may also want to get used to some of the [commands](#commands) available.
130
139
131
140
There are few commands available to help you build and test sites:
132
141
142
+
143
+
### Test
144
+
145
+
Test run with logs
146
+
147
+
```sh
148
+
$ npm run test
149
+
```
150
+
133
151
### Development mode
134
152
135
153
Watch For Changes & Automatically Refresh Across Devices
136
154
137
155
```sh
138
-
$ gulp
156
+
$ npm run dev
139
157
```
140
158
141
-
`gulp` task creates the `assets` folder in the root of the project.
159
+
`dev` creates the `assets` folder in the root of the project.
142
160
This includes linting as well as image, script, stylesheet and HTML optimization.
143
161
Also, a [browsersync](https://browsersync.io/) script will be automatically generated, which will take care of precaching your sites resources.
144
162
@@ -148,27 +166,40 @@ Also, a [browsersync](https://browsersync.io/) script will be automatically gene
148
166
Serve the Fully Built & Optimized Site
149
167
150
168
```sh
151
-
$ gulp build
169
+
$ npm run build
152
170
```
153
171
154
-
`gulp build` task creates the `production` folder in the root of the project with **minifying** files from `assets`. It will help you to create clear instances of code for the **production** or **further implementation**.
172
+
`build` creates the `production` folder in the root of the project with **minifying** files from `assets`. It will help you to create clear instances of code for the **production** or **further implementation**.
173
+
174
+
175
+
### Lint for HTML
155
176
177
+
```sh
178
+
$ npm run lint-html
179
+
```
156
180
157
-
### Linter - only for JS
181
+
### Lint & fix for JS
158
182
159
183
```sh
160
-
$ gulp lint-js
184
+
$ npm run lint-js
161
185
```
162
186
163
-
`gulp lint-js` task run the separate lint for JS files.
164
-
Included in `gulp` and `gulp build` tasks.
187
+
`lint-js` run the separate lint for JS files.
188
+
Included in `dev` and `build`.
165
189
166
190
```sh
167
-
$ gulp fix-js
191
+
$ npm run fix-js
168
192
```
169
193
170
-
`gulp fix-js` task run lint and auto-fix (eslint method) for JS files.
171
-
**Not included in any tasks**.
194
+
`fix-js` run lint and auto-fix (eslint method) for JS files.
0 commit comments