-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generator.js
36 lines (30 loc) · 901 Bytes
/
generator.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
'use strict';
var path = require('path');
var isValid = require('is-valid-app');
module.exports = function(app) {
// returns false if `app` is not an instance of Generate, or `generate-appveyor` is already registered
if (!isValid(app, 'generate-appveyor')) return;
/**
* Generates an `appveyor.yml` file in the current working directory.
*
* ```sh
* $ gen appveyor:appveyor
* ```
* @name appveyor:appveyor
* @api public
*/
app.task('appveyor', { silent: true }, function(cb) {
return app.src('appveyor.yml', {cwd: path.resolve(__dirname, 'templates')})
.pipe(app.dest(app.options.dest || app.cwd));
});
/**
* Alias to enable running the [appveyor](#appveyor) task with the following command:
*
* ```sh
* $ gen appveyor
* ```
* @name appveyor:default
* @api public
*/
app.task('default', { silent: true }, ['appveyor']);
};