Skip to content

Commit

Permalink
chore: Переименовал пакет с докой в core-docs, грубо поправил ошибки TS
Browse files Browse the repository at this point in the history
  • Loading branch information
palmflip committed Apr 29, 2019
1 parent cf9198c commit 0fa42df
Show file tree
Hide file tree
Showing 46 changed files with 99 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
- master
- stage: 'docs'
install:
- npm install --prefix=./examples/nextjs-integration --registry https://registry.npmjs.org/
- npm install --prefix=./packages/core-docs --registry https://registry.npmjs.org/
script:
- npm run build --prefix=./examples/nextjs-integration
- cat './examples/nextjs-integration/node_modules/@asmy/core-design/package.json' | grep version
- npm run build --prefix=./packages/core-docs
- cat './packages/core-docs/node_modules/@asmy/core-design/package.json' | grep version

stages:
- name: libraries
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = api => {
api.cache(false)

return {
babelrcRoots: ['.', 'packages/*', 'examples/*'],
babelrcRoots: ['.', 'packages/*'],
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packages": ["packages/*", "examples/*"],
"packages": ["packages/*"],
"npmClient": "yarn",
"version": "independent",
"useWorkspaces": true,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"test": "echo 'Nothing to test'"
},
"workspaces": [
"packages/*",
"examples/*"
"packages/*"
],
"devDependencies": {
"@commitlint/cli": "^7.5.2",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ const TextLink = Text.withComponent('a')

const Logo: React.FC<ILogoProps> = props => {
return (
<Link href='/docs'>
<TextLink
fontStyle='font_roboto_slab_light'
theme={{dark: {}}}
<Link href="/docs">
<TextLink
fontStyle="font_roboto_slab_light"
theme={{ dark: {} }}
css={css`
margin-top: 0;
margin-bottom: 0;
Expand All @@ -27,11 +27,6 @@ const Logo: React.FC<ILogoProps> = props => {
:hover {
color: rgba(0, 0, 0, 0.7);
${({ theme }) => theme.dark && css`
color: white;
background-color: black;
`}
}
`}
{...props}
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions packages/core-docs/components/docs/Paragraph/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default, Paragraph } from './Paragraph'
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"react-dom": "^16.8.6"
},
"devDependencies": {
"@types/next": "^8.0.4",
"@zeit/next-mdx": "^1.2.0",
"fork-ts-checker-webpack-plugin": "^1.0.2",
"prettier": "^1.17.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,58 @@ import { ProjectLayout } from '../components/ProjectLayout'

import { Grid } from '@asmy/core-design'


const components = {
h1: H1,
h2: H2,
h3: H3,
h4: H4,
h5: H5,
h6: H6,
p: Paragraph,
table: Table,
p: Paragraph,
table: Table,
tr: TableRow,
td: TD,
th: TH,
pre: Pre,
wrapper: Grid,
}

class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {};
interface Props {
pageProps: {
isDocsPage: boolean
}
}

class MyApp extends App<Props> {
public static async getInitialProps({ Component, ctx }) {
let pageProps: Partial<Props['pageProps']> = {}

if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx);
pageProps = await Component.getInitialProps(ctx)
}

if (ctx.pathname.slice(0, 5) === '/docs') {
pageProps.isDocsPage = true
}

return { pageProps };
return { pageProps }
}

render() {
const { Component, pageProps } = this.props;
public render() {
const { Component, pageProps } = this.props

return (
<Container>
{pageProps.isDocsPage
? <ProjectLayout>
<Component
components={components}
{...pageProps}
/>
</ProjectLayout>

: <Component {...pageProps} />
}
{pageProps.isDocsPage ? (
<ProjectLayout>
<Component components={components} {...pageProps} />
</ProjectLayout>
) : (
<Component {...pageProps} />
)}
</Container>
);
)
}
}

export default MyApp;
export default MyApp
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
74 changes: 63 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# yarn lockfile v1


"@asmy/core-design@^0.0.2":
version "0.0.2"
resolved "https://registry.yarnpkg.com/@asmy/core-design/-/core-design-0.0.2.tgz#ad11fbd9f74e9207067de32b8b1e7516d3dbdcd5"
integrity sha512-AoKGzBp62Wy6M9N7W/OqjSrGWJhkfbxszUL/NX2aA0zak4CvA7m3sOuONS6uEKrH3+Ib0/kAeWjLg0jytMwx7w==

"@babel/cli@^7.4.3":
version "7.4.3"
resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.4.3.tgz#353048551306ff42e5855b788b6ccd9477289774"
Expand Down Expand Up @@ -4179,6 +4184,11 @@ buffer@^4.3.0:
ieee754 "^1.1.4"
isarray "^1.0.0"

builtin-modules@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=

builtin-status-codes@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
Expand Down Expand Up @@ -4268,7 +4278,7 @@ callsites@^3.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==

[email protected]:
[email protected], camel-case@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73"
integrity sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=
Expand Down Expand Up @@ -4674,7 +4684,7 @@ [email protected]:
dependencies:
graceful-readlink ">= 1.0.0"

commander@^2.14.1, commander@^2.19.0, commander@^2.8.1, commander@^2.9.0, commander@~2.20.0:
commander@^2.12.1, commander@^2.14.1, commander@^2.19.0, commander@^2.8.1, commander@^2.9.0, commander@~2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
Expand Down Expand Up @@ -5504,6 +5514,11 @@ dezalgo@^1.0.0:
asap "^2.0.0"
wrappy "1"

diff@^3.2.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==

diffie-hellman@^5.0.0:
version "5.0.3"
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
Expand Down Expand Up @@ -10109,6 +10124,11 @@ preserve@^0.2.0:
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=

prettier@^1.17.0:
version "1.17.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008"
integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==

pretty-error@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
Expand Down Expand Up @@ -11799,15 +11819,16 @@ stable@^0.1.8:
resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==

state-toggle@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.1.tgz#c3cb0974f40a6a0f8e905b96789eb41afa1cde3a"
integrity sha512-Qe8QntFrrpWTnHwvwj2FZTgv+PKIsp0B9VxLzLLbSpPXWOgRgc5LVj/aTiSfK1RqIeF9jeC1UeOH8Q8y60A7og==
[email protected]:
version "1.1.2"
resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.2.tgz#4326d33886dc9ecfa29a6193bf511ba90a46454b"
integrity sha512-0Eyrk6uXW6tg9PYkhi/V/J4zHp33aNyi2hOCmhFLqLTIhbgqWn5jlSzI+IU0VqrZq6+DbHcabQl/WP6P3BG0QA==

state-toggle@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.1.tgz#c3cb0974f40a6a0f8e905b96789eb41afa1cde3a"
integrity sha512-Qe8QntFrrpWTnHwvwj2FZTgv+PKIsp0B9VxLzLLbSpPXWOgRgc5LVj/aTiSfK1RqIeF9jeC1UeOH8Q8y60A7og==

static-extend@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
Expand Down Expand Up @@ -12454,11 +12475,42 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.3.tgz#e29bd1614c6458d44869fc28b255ab7857ef7c24"
integrity sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==

tslib@^1.9.0:
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==

tslint-config-prettier@^1.18.0:
version "1.18.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37"
integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==

tslint@^5.16.0:
version "5.16.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67"
integrity sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==
dependencies:
"@babel/code-frame" "^7.0.0"
builtin-modules "^1.1.1"
chalk "^2.3.0"
commander "^2.12.1"
diff "^3.2.0"
glob "^7.1.1"
js-yaml "^3.13.0"
minimatch "^3.0.4"
mkdirp "^0.5.1"
resolve "^1.3.2"
semver "^5.3.0"
tslib "^1.8.0"
tsutils "^2.29.0"

tsutils@^2.29.0:
version "2.29.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==
dependencies:
tslib "^1.8.1"

[email protected]:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tty-aware-progress/-/tty-aware-progress-1.0.3.tgz#93fbe86caf0d79c35f6e104e08f3a56c5069d3d6"
Expand Down Expand Up @@ -12501,10 +12553,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.3.tgz#0eb320e4ace9b10eadf5bc6103286b0f8b7c224f"
integrity sha512-FFgHdPt4T/duxx6Ndf7hwgMZZjZpB+U0nMNGVCYPq0rEzWKjEDobm4J6yb3CS7naZ0yURFqdw9Gwc7UOh/P9oQ==
typescript@^3.4.5:
version "3.4.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"
integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==

ua-parser-js@^0.7.18:
version "0.7.19"
Expand Down

0 comments on commit 0fa42df

Please sign in to comment.