-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
executable file
·88 lines (81 loc) · 1.87 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
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
84
85
86
87
88
'use strict';
/* global module: false */
module.exports = function gruntInit( grunt ) {
// Project configuration.
const baseDocPath = 'doc';
// const doccoPath = `${ baseDocPath }/docco`;
//const jsdocPath = baseDocPath;//`${ baseDocPath }/jsdoc`;
const jsLib = /*['lib/adapters/baseAdapter.js'] ||*/ [
'index.js',
'lib/**/*.js',
'!node_modules/**/*',
];
const jsFilesWTests = jsLib.concat([
'Gruntfile.js',
'test/**/*.js',
]);
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),
eslint: {
options: {
format: 'stylish', //'node_modules/eslint-tap',
fix: true,
},
info: {
options: {
silent: true,
},
src: jsFilesWTests,
},
strict: {
options: {},
src: jsFilesWTests,
},
},
// docco_husky: {
// files: {
// expand: true,
// src: jsFilesWTests,
// },
// output_dir: doccoPath,
// project_name: 'Diaspora',
// template_dir: 'node_modules/diaspora_doc/docco',
// readme: 'README-docco.md',
// },
// jsdoc: {
// src: /*['lib/adapters/baseAdapter.js'],*/jsLib,
// options: {
// private: true,
// destination: jsdocPath,
// template: 'node_modules/diaspora_doc/jsdoc',
// // readme: 'README-jsdoc.md',
// },
// },
clean: {
doc_jsdoc: {
src: [ `${ baseDocPath }/jsdoc` ],
},
doc_docco: {
src: [ `${ baseDocPath }/docco` ],
},
},
});
//grunt.loadNpmTasks( 'grunt-jsdoc' );
// grunt.loadNpmTasks( 'grunt-docco-husky' );
grunt.loadNpmTasks( 'gruntify-eslint' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
require( 'load-grunt-tasks' )( grunt );
grunt.registerTask( 'documentate', [
'lint',
'clean:doc_jsdoc',
'clean:doc_docco',
//'jsdoc',
// 'docco_husky',
]);
grunt.registerTask( 'lint', [
'eslint:info',
]);
grunt.registerTask( 'all', [
'documentate',
]);
};