-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGruntfile.js
More file actions
83 lines (75 loc) · 2.19 KB
/
Copy pathGruntfile.js
File metadata and controls
83 lines (75 loc) · 2.19 KB
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
/**
* Development Gruntfile for the "grunt-drupal-bootstrap" NPM module.
*
* The MIT License (MIT)
* Copyright (c) 2016 Mark Carver
*/
module.exports = function (grunt) {
'use strict';
// Grunt initialization.
// -----------------------------------------------------------------------
grunt.initConfig({
compile: {
less: {
options: {}, // less or node-sass plugin options.
files: {
"css/less/bootstrap.css": "less/bootstrap.less"
}
},
sass: {
options: {}, // less or node-sass plugin options.
files: {
"css/sass/bootstrap.css": "scss/bootstrap.scss"
}
}
},
nodeunit: {
all: ['test/*-test.js']
},
jshint: {
options: {
jshintrc: true
},
all: [
'index.js',
'Gruntfile.js',
'package.json',
'lib/**/*.js'
]
}
});
// Load this module's tasks.
// -----------------------------------------------------------------------
grunt.loadTasks('tasks');
//Load NPM module Grunt tasks.
//-----------------------------------------------------------------------
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.registerPromise('test-install-less', function () {
var bootstrap = require('./');
var file = require('./lib/util/file');
bootstrap.init({
"package": "bootstrap",
"version": "3.3.6",
"preprocessor": "less"
});
return file.exists('bootstrap').then(function (exists) {
if (exists) return file.remove('bootstrap');
}).then(bootstrap.install.bind(bootstrap));
});
grunt.registerPromise('test-install-sass', function () {
var bootstrap = require('./');
var file = require('./lib/util/file');
bootstrap.init({
"package": "bootstrap-sass",
"version": "3.3.6",
"preprocessor": "sass"
});
return file.exists('bootstrap-sass').then(function (exists) {
if (exists) return file.remove('bootstrap-sass');
}).then(bootstrap.install.bind(bootstrap));
});
// Register "default" and "test" tasks.
grunt.registerTask('test', ['jshint', 'nodeunit']);
grunt.registerTask('default', ['test']);
};