Skip to content

Commit

Permalink
Merge pull request #41 from qorelanguage/chore/renamed-repo
Browse files Browse the repository at this point in the history
Build & Doc Fixes
  • Loading branch information
Foxhoundn authored Aug 1, 2024
2 parents 86f1a17 + b102582 commit 0efa30f
Show file tree
Hide file tree
Showing 32 changed files with 5,741 additions and 7,244 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/develop_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

# Get head commit message
- name: Print head git commit message
id: get_head_commit_message
Expand Down Expand Up @@ -78,11 +78,12 @@ jobs:
API_USER_NAME: ${{ secrets.API_USER_NAME}}
API_USER_PASS: ${{ secrets.API_USER_PASS }}
id: chromatic_publish
uses: chromaui/action@v1
uses: chromaui/action@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
allowConsoleErrors: true

# Create new release
- name: Create a release
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Tests

on:
Expand All @@ -23,12 +22,12 @@ jobs:
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

# Get head commit message
- name: Print head git commit message
id: get_head_commit_message
run: echo "::set-output name=HEAD_COMMIT_MESSAGE::$(git show -s --format=%s)"

# Setup git user
- name: Setup git user
run: |
Expand All @@ -40,7 +39,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: latest

# Install modules
- name: Installing modules
id: install_modules
Expand All @@ -52,7 +51,7 @@ jobs:
- name: Save release version to outputs
id: save_release_version
run: echo ::set-output name=version::$(node -pe "require('./pullRequestRelease.json').version")

# Run Unit Tests
- name: Running tests
env:
Expand All @@ -61,7 +60,7 @@ jobs:
API_USER_PASS: ${{ secrets.API_USER_PASS }}
id: tests
run: yarn run test

# Test the build
- name: Build test
env:
Expand All @@ -70,30 +69,30 @@ jobs:
API_USER_PASS: ${{ secrets.API_USER_PASS }}
id: build_test
run: yarn run build:test

# Build storybook documentation
- name: Build documentation JSON
id: build_docs_json
run: yarn docs

# Publish documentation to chromatic
- name: Publish to Chromatic
env:
ENDPOINT_API: ${{ secrets.ENDPOINT_API}}
API_USER_NAME: ${{ secrets.API_USER_NAME}}
API_USER_PASS: ${{ secrets.API_USER_PASS }}
id: chromatic_publish
uses: chromaui/action@v1
uses: chromaui/action@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true

# Change package version to make release
- name: Change npm version
id: change_npm_version
run: npm version ${{ steps.save_release_version.outputs.version }} --no-git-tag-version --force

# Publish new release to NPM
- name: Publish to NPM
id: npm_publish
Expand All @@ -102,7 +101,7 @@ jobs:
token: ${{ secrets.NPM_TOKEN }}
tag: pull_request_${{ steps.save_release_version.outputs.version }}
access: public

# Notify discord if all steps succeeded
- name: Discord notification
env:
Expand Down
42 changes: 28 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
import type { StorybookConfig } from '@storybook/core-common';
export default {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-jest',
'@storybook/addon-webpack5-compiler-swc',
'@chromatic-com/storybook',
],
core: {},

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-jest'],
features: {
storyStoreV7: true,
modernInlineRender: true,
framework: {
name: '@storybook/react-webpack5',
options: {},
},
core: {
builder: {
name: 'webpack5',
lazyCompilation: true,
},

// webpackFinal: async (config) => {
// // Add node externals to webpack config
// config.externals = [
// nodeExternals({
// allowlist: [/^node:/],
// }),
// ];

// // Return the altered config
// return config;
// },
typescript: {
reactDocgen: 'react-docgen-typescript',
},
framework: '@storybook/react',
} as StorybookConfig;
};
3 changes: 2 additions & 1 deletion .storybook/preview-body.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<style>
html,
body,
#root {
#root,
#storybook-root {
height: 100%;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const decorators = [
(Story) => (
<ReqoreUIProvider theme={{ main: '#111111', intents: { info: '#7f4098' } }}>
<ReqoreLayoutContent>
<ReqoreContent style={{ padding: '20px' }}>
<ReqoreContent style={{ padding: '20px', height: '100%' }}>
<Story />
</ReqoreContent>
</ReqoreLayoutContent>
Expand Down
14 changes: 14 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"jsc": {
"parser": {
"syntax": "ecmascript",
"jsx": true,
"tsx": true
},
"transform": {
"react": {
"runtime": "automatic" // Use the new JSX transform
}
}
}
}
Loading

0 comments on commit 0efa30f

Please sign in to comment.