This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
83 lines (72 loc) · 2 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* Scaffold gulp build system. Includes API to configure
* your Scaffold install for a number of modern frontend
* techniques.
*/
var extend = require('extend');
var gulp = require('gulp');
var StylesTask = require('./src/styles-task.js');
function Scaffold() {
this.gulp = gulp;
// Default task options.
this.defaultOptions = {
styles: {
name: 'styles',
input: '/src/styles/**/*.css',
watch: '/src/styles/**/*.css',
output: '/public/css/main.css',
minify: false,
language: 'css',
},
scripts: {
name: 'scripts',
input: '/src/js/**/*.js',
watch: '/src/js/**/*.js',
output: '/public/js/app.js',
uglify: false,
language: 'js',
},
images: {
name: 'images',
input: '/src/img/**/*',
watch: '/src/img/**/*',
output: '/public/img',
compress: false,
}
};
}
/**
* Create a new styles task, creating the gulp task and
* setting up the way we're handling the style assets.
*
* @param {Function} callback
* @return {void}
*/
Scaffold.prototype.styles = function(callback) {
// Create a custom task instance, specifically
// setup to build styles.
var task = new StylesTask(this.defaultOptions.styles);
// We want to re-capture the task.
task = callback(task);
// Create a new gulp task from our "Task"
gulp.task(task.name, function() {
// Build pipe of build using options
// which have been set on the task.
});
};
module.exports = new Scaffold;
// var Scaffold = require('scaffold-gulp');
//
// Scaffold.styles(function(task) {
// return task.input('/src/scss/main.scss')
// .scss()
// .minify()
// .output('/public/assets/css/main.css');
// });
//
// Scaffold.scripts()
// .input('/src/js/**/*')
// .browserify()
// .uglify()
// .output('/public/assets/js/app.js');
//