-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
47 lines (40 loc) · 1.21 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
'use strict';
module.exports = {
name: '@addepar/ember-toolbox',
includedCommands() {
let lint = require('./lib/lint');
let { formatAll, formatChanged } = require('./lib/format');
let { ui } = this.project;
return {
addePreCommit: {
name: 'adde-pre-commit',
description: 'Addepar Ember Precommit hook command',
run(options, files) {
return formatChanged(ui, files);
},
},
addeFormat: {
name: 'adde-format',
description: 'Addepar Ember automatic formatting command',
run() {
return formatAll(ui);
},
},
addeLint: {
name: 'adde-lint',
description: 'Addepar Ember Lint command',
availableOptions: [
{ name: 'file-names', type: Boolean, default: false, aliases: ['f'] },
{ name: 'javascript', type: Boolean, default: false, aliases: ['j'] },
{ name: 'sass', type: Boolean, default: false, aliases: ['s'] },
],
run(options, files) {
if (options.fileNames || options.javascript || options.sass) {
return lint(ui, files, options);
}
return lint(ui, files);
},
},
};
},
};