mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
edf4c75bbd
* chore(): modify dist paths * fixes
38 lines
1.2 KiB
JavaScript
38 lines
1.2 KiB
JavaScript
var config = require('../config.json');
|
|
var projectPackage = require('../../package.json');
|
|
var path = require('path');
|
|
var fs = require('fs-extra-promise').useFs(require('fs-extra'));
|
|
|
|
module.exports = function(gulp) {
|
|
gulp.task('docs', [], function() {
|
|
var Dgeni = require('dgeni');
|
|
var semver = require('semver');
|
|
try {
|
|
var ionicPackage = require('./dgeni-config')(projectPackage.version);
|
|
var dgeni = new Dgeni([ionicPackage]);
|
|
return dgeni.generate().then(function(docs) {
|
|
console.log(docs.length + ' docs generated');
|
|
});
|
|
} catch (err) {
|
|
console.log(err.stack);
|
|
}
|
|
});
|
|
|
|
gulp.task('readmes', [], function() {
|
|
var Dgeni = require('dgeni');
|
|
var semver = require('semver');
|
|
|
|
fs.copySync(path.resolve(__dirname, '..', '..', 'README.md'), path.resolve(__dirname, '..', '..', config.pluginDir, 'core', 'README.md'));
|
|
|
|
try {
|
|
var ionicPackage = require('./dgeni-readmes-config')(projectPackage.version);
|
|
var dgeni = new Dgeni([ionicPackage]);
|
|
return dgeni.generate().then(function(docs) {
|
|
console.log(docs.length + ' README files generated');
|
|
});
|
|
} catch (err) {
|
|
console.log(err.stack);
|
|
}
|
|
});
|
|
}
|