Skip to content

Commit 8a6d636

Browse files
committed
Merge pull request #22 from antoniocapelo/fixing_less_file_array_example
Fixing less file array example
2 parents 8a68f4f + a5f9d59 commit 8a6d636

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Required config keys are:
9696
* `example.dist` - the directory to build the distribution to
9797
* `example.files[]` - files will be copied as-is into the `example.dist` folder
9898
* `example.scripts[]` - scripts will be transpiled with babel and bundled by browserify
99-
* `example.less[]` - stylesheets will be generated with LESS
99+
* `example.less[]` - stylesheets will be generated with LESS. Remember to update *css* file references on html.
100100
* `example.port` - port to serve examples on, defaults to `8000`
101101

102102
### Example

tasks/examples.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ module.exports = function (gulp, config) {
151151
}), ['build:example:files']);
152152

153153
var watchLESS = [];
154-
if (config.example.less) {
155-
watchLESS.push(config.example.src + '/' + config.example.less);
154+
if (config.example.less && config.example.less.length > 0) {
155+
config.example.less.forEach(function(fileName) {
156+
watchLESS.push(config.example.src + '/' + fileName);
157+
});
156158
}
157159

158160
if (config.component.less && config.component.less.path) {

0 commit comments

Comments
 (0)