Skip to content

Commit

Permalink
chore(version bump): also fix for example projects and interface export
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnm committed Apr 4, 2019
1 parent a0b698f commit c3865ae
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/project-exporters/react-basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import projectJson from '../../uidl-samples/project-state-components.json'
import customMapping from './custom-mapping.json'

import { createReactBasicGenerator } from '../../../src'
import { ProjectUIDL } from '../../../src/typings/uidl-definitions'
import { ProjectGeneratorFunction } from '../../../src/typings/generators'

const writeToDisk = async (
// @ts-ignore
projectUIDL: ProjectUIDL,
// @ts-ignore
generatorFunction: ProjectGeneratorFunction,
templatePath: string = 'project-template',
distPath: string = 'dist'
Expand Down
8 changes: 2 additions & 6 deletions examples/project-exporters/react-next/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
// @ts-ignore
import path from 'path'
import { removeDir, copyDirRec, readJSON, writeFolder } from '../utils/path-utils'

// @ts-ignore
import projectJson from '../../uidl-samples/project-state-components.json'

import { createReactNextGenerator } from '../../../src'
import { ProjectUIDL } from '../../../src/typings/uidl-definitions'
import { ProjectGeneratorFunction } from '../../../src/typings/generators'

const writeToDisk = async (
// @ts-ignore
projectUIDL: ProjectUIDL,
// @ts-ignore
generatorFunction: ProjectGeneratorFunction,
templatePath: string = 'project-template',
distPath: string = 'dist'
) => {
// @ts-ignore
await removeDir(path.join(__dirname, distPath))
// @ts-ignore
await copyDirRec(templatePath, path.join(__dirname, distPath))
const packageJsonTemplate = path.join(templatePath, 'package.json')
const packageJson = await readJSON(packageJsonTemplate)
Expand All @@ -30,7 +27,6 @@ const writeToDisk = async (
sourcePackageJson: packageJson,
distPath,
})
// @ts-ignore
await writeFolder(outputFolder, __dirname)
} catch (error) {
throw new Error(error)
Expand Down
1 change: 1 addition & 0 deletions examples/project-exporters/utils/path-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as fs from 'fs'
import path from 'path'
import rimraf from 'rimraf'
import { GeneratedFolder } from '../../../src/typings/generators'

interface FileInfo {
filename: string
Expand Down
4 changes: 2 additions & 2 deletions examples/project-exporters/vue-basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { removeDir, copyDirRec, readJSON, writeFolder } from '../utils/path-util
import projectJson from '../../uidl-samples/project-state-components.json'

import { createVueBasicGenerator } from '../../../src'
import { ProjectUIDL } from '../../../src/typings/uidl-definitions'
import { ProjectGeneratorFunction } from '../../../src/typings/generators'

const writeToDisk = async (
// @ts-ignore
projectUIDL: ProjectUIDL,
// @ts-ignore
generatorFunction: ProjectGeneratorFunction,
templatePath: string = 'project-template',
distPath: string = 'dist'
Expand Down
4 changes: 2 additions & 2 deletions examples/project-exporters/vue-nuxt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { removeDir, copyDirRec, readJSON, writeFolder } from '../utils/path-util
import projectJson from '../../uidl-samples/project-state-components.json'

import { createVueNuxtGenerator } from '../../../src'
import { ProjectUIDL } from '../../../src/typings/uidl-definitions'
import { ProjectGeneratorFunction } from '../../../src/typings/generators'

const writeToDisk = async (
// @ts-ignore
projectUIDL: ProjectUIDL,
// @ts-ignore
generatorFunction: ProjectGeneratorFunction,
templatePath: string = 'project-template',
distPath: string = 'dist'
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": "@teleporthq/teleport-code-generators",
"version": "0.5.0",
"version": "0.5.1",
"description": "Code generators and UIDL definition library",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/component-generators/react/react-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const enum ReactComponentStylingFlavors {
CSSModules = 'CSSModules',
}

interface ReactGeneratorFactoryParams {
export interface ReactGeneratorFactoryParams {
variation?: ReactComponentStylingFlavors
customMapping?: Mapping
}
Expand Down

0 comments on commit c3865ae

Please sign in to comment.