-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
32 lines (21 loc) · 921 Bytes
/
gulpfile.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
// == Imports ===============================================================
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
// == Constants =============================================================
// == Support Functions =====================================================
// == Exported Class ========================================================
// == Gulp Tasks ============================================================
gulp.task('api.spec', () => {
const linodeius = require('./lib/linodeius');
const api = require('./lib/api');
return api.call(linodeius.apiKey, 'api.spec').then(spec => {
const specPath = path.resolve(
__dirname,
`api.spec/version-${spec.version}.json`
);
var specFile = fs.createWriteStream(specPath);
specFile.write(JSON.stringify(spec, null, 2));
});
});
gulp.task('default', [ 'api.spec' ]);