Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #34 from comfortdelgro/feature/refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
frencojobs authored Aug 11, 2022
2 parents ae70dff + ebac6cd commit 785cd7b
Show file tree
Hide file tree
Showing 193 changed files with 18,123 additions and 16,205 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['@comfortdelgro'],
parserOptions: {
project: './tsconfig.json',
},
}
36 changes: 0 additions & 36 deletions .github/workflows/npm-publish.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Bot
run: |
git config --global user.email "[email protected]"
git config --global user.name "CDG Zig Bot"
- name: Setup PNPM
uses: pnpm/action-setup@v2

- name: Setup NodeJS 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Create Release Pull Request or Publish
uses: changesets/action@v1
with:
version: pnpm run version
publish: pnpm exec changeset publish
commit: 'chore: release'
title: 'A New Release'
setupGitUser: false
env:
GITHUB_TOKEN: ${{ secrets.CDG_BOT_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.CDG_PUBLISHER_NPM_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,26 @@ on:

jobs:
build-and-deploy:
name: Build and Deploy Storybook
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Setup PNPM
uses: pnpm/action-setup@v2

- name: Setup NodeJS 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'

- name: Install dependencies
run: pnpm i --frozen-lockfile

- name: Build 🔧
run: |
yarn install --frozen-lockfile
yarn build-sb
run: pnpm build

- name: Deploy 🚀
uses: JamesIves/[email protected]
Expand Down
23 changes: 13 additions & 10 deletions .storybook/contexts.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import Theme from "../src/Theme";
import { defaultTheme } from "../src/utils";
import {Client as Styletron} from 'styletron-engine-atomic';
import {Client as Styletron} from 'styletron-engine-atomic'
import {Theme} from '../src'
import {defaultTheme} from '../src/utils'

export const contexts = [
{
icon: "box", // a icon displayed in the Storybook toolbar to control contextual props
title: "Themes", // an unique name of a contextual environment
icon: 'box', // a icon displayed in the Storybook toolbar to control contextual props
title: 'Themes', // an unique name of a contextual environment
components: [Theme],
params: [
// an array of params contains a set of predefined `props` for `components`
{ name: "Default Theme", props: { theme: defaultTheme, engine: new Styletron() } },
{
name: 'Default Theme',
props: {theme: defaultTheme, engine: new Styletron()},
},
// { name: "Dark Theme", props: { theme: darkTheme } }
],
options: {
deep: true, // pass the `props` deeply into all wrapping components
disable: false, // disable this contextual environment completely
cancelable: false // allow this contextual environment to be opt-out optionally in toolbar
}
}
];
cancelable: false, // allow this contextual environment to be opt-out optionally in toolbar
},
},
]
22 changes: 11 additions & 11 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
"stories": ["../src/**/*.stories.(js|mdx)"],
"addons": [
"@storybook/addon-links",
"@storybook/addon-contexts",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
stories: ['../src/**/*.stories.(js|mdx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-contexts',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
"framework": "@storybook/react",
"core": {
"builder": "@storybook/builder-webpack5"
}
}
framework: '@storybook/react',
core: {
builder: '@storybook/builder-webpack5',
},
}
14 changes: 7 additions & 7 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/addons';
import {addons} from '@storybook/addons'

addons.setConfig({
isFullscreen: false,
Expand All @@ -15,10 +15,10 @@ addons.setConfig({
collapsedRoots: ['other'],
},
toolbar: {
title: { hidden: false, },
zoom: { hidden: false, },
eject: { hidden: false, },
copy: { hidden: false, },
fullscreen: { hidden: false, },
title: {hidden: false},
zoom: {hidden: false},
eject: {hidden: false},
copy: {hidden: false},
fullscreen: {hidden: false},
},
});
})
16 changes: 8 additions & 8 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { addDecorator } from "@storybook/react";
import { withContexts } from "@storybook/addon-contexts/react";
import { INITIAL_VIEWPORTS, MINIMAL_VIEWPORTS } from '@storybook/addon-viewport';
import { contexts } from "./contexts";
import {withContexts} from '@storybook/addon-contexts/react'
import {MINIMAL_VIEWPORTS} from '@storybook/addon-viewport'
import {addDecorator} from '@storybook/react'
import {contexts} from './contexts'
export const parameters = {
viewport: {
viewports: { ...MINIMAL_VIEWPORTS },
viewports: {...MINIMAL_VIEWPORTS},
},
};

addDecorator(withContexts(contexts));
}

// @ts-ignore
addDecorator(withContexts(contexts))
9 changes: 0 additions & 9 deletions README.md

This file was deleted.

11 changes: 0 additions & 11 deletions babel.config.js

This file was deleted.

10 changes: 10 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {defineBuildConfig} from 'unbuild'

export default defineBuildConfig({
entries: ['./src/index'],
declaration: true,
rollup: {
emitCJS: true,
inlineDependencies: true,
},
})
Loading

0 comments on commit 785cd7b

Please sign in to comment.