Skip to content

Commit

Permalink
Merge pull request #65 from rcpch/gradient-labels
Browse files Browse the repository at this point in the history
Fixes gradient labels
  • Loading branch information
eatyourpeas authored Apr 1, 2024
2 parents eac54e2 + fd6c7be commit afe7f4d
Show file tree
Hide file tree
Showing 160 changed files with 94,076 additions and 346,272 deletions.
Binary file removed .DS_Store
Binary file not shown.
16 changes: 16 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": []
}
11 changes: 6 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ module.exports = {
}
},
extends: [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
'airbnb-typescript',
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
"plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
"plugin:react/recommended",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v3
# Setup node with version 16.x and NPM registry url
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
# Setup node with version 20.x and NPM registry url
- uses: actions/setup-node@v4
with:
node-version: "16.x"
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
# Run npm install to install project packages
- run: npm install
Expand Down
41 changes: 41 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { StorybookConfig } from '@storybook/react-webpack5';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
staticDirs: ['../src/images', '../src/fonts'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
'@storybook/addon-mdx-gfm',
'@storybook/addon-webpack5-compiler-babel',
{
name: '@storybook/addon-styling-webpack',
options: {
rules: [
// Replaces existing CSS rules with given rule
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
{
loader: "sass-loader",
options: { implementation: require.resolve("sass") }
},
],
}
]
}
}
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: 'tag',
}
};
export default config;
15 changes: 15 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"git.enableCommitSigning": true
}
1 change: 1 addition & 0 deletions CSSStub.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
3 changes: 2 additions & 1 deletion deploy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ If this is a release
2. npm publish --access public

note npm version patch | npm version minor | npm version major from the command line can bump the version
DON'T forget to update the version in RCPCChart.tsx

So long as the version has been bumped, publishing should happen on creation of a new release on Github
9 changes: 9 additions & 0 deletions fileTransformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const path = require("path");

module.exports = {
process(sourceText, sourcePath, options) {
return {
code: `module.exports = ${JSON.stringify(path.basename(sourcePath))};`,
};
},
};
16 changes: 0 additions & 16 deletions jest.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type {Config} from 'jest';

const config: Config = {
preset: 'ts-jest',
verbose: true,
moduleFileExtensions: ["js", "jsx", "ts", "tsx"],
moduleDirectories: ["node_modules", "src"],
transform: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/fileTransformer.js',
},
moduleNameMapper:{
"\\.(css|less|sass|scss)$": '<rootDir>/CSSStub.js'
}
};

export default config;
1 change: 0 additions & 1 deletion jest.setup.ts

This file was deleted.

Loading

0 comments on commit afe7f4d

Please sign in to comment.