Skip to content

Commit

Permalink
feat: rework circle
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-mesnil committed Jan 9, 2025
1 parent d5a8c8f commit c214740
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 127 deletions.
20 changes: 7 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ orbs:
parameters:
cache_version:
type: string
default: v5
default: v6
nodejs_base_image:
type: string
default: 'cimg/node:20.17.0'
Expand Down Expand Up @@ -71,17 +71,11 @@ jobs:
steps:
- *checkout
- *restore_node_modules
- run: yarn icons:build
- run: yarn build
- run: yarn build:monorepo
- persist_to_workspace:
root: ~/welcome-ui
paths:
- packages/**/dist
- lib/dist
- packages/Themes/**/dist
- icons/dist
- packages/IconFont/fonts

lint:
<<: *default
Expand All @@ -102,7 +96,7 @@ jobs:
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run: yarn jest --detectOpenHandles $(circleci tests glob "./packages/**/*.test.{ts,js,tsx}" | circleci tests split | xargs)
- run: yarn jest --detectOpenHandles $(circleci tests glob "./lib/**/*.test.{ts,js,tsx}" | circleci tests split | xargs)

build_and_release_icon_font:
<<: *default
Expand All @@ -117,20 +111,20 @@ jobs:
- run:
name: Prepare font hash
command: |
echo "export ICON_FONT_HASH=$(sha1sum packages/IconFont/fonts/welcome-icon-font.woff2 | awk '{ print $1 }')" >> $BASH_ENV
echo "export ICON_FONT_HASH=$(sha1sum lib/src/components/IconFont/fonts/welcome-icon-font.woff2 | awk '{ print $1 }')" >> $BASH_ENV
source $BASH_ENV
yarn build:core
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: ${AWS_REGION}
- aws-s3/sync:
from: packages/IconFont/fonts
from: lib/src/components/IconFont/fonts
to: s3://welcome-ui/public/fonts/icon-font/$ICON_FONT_HASH
arguments: |
--cache-control "public, max-age=31536000" --exclude "*" --include "welcome-icon-font.woff" --include "welcome-icon-font.woff2" --metadata GitCommit=$CIRCLE_SHA1 --delete
- aws-s3/sync:
from: packages/IconFont/fonts
from: lib/src/components/IconFont/fonts
to: s3://wttj-production/fonts/icon-font/$ICON_FONT_HASH
arguments: |
--cache-control "public, max-age=31536000" --exclude "*" --include "welcome-icon-font.woff" --include "welcome-icon-font.woff2" --metadata GitCommit=$CIRCLE_SHA1 --delete
Expand All @@ -144,7 +138,7 @@ jobs:
- *restore_node_modules
- attach_workspace:
at: ~/welcome-ui
- run: yarn website:build
- run: yarn build:website
- persist_to_workspace:
root: ~/welcome-ui
paths:
Expand Down Expand Up @@ -201,7 +195,7 @@ jobs:
at: ~/welcome-ui
- run:
name: build w/ prefix
command: VERSION=$CIRCLE_BRANCH yarn website:build
command: VERSION=$CIRCLE_BRANCH yarn build:website
- aws-cli/setup:
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "welcome-ui",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
"files": [
"dist"
Expand Down
11 changes: 4 additions & 7 deletions lib/src/components/Breadcrumb/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,12 @@
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "Represents a JSX element.\n\nWhere {@link ReactNode} represents everything that can be rendered, `ReactElement`\nonly represents JSX.",
"fullComment": "Represents a JSX element.\n\nWhere {@link ReactNode} represents everything that can be rendered, `ReactElement`\nonly represents JSX.\n@template P The type of the props object\n@template T The type of the component or tag\n@example ```tsx\nconst element: ReactElement = <div />;\n```",
"tags": {
"template": "P The type of the props object\nT The type of the component or tag",
"example": "```tsx\nconst element: ReactElement = <div />;\n```"
}
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "Iterable<ReactNode>",
"value": "ReactFragment",
"description": "",
"fullComment": "",
"tags": {}
Expand Down
29 changes: 7 additions & 22 deletions lib/src/components/Checkbox/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"required": false,
"type": {
"name": "enum",
"raw": "ElementType<any, keyof IntrinsicElements>",
"raw": "ElementType<any>",
"value": [
{
"value": "\"symbol\""
Expand Down Expand Up @@ -82,9 +82,6 @@
{
"value": "\"caption\""
},
{
"value": "\"center\""
},
{
"value": "\"cite\""
},
Expand Down Expand Up @@ -289,9 +286,6 @@
{
"value": "\"samp\""
},
{
"value": "\"search\""
},
{
"value": "\"slot\""
},
Expand Down Expand Up @@ -532,9 +526,6 @@
{
"value": "\"rect\""
},
{
"value": "\"set\""
},
{
"value": "\"stop\""
},
Expand All @@ -558,21 +549,15 @@
},
{
"value": "ComponentClass<any, any>",
"description": "Represents a component class in React.",
"fullComment": "Represents a component class in React.\n@template P The props the component accepts.\n@template S The internal state of the component.",
"tags": {
"template": "P The props the component accepts.\nS The internal state of the component."
}
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "FunctionComponent<any>",
"description": "Represents the type of a function component. Can optionally\nreceive a type argument that represents the props the component\naccepts.",
"fullComment": "Represents the type of a function component. Can optionally\nreceive a type argument that represents the props the component\naccepts.\n@template P The props the component accepts.\n@see {@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet}\n@example ```tsx\n// With props:\ntype Props = { name: string }\n\nconst MyComponent: FunctionComponent<Props> = (props) => {\n return <div>{props.name}</div>\n}\n```\n@example ```tsx\n// Without props:\nconst MyComponentWithoutProps: FunctionComponent = () => {\n return <div>MyComponentWithoutProps</div>\n}\n```",
"tags": {
"template": "P The props the component accepts.",
"see": "{@link https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/function_components React TypeScript Cheatsheet}",
"example": "```tsx\n// With props:\ntype Props = { name: string }\n\nconst MyComponent: FunctionComponent<Props> = (props) => {\n return <div>{props.name}</div>\n}\n```\n```tsx\n// Without props:\nconst MyComponentWithoutProps: FunctionComponent = () => {\n return <div>MyComponentWithoutProps</div>\n}\n```"
}
"description": "",
"fullComment": "",
"tags": {}
}
]
}
Expand Down
24 changes: 6 additions & 18 deletions lib/src/components/Drawer/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,6 @@
{
"value": "\"caption\""
},
{
"value": "\"center\""
},
{
"value": "\"cite\""
},
Expand Down Expand Up @@ -483,9 +480,6 @@
{
"value": "\"samp\""
},
{
"value": "\"search\""
},
{
"value": "\"section\""
},
Expand Down Expand Up @@ -1083,16 +1077,16 @@
"required": false,
"type": {
"name": "enum",
"raw": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }> | ReactElement<any, string | JSXElementConstructor<any>>",
"raw": "ReactElement<any, string | JSXElementConstructor<any>> | RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": [
{
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"description": "",
"fullComment": "",
"tags": {}
Expand Down Expand Up @@ -1499,9 +1493,6 @@
{
"value": "\"caption\""
},
{
"value": "\"center\""
},
{
"value": "\"cite\""
},
Expand Down Expand Up @@ -1610,9 +1601,6 @@
{
"value": "\"samp\""
},
{
"value": "\"search\""
},
{
"value": "\"section\""
},
Expand Down Expand Up @@ -2174,16 +2162,16 @@
"required": false,
"type": {
"name": "enum",
"raw": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }> | ReactElement<any, string | JSXElementConstructor<any>>",
"raw": "ReactElement<any, string | JSXElementConstructor<any>> | RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": [
{
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"description": "",
"fullComment": "",
"tags": {}
Expand Down
12 changes: 3 additions & 9 deletions lib/src/components/DropdownMenu/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,6 @@
{
"value": "\"caption\""
},
{
"value": "\"center\""
},
{
"value": "\"cite\""
},
Expand Down Expand Up @@ -661,9 +658,6 @@
{
"value": "\"samp\""
},
{
"value": "\"search\""
},
{
"value": "\"section\""
},
Expand Down Expand Up @@ -1605,16 +1599,16 @@
"required": false,
"type": {
"name": "enum",
"raw": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }> | ReactElement<any, string | JSXElementConstructor<any>>",
"raw": "ReactElement<any, string | JSXElementConstructor<any>> | RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": [
{
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"description": "",
"fullComment": "",
"tags": {}
},
{
"value": "ReactElement<any, string | JSXElementConstructor<any>>",
"value": "RenderProp<HTMLAttributes<any> & { ref?: Ref<any>; }>",
"description": "",
"fullComment": "",
"tags": {}
Expand Down
6 changes: 3 additions & 3 deletions lib/src/components/FileDrop/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
],
"required": false,
"type": {
"name": "(event: DropEvent | ChangeEvent<HTMLInputElement> | CreateEvent) => void"
"name": "(event: DropEvent | CreateEvent) => void"
}
},
"handleRemoveFile": {
Expand All @@ -111,7 +111,7 @@
],
"required": false,
"type": {
"name": "(event: DropEvent | ChangeEvent<HTMLInputElement> | CreateEvent) => void"
"name": "(event: DropEvent | CreateEvent) => void"
}
},
"isClearable": {
Expand Down Expand Up @@ -224,7 +224,7 @@
],
"required": false,
"type": {
"name": "(event: DropEvent | ChangeEvent<HTMLInputElement> | CreateEvent) => void"
"name": "(event: DropEvent | CreateEvent) => void"
}
},
"onError": {
Expand Down
12 changes: 6 additions & 6 deletions lib/src/components/Flex/docs/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
"name": "enum",
"raw": "SystemProp<AlignItems, Theme>",
"value": [
{
"value": "\"center\""
},
{
"value": "\"-moz-initial\""
},
Expand All @@ -41,6 +38,9 @@
{
"value": "\"unset\""
},
{
"value": "\"center\""
},
{
"value": "\"end\""
},
Expand Down Expand Up @@ -246,9 +246,6 @@
"name": "enum",
"raw": "SystemProp<JustifyContent, Theme>",
"value": [
{
"value": "\"center\""
},
{
"value": "\"right\""
},
Expand All @@ -273,6 +270,9 @@
{
"value": "\"unset\""
},
{
"value": "\"center\""
},
{
"value": "\"end\""
},
Expand Down
1 change: 0 additions & 1 deletion lib/src/components/Icons/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'

import { IconProps } from '../Icon'

export declare const ActionsIcon: React.FC<IconProps>
export declare const ActivityIcon: React.FC<IconProps>
export declare const AddIcon: React.FC<IconProps>
Expand Down
Loading

0 comments on commit c214740

Please sign in to comment.