Skip to content

Commit f759bd0

Browse files
Aaron StampaAaron Stampa
authored andcommitted
refactor: replace rollup with vite
1 parent d97a592 commit f759bd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+54099
-12915
lines changed

.codeclimate.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.devcontainer/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.163.1/containers/typescript-node/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.145.1/containers/typescript-node/.devcontainer/base.Dockerfile
22

3-
# [Choice] Node.js version: 14, 12, 10
4-
ARG VARIANT="14-buster"
3+
ARG VARIANT="16-bullseye"
54
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
65

76
# [Optional] Uncomment this section to install additional OS packages.
@@ -13,4 +12,4 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
1312
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
1413

1514
# [Optional] Uncomment if you want to install more global node packages
16-
# RUN su node -c "npm install -g <your-package-list -here>"
15+
# RUN sudo -u node npm install -g <your-package-list -here>

.devcontainer/devcontainer.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.163.1/containers/typescript-node
33
{
4-
"name": "React DSV Import",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick a Node version: 10, 12, 14
8-
"args": {
9-
"VARIANT": "14"
10-
}
11-
},
4+
"name": "React DSV Import",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": { "VARIANT": "16" }
8+
},
129

13-
// Set *default* container specific settings.json values on container create.
14-
"settings": {
15-
"terminal.integrated.shell.linux": "/bin/bash"
16-
},
10+
// Add the IDs of extensions you want installed when the container is created.
11+
"extensions": [
12+
"streetsidesoftware.code-spell-checker",
13+
"esbenp.prettier-vscode",
14+
"mikestead.dotenv",
15+
"eamodio.gitlens",
16+
"vscode-icons-team.vscode-icons",
17+
"mgmcdermott.vscode-language-babel",
18+
"dbaeumer.vscode-eslint",
19+
"styled-components.vscode-styled-components",
20+
"silvenon.mdx"
21+
],
1722

18-
// Add the IDs of extensions you want installed when the container is created.
19-
"extensions": [
20-
"dbaeumer.vscode-eslint"
21-
],
23+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24+
// "forwardPorts": [],
2225

23-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24-
// "forwardPorts": [],
26+
// Use 'postCreateCommand' to run commands after the container is created.
27+
"postCreateCommand": "npm install"
2528

26-
// Use 'postCreateCommand' to run commands after the container is created.
27-
// "postCreateCommand": "yarn install",
28-
29-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
30-
"remoteUser": "node"
31-
}
29+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
30+
// "remoteUser": "node"
31+
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 2
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
storybook-static/

.eslintrc.js

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
module.exports = {
2-
parser: '@typescript-eslint/parser',
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
36
extends: [
47
'plugin:react/recommended',
5-
'plugin:@typescript-eslint/recommended',
6-
'prettier/@typescript-eslint',
7-
'plugin:prettier/recommended'
8+
'airbnb',
9+
'airbnb-typescript',
10+
'plugin:react/jsx-runtime',
11+
'plugin:prettier/recommended',
12+
'plugin:storybook/recommended',
813
],
14+
parser: '@typescript-eslint/parser',
915
parserOptions: {
1016
ecmaFeatures: {
11-
jsx: true
17+
jsx: true,
1218
},
13-
ecmaVersion: 2018,
14-
sourceType: 'module'
19+
ecmaVersion: 13,
20+
sourceType: 'module',
21+
project: './tsconfig.json',
1522
},
23+
plugins: ['react', '@typescript-eslint'],
1624
rules: {
17-
'@typescript-eslint/explicit-function-return-type': 'off',
18-
'@typescript-eslint/explicit-module-boundary-types': 'off',
19-
'react/prop-types': 'off'
25+
'import/prefer-default-export': 'off',
26+
'import/no-relative-packages': 'off',
27+
'import/no-extraneous-dependencies': 'off',
28+
'react/require-default-props': 'off',
29+
'react/jsx-fragments': ['error', 'element'],
2030
},
21-
settings: {
22-
react: {
23-
version: 'detect'
24-
}
25-
}
2631
};

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* text=auto eol=lf
2+
3+
*.png binary eol=unset
4+
*.jpg binary eol=unset
5+
*.jpeg binary eol=unset
6+
*.pdf binary eol=unset
7+
*.mp4 binary eol=unset

.github/workflows/cd-npm.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Continuous deployment (NPM)
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build-and-deploy:
10+
name: Build and deploy NPM package
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: '0'
17+
18+
- name: Configure node for npmjs.org as registry
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '16.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build
28+
run: npm run build
29+
30+
- name: Create Github release
31+
run: npm run release:create-github-release
32+
env:
33+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}
34+
35+
- name: Publish package on npmjs.org
36+
run: npm publish ./dist --access public
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/cd-storybook.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Continuous deployment (Storybook)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
name: Build and deploy Storybook to Github Pages
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v3
16+
17+
- name: Use nodejs
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '16.x'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build storybook
26+
run: npm run build:storybook
27+
28+
- name: Deploy to Github Pages
29+
uses: JamesIves/[email protected]
30+
with:
31+
branch: gh-pages
32+
folder: storybook-static
33+
clean: true

.github/workflows/check-size.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check size
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
size:
10+
name: Check sizes
11+
runs-on: ubuntu-latest
12+
env:
13+
CI_JOB_NUMBER: 1
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v3
17+
18+
- uses: andresz1/size-limit-action@v1
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)