Skip to content

Commit

Permalink
fix(Package): Rename schema-interface.ts so it is packaged
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Aug 6, 2019
1 parent 240db88 commit ebd69d0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ts/__tests__/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'fs-extra'
import path from 'path'
import Schema from '../schema.d'
import Schema from '../schema-interface'

export const schema = (name: string): Promise<Schema> =>
fs.readJSON(path.join(__dirname, '..', '..', 'built', name))
Expand Down
2 changes: 1 addition & 1 deletion ts/bindings/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import globby from 'globby'
import path from 'path'
import toposort from 'toposort'
import * as schema from '../schema'
import Schema from '../schema.d'
import Schema from '../schema-interface'

export type Schema = Schema

Expand Down
2 changes: 1 addition & 1 deletion ts/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export {default as Schema} from './schema.d'
export { default as Schema } from './schema-interface'
export * from './types'
export * from './util'
5 changes: 1 addition & 4 deletions ts/schema.d.ts → ts/schema-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* in this repository e.g. generation of `*.json.schema` files by `./schema.ts`.
*/

import { JSONSchema7, JSONSchema7Definition } from 'json-schema'
import { JSONSchema7 } from 'json-schema'

/**
* Interface for Stencila `Schema` instances.
Expand Down Expand Up @@ -81,9 +81,6 @@ export default interface Schema extends JSONSchema7 {
* A map of property aliases.
* Added during schema processing based on the `aliases`
* of properties.
*
* TODO: Currently we use `aliases.json`, a separate file,
* for storing aliases, but this could be used instead.
*/
propertyAliases?: { [key: string]: string }

Expand Down
2 changes: 1 addition & 1 deletion ts/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import yaml from 'js-yaml'
import cloneDeep from 'lodash.clonedeep'
import path from 'path'
import log from './log'
import Schema from './schema.d'
import Schema from './schema-interface'

const SCHEMA_SOURCE_DIR = path.join(__dirname, '..', 'schema')
const SCHEMA_DEST_DIR = path.join(__dirname, '..', 'built')
Expand Down

0 comments on commit ebd69d0

Please sign in to comment.