Skip to content

Commit

Permalink
Merge pull request #37 from ConnectHolland/3.0.0.rc1
Browse files Browse the repository at this point in the history
3.0.0.rc1
  • Loading branch information
ahoek committed May 19, 2016
2 parents 247ef6b + 84f37e1 commit 3d48880
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 70 deletions.
45 changes: 3 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Gulp tasks
A collection of configurable tasks that can be used to generate most of the necessary frontend files like css, javascript, fonticons and more…
A collection of configurable tasks that can be used to generate most of the necessary frontend assets like css, javascript, fonticons and more…

## Install npm (preferred)
## Install with npm

```bash
npm install connectholland-gulp-tasks --save-dev
Expand All @@ -24,35 +24,6 @@ taskLoader({

```

## Install bower
Add to bower.json

```json
{
"dependencies": {
"gulp-tasks": "https://github.com/ConnectHolland/gulp-tasks.git#^2.0"
}
}
```
Because this collection of tasks is more npm minded you need to make sure you have all the node modules installed that are required by this package (https://github.com/ConnectHolland/gulp-tasks/blob/master/package.json)

gulpfile.js

```javascript
'use strict';

var gulp = require('gulp');
var taskLoader = require('gulp-simple-task-loader');
var config = require('./config.json');

// Load the tasks usingthe taskloader
taskLoader({
taskDirectory: 'bower_components/gulp-tasks/tasks',
config: config
}, gulp);

```

## Configuration
config.json

Expand Down Expand Up @@ -156,17 +127,7 @@ To disable linting or to use a custom config file, you can add a linting object

## Javascript task

To use the EcmaScript 2015 (ES6) transpiling, add the following dependencies:

```bash
npm install babel-preset-es2015 gulp-babel gulp-plumber --save-dev
```

To enable the javascript linter, add eslint:

```bash
npm install gulp-eslint --save-dev
```
To use the EcmaScript 2015 (ES6) transpiling or to enable the javascript linter, you must enable it in the config file

Example configuration:

Expand Down
27 changes: 0 additions & 27 deletions bower.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connectholland-gulp-tasks",
"version": "2.2.10",
"version": "3.0.0",
"description": "A collection of tasks to load by gulp",
"main": "tasks/default.js",
"dependencies": {
Expand Down
44 changes: 44 additions & 0 deletions resources/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"default_tasks": [
"sass",
"javascript"
],
"install_tasks": ["icons"],
"production": true,
"sass": {
"src": [
"style/*.scss"
],
"dest": "web/assets/css",
"watch": [
"style/**/*.scss"
],
"includePaths": [
"node_modules/normalize-scss"
],
"autoprefix": [
"last 2 versions"
]
},
"javascript": {
"items": [
{
"src": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/jquery-noconflict/index.js"],
"outputname": "body.min.js",
"dest": "web/assets/javascript/"
}
],
"watch": [
"javascript/**/*.js"
]
},
"icons": {
"src": [
"icons/*.svg"
],
"dest": "web/assets/fonts/",
"webpath": "/assets/fonts/"
}
}
5 changes: 5 additions & 0 deletions resources/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict'; var gulp = require('gulp'); var taskLoader = require('gulp-simple-task-loader'); var config = require('./config.json');
// Load the tasks usingthe taskloader taskLoader({
taskDirectory: 'node_modules/connectholland-gulp-tasks/tasks',
config: config
}, gulp);
2 changes: 2 additions & 0 deletions tasks/bodyjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = function (gulp, config) {
var include = require('gulp-include');
var uglify = require('gulp-uglify');

util.log(util.colors.red("bodyjs is depricated:"),"please use the javascript task to replace headjs and bodyjs. support will be dropped in gulp-tasks 4");

return gulp.src(config.bodyjs.src)
.pipe(sourcemaps.init())
.pipe(concat('body.min.js'))
Expand Down
2 changes: 2 additions & 0 deletions tasks/headjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = function (gulp, config) {
var include = require('gulp-include');
var uglify = require('gulp-uglify');

util.log(util.colors.red("headjs is depricated:"),"please use the javascript task to replace headjs and bodyjs. support will be dropped in gulp-tasks 4");

return gulp.src(config.headjs.src)
.pipe(sourcemaps.init())
.pipe(concat('head.min.js'))
Expand Down

0 comments on commit 3d48880

Please sign in to comment.