-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
49 lines (45 loc) · 1.51 KB
/
Gruntfile.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
var fs = require('fs');
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
connect: {
server: {
options: {
hostname: 'grushikhin.local',
base: 'public',
keepalive: true,
middleware: function(connect, options) {
return [
connect.static(options.base),
function(req, res, next) {
fs.readFile(options.base + '/index.html', 'utf8', function(e, html) {
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.end(html);
});
}
];
}
}
}
}
// ,
// stylus: {
// // Êîìïèëÿöèÿ Stylus â CSS
// compile: {
//// options: {
//// 'compress': true,
//// 'paths': ['public/js/modules/common/styles/']
//// },
// files: {
// 'public/js/modules/common/styles/menu.css': 'menu.styl'
// }
// }
// }
});
grunt.loadNpmTasks('grunt-contrib-connect');
// // Çàãðóçêà ìîäóëÿ äëÿ êîìïèëÿöèè Ñòèëóñà
// grunt.loadNpmTasks('grunt-stylus');
//
// // Îáúÿâëåíèå òàñêîâ
// grunt.registerTask('default', 'stylus');
};