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

Cleanup code and update dependencies #13

Merged
merged 1 commit into from
Mar 11, 2019
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
6 changes: 6 additions & 0 deletions generator-jsonforms/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion generator-jsonforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"yeoman-generator": "^3.2.0"
},
"devDependencies": {
"typescript": "^3.2.2"
"@types/figlet": "^1.2.0",
"typescript": "^3.3.3333"
}
}
21 changes: 10 additions & 11 deletions generator-jsonforms/src/generators/app/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
// tslint:disable:no-var-requires
// tslint:disable:no-require-imports
'use strict';

import Generator from 'yeoman-generator';
import chalk from 'chalk';
const clear = require('clear');
const figlet = require('figlet');
const validate = require('validate-npm-package-name');
import { textSync } from 'figlet';
import { join, sep } from 'path';
import { readFile, writeFile } from 'fs';
import { promisify } from 'util';
const clear = require('clear');
const validate = require('validate-npm-package-name');

enum ProjectRepo {
Example = 'make-it-happen-react',
Expand Down Expand Up @@ -45,7 +44,7 @@ export class JsonformsGenerator extends Generator {
this.repo = '';
this.path = this.options.path;
this.name = this.options.name;
this.skipPrompting = this.options.skipPromting;
this.skipPrompting = this.options.skipPrompting;

if (this.project === Project.Example) {
this.repo = ProjectRepo.Example;
Expand All @@ -56,13 +55,13 @@ export class JsonformsGenerator extends Generator {
}

async prompting() {
clear();
this.log(
chalk.blue(
figlet.textSync('JSONForms Tooling', { horizontalLayout: 'full' }),
),
);
if (!this.skipPrompting) {
clear();
this.log(
chalk.blue(
textSync('JSONForms Tooling', { horizontalLayout: 'full' }),
),
);
this.answers = await this.prompt([
{
name: 'project',
Expand Down
48 changes: 45 additions & 3 deletions jsonforms-tooling-common/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion jsonforms-tooling-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "npm run compile",
"compile": "rimraf out && tsc -p ./ --declaration",
"compile": "rimraf out && tsc -p ./ --declaration --skipLibCheck",
"postinstall": " ",
"custominstall": "npm run postinstall",
"lint": "tslint --project tsconfig.json"
Expand All @@ -19,6 +19,7 @@
"@jsonforms/react": "^2.2.0",
"ajv": "^6.5.5",
"react": "^16.8.3",
"react-redux": "^6.0.0",
"redux": "^3.0.0",
"util": "^0.11.1",
"chokidar": "^2.1.2",
Expand Down
4 changes: 2 additions & 2 deletions jsonforms-tooling-common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const writeFileWithPromise = promisify(writeFile);

/*
* @param {any} editorInstance the instance of the editor
* @param {string} path the arguments passed to the editor call
* @param {string} path the path for the project
* @param {string} project the project, that should be installed
*/
export const createProject = async (editorInstance: any, path: string, project: string) => {
Expand Down Expand Up @@ -49,7 +49,7 @@ export const createProject = async (editorInstance: any, path: string, project:
/**
* Generates the default UI Schema from a json schema
* @param {any} editorInstance the instance of the editor
* @param {string} path the arguments passed to the editor call
* @param {string} path the path to the schema file
*/
export const generateUISchema = async (editorInstance: any, path: string) => {
if (!path) {
Expand Down
Loading