Skip to content

Commit

Permalink
feat: converted the app schemas to typescript, removed typings file a…
Browse files Browse the repository at this point in the history
…nd related schema scripts. (microsoft#1869)

* feat: remove app json schemas and clean up

* updated recently added schema refrences
  • Loading branch information
eljefe223 authored Jun 18, 2019
1 parent 450a507 commit f7c29da
Show file tree
Hide file tree
Showing 44 changed files with 208 additions and 299 deletions.
2 changes: 1 addition & 1 deletion build/convert-schemas.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Utility for copying schemas to their dist folders.
* Usage: node build/copy-schemas.js
* Usage: node build/convert-schemas.js
*/
const path = require("path");
const fs = require("fs");
Expand Down
30 changes: 0 additions & 30 deletions build/copy-schemas.js

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion packages/fast-components-react-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"clean:dist": "node ../../build/clean.js dist",
"convert:readme": "node ../../build/convert-readme.js .tmp",
"copy:all": "npm run convert:json-schema && npm run copy:readme",
"copy:json-schema": "node ../../build/copy-schemas.js",
"convert:json-schema": "node ../../build/convert-schemas.js",
"copy:readme": "node ../../build/copy-readme.js",
"prepare": "npm run clean:dist && npm run build",
Expand Down
5 changes: 1 addition & 4 deletions packages/fast-components-react-base/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist"
},
"files": [
"typings.d.ts"
]
}
}
4 changes: 0 additions & 4 deletions packages/fast-components-react-base/typings.d.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CarouselDarkImageContentSchema from "./carousel-dark-image-content.schema.json";
import CarouselDarkImageContentSchema from "./carousel-dark-image-content.schema";
import CarouselDarkImageContent from "./carousel-dark-image-content";
export default {
name: "Dark image slide",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export default {
$schema: "http://json-schema.org/schema#",
title: "Carousel Dark Image Content Test Element",
description: "A carousel dark image content component's schema definition.",
id: "carousel-dark-image-content",
type: "object",
properties: {
image: {
title: "Image",
type: "object",
properties: {
src: {
title: "HTML src attribute",
type: "string",
default: "http://placehold.it/1399x600/2F2F2F/171717",
},
alt: {
title: "HTML alt attribute",
type: "string",
},
},
required: ["src"],
},
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CarouselHeroContentSchema from "./carousel-hero-content.schema.json";
import CarouselHeroContentSchema from "./carousel-hero-content.schema";
import CarouselHeroContent from "./carousel-hero-content";
export default {
name: "Hero slide",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
export default {
$schema: "http://json-schema.org/schema#",
title: "Carousel Hero Content Test Element",
description: "A carousel hero content component's schema definition.",
id: "carousel-hero-content",
type: "object",
properties: {
heading: {
title: "Heading",
type: "object",
properties: {
children: {
title: "Heading text",
type: "string",
},
},
},
paragraph: {
title: "Paragraph",
type: "object",
properties: {
children: {
title: "Hero paragraph test text",
type: "string",
},
},
},
callToAction: {
title: "Call to action",
type: "object",
properties: {
children: {
title: "Call to action",
type: "string",
},
href: {
title: "HTML href attribute",
type: "string",
},
appearance: {
title: "Appearance",
type: "string",
default: "primary",
enum: ["primary", "justified", "lightweight"],
},
},
},
image: {
title: "Image",
type: "object",
properties: {
src: {
title: "HTML src attribute",
type: "string",
},
alt: {
title: "HTML alt attribute",
type: "string",
},
},
},
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import CarouselLightImageContentSchema from "./carousel-light-image-content.schema.json";
import CarouselLightImageContentSchema from "./carousel-light-image-content.schema";
import CarouselLightImageContent from "./carousel-light-image-content";
export default {
name: "Light image slide",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {
$schema: "http://json-schema.org/schema#",
title: "Carousel Light Image Content Test Element",
description: "A carousel light image content component's schema definition.",
id: "carousel-light-image-content",
type: "object",
properties: {
image: {
title: "Image",
type: "object",
properties: {
src: {
title: "HTML src attribute",
type: "string",
},
alt: {
title: "HTML alt attribute",
type: "string",
},
},
},
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PivotItemContentSchema from "./pivot-item-content.schema.json";
import PivotItemContentSchema from "./pivot-item-content.schema";
import PivotItemContent from "./pivot-item-content";
export default {
name: "Pivot item content",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default {
$schema: "http://json-schema.org/schema#",
title: "Pivot Item Content",
description: "A pivot item content component's schema definition.",
id: "pivot-item-content",
type: "object",
properties: {},
reactProperties: {
children: {
title: "Children",
type: "children",
defaults: ["text"],
},
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PivotItemTabSchema from "./pivot-item-tab.schema.json";
import PivotItemTabSchema from "./pivot-item-tab.schema";
import PivotItemTab from "./pivot-item-tab";
export default {
name: "Pivot item tab",
Expand Down
Loading

0 comments on commit f7c29da

Please sign in to comment.