-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies to latest versions. Change build tool to rollup. …
…Refactor CI to use GitHub Actions.
- Loading branch information
1 parent
617e29c
commit e270f99
Showing
146 changed files
with
23,145 additions
and
10,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install and Build | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Test | ||
run: npm run test | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
- name: Build Storybook | ||
run: npm run build:storybook | ||
- name: Deploy Storybook | ||
uses: JamesIves/github-pages-deploy-action@releases/v4 | ||
with: | ||
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: dist-storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "all" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
import { join, dirname } from 'path'; | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
const getAbsolutePath = (value: string): any => { | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
}; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../stories/**/*.stories.tsx'], | ||
addons: [getAbsolutePath('@storybook/addon-essentials')], | ||
framework: { | ||
name: getAbsolutePath('@storybook/react-vite'), | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { addons } from '@storybook/manager-api'; | ||
import theme from './theme'; | ||
|
||
addons.setConfig({ | ||
theme, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Preview } from '@storybook/react'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
showPanel: false, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { create } from '@storybook/theming/create'; | ||
|
||
const theme = create({ | ||
base: 'light', | ||
brandTitle: 'React SVG GPS', | ||
brandUrl: 'https://github.com/kayleecodes1/react-svg-gps', | ||
brandImage: 'https://media.githubusercontent.com/media/kayleecodes1/react-svg-gps/master/logo.png', | ||
brandTarget: '_self', | ||
}); | ||
|
||
export default theme; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
const react = require('eslint-plugin-react'); | ||
const js = require('@eslint/js'); | ||
const tsEslint = require('@typescript-eslint/parser'); | ||
const globals = require('globals'); | ||
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); | ||
|
||
module.exports = [ | ||
{ | ||
files: ['src/**/*.{ts,tsx}'], | ||
plugins: { | ||
react, | ||
}, | ||
languageOptions: { | ||
parser: tsEslint, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
globals: { | ||
...globals.browser, | ||
}, | ||
}, | ||
rules: { | ||
...js.configs.recommended.rules, | ||
'no-console': ['warn', { allow: ['warn'] }], | ||
'no-plusplus': 'off', | ||
'react/jsx-indent': ['error', 4], | ||
'react/jsx-indent-props': ['error', 4], | ||
'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }], | ||
'react/prop-types': 'off', | ||
'@typescript-eslint/type-annotation-spacing': [ | ||
'error', | ||
{ before: true, after: true }, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ['vite.config.ts'], | ||
languageOptions: { | ||
globals: { | ||
...globals.jest, | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ['src/**/*.test.{ts,tsx}'], | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
...globals.jest, | ||
}, | ||
}, | ||
rules: { | ||
'import/no-extraneous-dependencies': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
}, | ||
eslintPluginPrettierRecommended, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.