Skip to content

Commit

Permalink
refactor: naming clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Florens Verschelde committed Jul 15, 2016
1 parent de61946 commit 6b882cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Changing the location of the gulp scripts
-----------------------------------------

- If you rename the `assets/config.js` file or move it somewhere else, update the `assets` property in the `"config"` section of `package.json`.

- If you rename the `gulp` directory or move it somewhere else, update the `--gulpfile` parameters in the `"scripts"` section of `package.json`.


Expand Down Expand Up @@ -74,7 +73,7 @@ Task script: `gulp/builders/sass.js`
// Defaults to 'compressed', can also be: 'nested', 'expanded', 'compact'
outputStyle: 'compressed',
// (Optional) Sass include paths (for @import)
includePaths: []
includePaths: ['node_modules']
}
```

Expand Down
11 changes: 6 additions & 5 deletions gulp/builders/jsconcat.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ var showSize = require('../helpers/size.js')
* @property {string} config.dest - output file name
* @returns {*}
*/
module.exports = function concatJS(config) {
var dest = path.parse(config.dest)
module.exports = function buildJsConcat(config) {
var destInfo = path.parse(config.dest)

return gulp.src(config.src)
.pipe( plumber(notify) )
.pipe( sourcemaps.init() )
.pipe( concat(dest.base) )
.pipe( concat(destInfo.base) )
.pipe( uglify() )
.pipe( showSize(dest.dir) )
.pipe( showSize(destInfo.dir) )
.pipe( sourcemaps.write('.') )
.pipe( gulp.dest(dest.dir) )
.pipe( gulp.dest(destInfo.dir) )
}
10 changes: 5 additions & 5 deletions gulp/builders/svgsprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ var showSize = require('../helpers/size.js')
* @property {boolean} config.inline - for inlining in HTML documents
* @returns {*}
*/
module.exports = function makeSvgSprite(config) {
module.exports = function buildSvgSprite(config) {
// Prepare options
var dest = path.parse(config.dest)
var destInfo = path.parse(config.dest)
var opts = {
mode: { symbol: { dest: '.', sprite: dest.base } },
mode: { symbol: { dest: '.', sprite: destInfo.base } },
shape: { id: {separator: '-'}, transform: ['svgo'] }
}
if (config.inline) {
Expand All @@ -39,6 +39,6 @@ module.exports = function makeSvgSprite(config) {
return gulp.src( config.src )
.pipe( plumber(notify) )
.pipe( svgSprite(opts) )
.pipe( showSize(dest.dir) )
.pipe( gulp.dest(dest.dir) )
.pipe( showSize(destInfo.dir) )
.pipe( gulp.dest(destInfo.dir) )
}

0 comments on commit 6b882cb

Please sign in to comment.