Skip to content

Commit

Permalink
Rewrite app using Vite and Tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean James authored and xurion committed Oct 26, 2024
1 parent 9d37b56 commit 22800ce
Show file tree
Hide file tree
Showing 116 changed files with 10,561 additions and 53,637 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
FOLDER: dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
7 changes: 3 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Tests for pull requests

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
pull_request:
branches:
- "**" # matches every branch
- "!master" # but excludes master
- '**' # every branch

jobs:
visual-regression:
Expand All @@ -27,6 +24,8 @@ jobs:
run: npm run loki:ci

- uses: actions/upload-artifact@v3
if: always()
with:
include-hidden-files: true
name: Handle Loki artifacts
path: .loki/
20 changes: 8 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

/.idea
/.vscode

# dependencies
# Dependencies
/node_modules

# testing
# Test coverage
/coverage

# production
/build
# Prod build
/dist

# Storybook build
/dist-storybook

# misc
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.eslintcache

npm-debug.log*
2 changes: 2 additions & 0 deletions .loki/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
current
difference
Binary file modified .loki/reference/desktop_Pages_CV_Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/mobile_Pages_CV_Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"jsxBracketSameLine": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
14 changes: 0 additions & 14 deletions .storybook/main.js

This file was deleted.

31 changes: 31 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { StorybookConfig } from '@storybook/react-vite';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';

const config: StorybookConfig = {
stories: ['../src/**/*.stories.tsx'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'@storybook/addon-styling-webpack',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
core: {
builder: '@storybook/builder-vite',
},
viteFinal: async config => {
// Extend Vite's config to include PostCSS and Tailwind
config.css = config.css || {};
config.css.postcss = {
plugins: [tailwindcss, autoprefixer],
};
return config;
},
};
export default config;
11 changes: 0 additions & 11 deletions .storybook/preview.js

This file was deleted.

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';
import '../src/index.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
4 changes: 2 additions & 2 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ All CV information is stored in [src/config.json](src/config.json). This documen
| forenames | string, required | One or more of your first names. |
| surname | string, required | Your surname. |
| profession | string, required | How you would describe your profession or expertise. |
| dob | string, optional | Your date of birth. |
| dob | string, optional | Your date of birth. |
| gender | string, optional | Your gender. |
| location | string, required | Where you are located. |
| citizenship | string, required | Your citizenship. |
| telephone | string, optional | Your telephone number. A string so you can freely format the number. |
| email | string, optional | Your email address. This does not render as a link because viewers rarely will use this to generate an email. |
| social | [Social](#Social)[], required | An array of social links, such as LinkedIn. |
| githubRibbonUrl | string, optional | Displays a Github ribbon motif with the given link to your source code. |
| githubUrl | string, optional | Displays a Github ribbon motif with the given link to your source code. |
| introductions | string[], required | An array of paragraphs that introduce you as a potential employee. |
| skills | string[], required | An array of your core skills. |
| complimentarySkills | string[], optional | Additional non-core skills you bring to the table. |
Expand Down
21 changes: 0 additions & 21 deletions LIGHTHOUSE.md

This file was deleted.

28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
);
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
7 changes: 0 additions & 7 deletions lighthouserc.json

This file was deleted.

Loading

0 comments on commit 22800ce

Please sign in to comment.