Skip to content

Commit 799fd9b

Browse files
author
Florens Verschelde
committed
doc: version bump and documentation tweaks
1 parent e3e4358 commit 799fd9b

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules
2+
public
3+
source

README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
Configurable assets builder
22
===========================
33

4-
A collection of configurable [gulp][] tasks we use to build front-end code, mostly for fully static or CMS-based website projects. Includes Sass with Autoprefixer, SVG sprites and JS minification.
5-
6-
*Some highlights:*
4+
A collection of configurable [gulp][] tasks we use to build front-end code, mostly for fully static or CMS-based website projects.
75

86
- Flexible configuration
9-
- Adds useful logs (written files, errors, warnings)
10-
- Plus system notifications for errors
7+
- Useful logs and system alerts
8+
- Built-in tasks: Sass with Autoprefixer, SVG sprites and JS minification
119
- Easy to remove or edit built-in tasks, or write your own
1210

1311
*Table of contents:*
@@ -35,7 +33,7 @@ There are two commands than you can use:
3533
- `npm run build` (build CSS/JS/SVG once)
3634
- `npm run watch` (build CSS/JS/SVG when files are changed)
3735

38-
(Advanced use: if you want access to more gulp commands, you can install gulp globally with `npm install -g gulp`, and run commands such as `gulp --tasks` to list all individual tasks.)
36+
Important: if you’re using Git, don’t forget to add `node_modules` to your `.gitignore`, to avoid versioning the many files installed by npm.
3937

4038

4139
Configuring tasks
@@ -166,5 +164,5 @@ If you want to write a new or different task (for example, one that transpiles E
166164

167165
[gulp]: http://gulpjs.com/
168166
[Node.js]: https://nodejs.org
169-
[ZIP]: https://github.com/gradientz/assets-builder/archive/config-in-gulpfile.zip
167+
[ZIP]: https://github.com/gradientz/assets-builder/archive/master.zip
170168
[DOC_SVG_SPRITES]: http://fvsch.com/code/svg-icons/how-to/

gulpfile.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@
77
* https://github.com/gradientz/assets-builder/blob/master/README.md
88
*
99
* You can write your own tasks by adding a script in:
10-
* 'assets-builder/builders'. If you’re using Node packages or gulp
11-
* plugins, don’t forget to add them to your package.json.
12-
*
10+
* 'assets-builder/tasks'. If you’re using Node packages or gulp
11+
* plugins, don’t forget to add them to your package.json with
12+
* `npm install [package-name] --save-dev`
1313
*/
14-
var config = {
15-
// Sass+Autoprefixer config. We watch files in subfolders
14+
require('./assets-builder')({
15+
16+
// Sass + Autoprefixer config. We watch files in subfolders
1617
// but only build the SCSS files at the styles root.
1718
sass: {
1819
src: 'source/styles/*.scss',
1920
watch: 'source/styles/**/*.scss',
2021
dest: 'public/css',
2122
browsers: ['last 3 versions', 'ie >= 11', 'ios >= 9', 'android >= 5']
2223
},
24+
2325
// JS concatenation + minification config. You can take JS files
2426
// from node_modules, just remember to install them like this:
2527
// npm install jquery --save
@@ -32,6 +34,7 @@ var config = {
3234
dest: 'public/js/main.js',
3335
watch: true // watch the src files
3436
},
37+
3538
// SVG symbol sprite config. Here we are making two sprites
3639
// from two folders, a small one with critical icons to be
3740
// inlined in HTML pages, and the main external sprite.
@@ -49,7 +52,5 @@ var config = {
4952
watch: true
5053
}
5154
]
52-
}
5355

54-
// Register Gulp tasks
55-
require('./assets-builder')(config)
56+
})

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "assets-builder",
33
"private": true,
4-
"version": "2.0.0-beta1",
4+
"version": "2.0.0",
55
"scripts": {
66
"build": "gulp build",
77
"watch": "gulp watch"

0 commit comments

Comments
 (0)