Skip to content

Commit

Permalink
chore: merge specification into core package
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 16, 2020
1 parent cbeb180 commit c515350
Show file tree
Hide file tree
Showing 171 changed files with 1,449 additions and 1,976 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- [Motivation](#motivation-1)
- [Limitations](#limitations)
- [Core packages](#core-packages)
- [@component-controls/specification](#component-controlsspecification)
- [@component-controls/core](#component-controlscore)
- [@component-controls/core](#component-controlscore-1)
- [@component-controls/instrument](#component-controlsinstrument)
- [@component-controls/loader](#component-controlsloader)
- [@component-controls/webpack-compile](#component-controlswebpack-compile)
Expand Down Expand Up @@ -123,22 +123,22 @@ Storybook Addon For live editing of component controls

# Core packages

<package-section file="./core/specification/README.md" section="overview" />
<package-section file="./core/core/README.md" section="overview" />

<!-- START-PACKAGE-SECTION -->

## [@component-controls/specification](https://github.com/ccontrols/component-controls/blob/master/core/specification)
## [@component-controls/core](https://github.com/ccontrols/component-controls/blob/master/core/core)

Component controls specification with typescript definitions
Component controls core types and utility functions

Typescript definitions of the component-controls specification.
Type definitions of the component-controls specification and accompanying utility functions.
Includes definitions for:

- [Story](https://github.com/ccontrols/component-controls/tree/master/core/specification#story)
- [Stories](https://github.com/ccontrols/component-controls/tree/master/core/specification#stories)
- [ControlTypes](https://github.com/ccontrols/component-controls/tree/master/core/specification#controltypes)
- [ComponentControl](https://github.com/ccontrols/component-controls/tree/master/core/specification#componentcontrol)
- [PropTypes](https://github.com/ccontrols/component-controls/tree/master/core/specification#proptypes)
- [Story](https://github.com/ccontrols/component-controls/tree/master/core/core#story)
- [Stories](https://github.com/ccontrols/component-controls/tree/master/core/core#stories)
- [ControlTypes](https://github.com/ccontrols/component-controls/tree/master/core/core#controltypes)
- [ComponentControl](https://github.com/ccontrols/component-controls/tree/master/core/core#componentcontrol)
- [PropTypes](https://github.com/ccontrols/component-controls/tree/master/core/core#proptypes)
- and more...

<!-- END-PACKAGE-SECTION -->
Expand All @@ -149,7 +149,17 @@ Includes definitions for:

## [@component-controls/core](https://github.com/ccontrols/component-controls/blob/master/core/core)

Component controls core utility routines
Component controls core types and utility functions

Type definitions of the component-controls specification and accompanying utility functions.
Includes definitions for:

- [Story](https://github.com/ccontrols/component-controls/tree/master/core/core#story)
- [Stories](https://github.com/ccontrols/component-controls/tree/master/core/core#stories)
- [ControlTypes](https://github.com/ccontrols/component-controls/tree/master/core/core#controltypes)
- [ComponentControl](https://github.com/ccontrols/component-controls/tree/master/core/core#componentcontrol)
- [PropTypes](https://github.com/ccontrols/component-controls/tree/master/core/core#proptypes)
- and more...

<!-- END-PACKAGE-SECTION -->

Expand Down
66 changes: 0 additions & 66 deletions core/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
- [extractStories](#extractstories)
- [getConfigurationArg](#getconfigurationarg)
- [loadConfiguration](#loadconfiguration)
- [BuildConfiguration](#buildconfiguration)
- [PageType](#pagetype)
- [WebpackConfig](#webpackconfig)
- [PageConfiguration](#pageconfiguration)
- [WebpackConfigFn](#webpackconfigfn)

# Overview

Expand Down Expand Up @@ -109,65 +104,4 @@ _defined in [@component-controls/config/src/index.ts](https://github.com/ccontro
| `args` | string\[] | optional arguments |
| `returns` | [ConfigrationResult](#configrationresult) \| undefined | |

## BuildConfiguration

global configuration used at build time
stored in a file named main.js/main.ts

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L45)_



### properties

| Name | Type | Description |
| -------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `categories` | [PageType](#pagetype)\[] | page types that are considred as categories fields as well |
| `finalWebpack` | [WebpackConfig](#webpackconfig) | |
| `pages` | Record&lt;[PageType](#pagetype), Pick&lt;[PageConfiguration](#pageconfiguration), 'basePath'>> | base url path for API documentation pages. Default is "docs/" |
| `stories` | string\[] | wild card search string for the stories internally using \`glob\` for the search: https&#x3A;//www.npmjs.com/package/glob example: "./stories/ |
| `webpack` | [WebpackConfig](#webpackconfig) | custom webpack fonfigurations setup. One or the other will be used |

## PageType

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L4)_

'story' | 'blog' | 'page' | 'tags' | 'author'

## WebpackConfig

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L39)_

[WebpackConfiguration](#webpackconfiguration) \| [WebpackConfigFn](#webpackconfigfn)

## PageConfiguration

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L6)_



### properties

| Name | Type | Description |
| ---------- | ------- | ---------------------------------------------- |
| `basePath` | string | base url path for the page |
| `fullPage` | boolean | whether to take a fullpage theme option |
| `label` | string | label - used for menu labels |
| `sidebars` | boolean | whether to add navigation sidebars to the page |
| `topMenu` | boolean | whether to add to the top navigation menu |

## WebpackConfigFn

_defined in [@component-controls/specification/src/configuration.ts](https://github.com/ccontrols/component-controls/tree/master/core/specification/src/configuration.ts#L35)_

**function** (`config`\*: [WebpackConfiguration](#webpackconfiguration), `options`: any): [WebpackConfiguration](#webpackconfiguration);

### parameters

| Name | Type | Description |
| --------- | --------------------------------------------- | ----------- |
| `config*` | [WebpackConfiguration](#webpackconfiguration) | |
| `options` | any | |
| `returns` | [WebpackConfiguration](#webpackconfiguration) | |

<!-- END-TSDOC-TYPESCRIPT -->
2 changes: 1 addition & 1 deletion core/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"license": "MIT",
"dependencies": {
"@component-controls/specification": "^1.2.0",
"@component-controls/core": "^1.2.0",
"glob": "^7.1.6",
"typescript": "^3.8.3",
"yargs": "^15.3.1"
Expand Down
2 changes: 1 addition & 1 deletion core/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as fs from 'fs';
import { sync as globSync } from 'glob';
import yargs from 'yargs';
import { BuildConfiguration } from '@component-controls/specification';
import { BuildConfiguration } from '@component-controls/core';

export const buildConfigFileNames = ['buildtime.js', 'build.js', 'main.js'];

Expand Down
14 changes: 14 additions & 0 deletions core/config/test/__snapshots__/stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ Array [
"/Users/atanasster/component-controls/ui/components/src/ActionContainer/ActionContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/BlockContainer/BlockContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Collapsible/Collapsible.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/ColorMode/ColorMode.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Markdown/Markdown.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Navmenu/Navmenu.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Pagination/Pagination.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/PanelContainer/PanelContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Popover/Popover.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Sidebar/Sidebar.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Source/Source.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Subheading/Subjeading.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Subtitle/Subtitle.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Table/Table.stories.tsx",
Expand Down Expand Up @@ -68,11 +75,18 @@ Array [
"/Users/atanasster/component-controls/ui/components/src/ActionContainer/ActionContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/BlockContainer/BlockContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Collapsible/Collapsible.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/ColorMode/ColorMode.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/ExternalLink/ExternalLink.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Header/Header.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Link/Link.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Markdown/Markdown.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Navmenu/Navmenu.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Pagination/Pagination.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/PanelContainer/PanelContainer.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Popover/Popover.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Sidebar/Sidebar.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Source/Source.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Subheading/Subjeading.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Subtitle/Subtitle.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/SyntaxHighlighter/SyntaxHighlighter.stories.tsx",
"/Users/atanasster/component-controls/ui/components/src/Table/Table.stories.tsx",
Expand Down
Loading

0 comments on commit c515350

Please sign in to comment.