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
* Em based media-queries via [sass-mq](https://github.com/sass-mq/sass-mq)
14
+
* ES2015 support with [Babel](https://babeljs.io/) (polyfill loaded from CDN.js)
14
15
*[Gulp.js](http://gulpjs.com/) build and deploy workflow
15
-
*[Bower](http://bower.io/)
16
16
* Development server and asset live-reload with [BrowserSync](http://www.browsersync.io/) and [Weinre](http://people.apache.org/~pmuellr/weinre/) remote debugging
17
17
* Incremental deploy with [rsync](https://rsync.samba.org/) or [lftp](http://lftp.yar.ru/)
@@ -21,9 +21,7 @@ WOK is a loosely opinionated boilerplate for web development built with flexibil
21
21
22
22
## Requirements
23
23
24
-
* Node.js >= 4.0.0 (we strongly suggest to use something like [nvm](https://github.com/creationix/nvm))
25
-
* npm3 (`npm install -g npm@3`)
26
-
* bower (`npm install -g bower`)
24
+
* Node.js >= 6.9.0 (we strongly suggest to use something like [nvm](https://github.com/creationix/nvm))
27
25
* gulp cli (`npm install -g gulp`)
28
26
29
27
## Installation
@@ -34,32 +32,22 @@ Clone this repo:
34
32
35
33
From project root:
36
34
37
-
*`bower install` (vendors)
38
35
*`npm install` (gulp deps)
39
36
40
37
### Linting
41
38
42
39
#### JavaScript linting
43
40
44
-
Wok comes with preconfigured[eslint](http://eslint.org/) linting based on the [airbnb base preset](https://www.npmjs.com/package/eslint-config-airbnb-base).
41
+
Wok comes with pre-configured[eslint](http://eslint.org/) linting based on the [airbnb base preset](https://www.npmjs.com/package/eslint-config-airbnb-base).
45
42
You can lint your JavaScript files by running: `gulp lint:js`.
46
43
47
44
If you want to use _in editor_ linting, please follow the setup instructions [your editor](http://eslint.org/docs/user-guide/integrations#editors)
48
45
49
-
*Note*: eslint preset expects ES6 syntax, anyway Wok doesn't provide any transpiler (ie: Babel) out of the box. The wiki provides recipes to use [webpack 1.x](https://github.com/fevrcoding/wok/wiki/Gulp:-webpack-and-ES6) or [Browserify](https://github.com/fevrcoding/wok/wiki/Gulp:-browserify-and-ES6)
50
-
51
46
#### SCSS linting
52
47
53
-
For **SCSS linting** you can choose [stylelint](http://stylelint.io/) or [scss-lint](https://github.com/brigade/scss-lint).
54
-
The latter
55
-
56
-
Linting via **stylelint** is available as a gulp task: `gulp lint:scss`.
48
+
Linting via **stylelint** is available as a gulp task: `gulp lint:styles`.
57
49
Available editor extensions for in-editor linting are listed [here](http://stylelint.io/user-guide/complementary-tools/)
58
50
59
-
Linting via **scss-lint** requires [Ruby 2+](http://rubyinstaller.org/downloads/) installed on your system and the global scss-lint gem (`gem install scss_lint`)
60
-
It's available as a npm script: `npm run scss-lint`.
61
-
Available editor extensions for in-editor linting are listed [here](https://github.com/brigade/scss-lint#editor-integration) for your editor
62
-
63
51
## Configuration
64
52
65
53
On a plain HTML project, the default configuration should work just fine. On other setups you might need to tweak some paths/options:
@@ -83,7 +71,7 @@ Project sources are located into `application` folder. Don't edit files in `publ
83
71
+ stylesheets #SASS files
84
72
+ audio #audio files
85
73
+ video #video files
86
-
+ vendors #vendors packages installed by bower
74
+
+ vendors #vendors packages not installed via npm
87
75
documents #Markdown files or any other txt-like file to be included in HTMLs
88
76
fixtures #JSON files
89
77
views #HTML files
@@ -92,6 +80,12 @@ Project sources are located into `application` folder. Don't edit files in `publ
92
80
index.nunj.html #Main views
93
81
...
94
82
83
+
### JavaScript Development
84
+
85
+
Wok supports cross browser ES2015 by parsing individual source files with [Babel](https://babeljs.io/). To support old browsers polyfills are loaded via CDN.
86
+
87
+
To use ES2015 modules follow the [webpack2 recipe](https://github.com/fevrcoding/wok/wiki/Gulp:-webpack-and-ES6).
88
+
95
89
### View Templates
96
90
97
91
With Nunjucks you can setup extensible page templates. See [official docs](https://mozilla.github.io/nunjucks/templating.html#template-inheritance) for further details.
@@ -102,10 +96,6 @@ View partials in `application/views/partials` are rendered to `public` folder li
102
96
103
97
To limit performance issues, just first level sub-folders will be included in the parse process.
104
98
105
-
### Vendors
106
-
107
-
You may use [bower](http://bower.io/) to manage vendors. Installed packages will be stored into the `application/assets/vendors` folder. It's up to you to provide dev and dist configuration to deploy vendors' files to `public`.
108
-
109
99
### *More docs to come...*
110
100
111
101
## Building
@@ -131,13 +121,13 @@ By default WOK implements a simple set of deploy tasks requiring SSH remote acce
131
121
To deploy and rollback with rsync first setup your remote hosts in `build/gulp-config/hosts.js`, then run:
132
122
133
123
#deploy to remote staging server. A backup of the deploy target folder (`paths.dist.root`) will be stored in `paths.backup`.
134
-
gulp deploy --remotehost=staging
124
+
gulp deploy --target=staging
135
125
136
126
#deploy a production build to remote production server
137
-
gulp deploy --production --remotehost=production
127
+
gulp deploy --production --target=production
138
128
139
129
#rollback to the previous version in the remote production server
@@ -154,12 +144,12 @@ When paired with Phing or other deployment systems, remember to set `buildOnly`
154
144
### Other Gulp tasks
155
145
156
146
*`dev`: one time development build (also runs as default task)
157
-
*`lint`: runs both JavaScript and SCSS linters
158
-
*`bump`: bumps semver version of `package.json`and `bower.json` files. Accepts a `--type` parameter with value `major|minor|patch|prerelease`. Defaults to `patch`.
147
+
*`lint`: runs both JavaScript and style linters
148
+
*`bump`: bumps semver version of `package.json`file.
159
149
160
150
## Project Info
161
151
162
152
WOK was created by [Marco Solazzi](https://github.com/dwightjack) with contributions from [Matteo Guidotto](https://github.com/mguidotto) and [Umberto Quintarelli](https://github.com/quincia).
0 commit comments