Skip to content

Commit

Permalink
Remove not needed file
Browse files Browse the repository at this point in the history
- Cleanup comments
- Cleanup and update dependencies
- Fix undefined args issue
- Fix typo and skip console output on skipPrompting
- Add missing react-redux dependency
  • Loading branch information
TheZoker committed Mar 7, 2019
1 parent e02338d commit f6221cd
Show file tree
Hide file tree
Showing 14 changed files with 2,005 additions and 3,441 deletions.
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

0 comments on commit f6221cd

Please sign in to comment.