Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.9.6 #145

Merged
merged 3 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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