mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
6c938bfdb7
This reverts commit 21ad4734fa
.
40 lines
1.0 KiB
JavaScript
40 lines
1.0 KiB
JavaScript
"use strict";
|
|
const config = require('../config.json'),
|
|
projectPackage = require('../../package.json'),
|
|
path = require('path'),
|
|
fs = require('fs-extra-promise').useFs(require('fs-extra')),
|
|
Dgeni = require('dgeni');
|
|
|
|
module.exports = gulp => {
|
|
gulp.task('docs', [], () => {
|
|
|
|
try {
|
|
|
|
const ionicPackage = require('./dgeni-config')(projectPackage.version),
|
|
dgeni = new Dgeni([ionicPackage]);
|
|
|
|
return dgeni.generate().then(docs => console.log(docs.length + ' docs generated'));
|
|
|
|
} catch (err) {
|
|
console.log(err.stack);
|
|
}
|
|
|
|
});
|
|
|
|
gulp.task('readmes', [], function() {
|
|
|
|
fs.copySync(path.resolve(__dirname, '..', '..', 'README.md'), path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md'));
|
|
|
|
try {
|
|
|
|
const ionicPackage = require('./dgeni-readmes-config')(projectPackage.version),
|
|
dgeni = new Dgeni([ionicPackage]);
|
|
return dgeni.generate().then(docs => console.log(docs.length + ' README files generated'));
|
|
|
|
} catch (err) {
|
|
console.log(err.stack);
|
|
}
|
|
|
|
});
|
|
};
|