Skip to content

Commit

Permalink
Merge pull request #145 from swisspush/develop
Browse files Browse the repository at this point in the history
Release 0.9.6
  • Loading branch information
lbovet authored Aug 26, 2020
2 parents 9346dcd + 8174597 commit 0813ae9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion bin/apikana
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var colors = require('ansi-colors');
var params = require('../src/params');
var compareVersions = require('compare-versions');
var packge = require('../package.json');
var yaml = require('yamljs');
var argc = process.argv.length;

require('../src/logo');
Expand Down Expand Up @@ -114,6 +115,7 @@ function generate() {
const os = require('os');
const currentPath = process.cwd();
const packageJSON = JSON.parse(fs.readFileSync(path.resolve(currentPath, './package.json')));
const openapi = yaml.parse(fs.readFileSync(path.resolve(currentPath, './src/openapi/api.yaml')).toString());

const PluginManager = require('live-plugin-manager').PluginManager;
const manager = new PluginManager({
Expand All @@ -124,7 +126,8 @@ function generate() {
function run(defaults) {
var plop = nodePlop(__dirname + '/../src/plopfile_start.js', { defaults });
var generator = plop.getGenerator('start');
generator.runActions(packageJSON).then(_ => {
const model = Object.assign({}, packageJSON, { api: openapi });
generator.runActions(model).then(_ => {
require('../src/generate').generate(path.resolve(source), params.target());
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apikana",
"version": "0.9.5",
"version": "0.9.6",
"description": "Integrated tools for REST API design - アピ",
"main": "index.js",
"bin": {
Expand Down
5 changes: 3 additions & 2 deletions src/plopfile_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ module.exports = function (plop, cfg) {
default: Object.keys(defaults && defaults.plugins || {}).filter(key => defaults.plugins[key].active),
choices: [
{ name: 'Maven artifact with Java classes', value: 'maven' },
{ name: 'C# project', value: 'dotnet' }
{ name: 'C# project', value: 'dotnet' },
{ name: 'Generate README', value: 'readme' }
]
},{
type: 'input',
Expand Down Expand Up @@ -210,7 +211,7 @@ module.exports = function (plop, cfg) {
actions.push({
type: 'add',
path: slash(path.join(currentPath, answers.projectName, '.gitignore')),
template: "node_modules/\ndist/\ngen/\n.vscode/\n.idea/\n*.iml\n.settings/\n.project/",
template: "node_modules/\ndist/\n/gen/\n.vscode/\n.idea/\n*.iml\n.settings/\n.project/",
skipIfExists: true
});

Expand Down

0 comments on commit 0813ae9

Please sign in to comment.