Skip to content

Commit

Permalink
feat: migrate to vite (#1235)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: no longer uses styled-components, deprecates many components
  • Loading branch information
brettdorrans authored Mar 26, 2023
1 parent 922e5b4 commit 63fef10
Show file tree
Hide file tree
Showing 172 changed files with 24,439 additions and 64,188 deletions.
4 changes: 4 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
last 2 Chrome versions
last 2 Firefox versions
last 2 Safari versions
last 2 Edge versions
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
storybook-static/
.*rc.cjs
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Get node.js cache directory
id: node-cache-dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Get node.js cache directory
id: node-cache-dir
Expand Down
135 changes: 20 additions & 115 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,123 +1,28 @@
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
Thumbs.db

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn.lock

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next cache
**/.next/

# next export
**/out/

# built components
dist/

# coverage
coverage/

# styleguide
storybook-static/

### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

.idea/
./idea
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/**/contentModel.xml
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
.idea/sonarlint

### SublimeText ###
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project
sftp-config.json
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

### VisualStudioCode ###
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
**/*.css
**/*.css.map

# Editor directories and files
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
storybook-static
coverage
vite.config.ts.timestamp-*
12 changes: 6 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
.storybook
src
tsconfig.json
webpack.config.js
webpack.analyzer.config.js
jest.config.js
.prettierrc.js
.eslintrc.js
tsconfig.node.json
vite.config.ts
.prettierrc.cjs
.eslintrc.cjs
.editorconfig
.gitignore
.npmignore
.eslintignore
.lintstagedrc
.stylelintrc.js
.stylelintrc.cjs
coverage
*.tgz
storybook-static
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
File renamed without changes.
8 changes: 0 additions & 8 deletions .storybook/main.js

This file was deleted.

22 changes: 22 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default {
framework: '@storybook/react-vite',
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-docs',
'@storybook/addon-links',
'@storybook/addon-backgrounds',
'@storybook/addon-controls',
'@storybook/addon-highlight',
'@storybook/addon-measure',
'@storybook/addon-outline',
'@storybook/addon-toolbars',
'@storybook/addon-viewport'
],
docs: {
defaultName: 'Documentation'
}
};
6 changes: 6 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';
import { themes } from '@storybook/theming';

addons.setConfig({
theme: themes.light,
});
9 changes: 7 additions & 2 deletions .storybook/preview.js → .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
export const parameters = {
options: {
storySort: {
order: ['Primitives', 'Typography', 'Inputs', 'Status', 'Utility']
}
},
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
date: /Date$/,
}
}
};
}
2 changes: 2 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const { stylelintConfig } = require('@lapidist/linting');
module.exports = stylelintConfig;
8 changes: 0 additions & 8 deletions .stylelintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Brett Dorrans
Copyright (c) 2023 Brett Dorrans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<p align="center">
<p style="text-align: center">
<a href="https://components.lapidist.net/" target="_blank" rel="noopener">
<img width="120" src="https://lapidist.net/logo.svg" alt="Lapidist Logo"/>
</a>
</p>

<h2 align="center">@lapidist/components</h2>
<h2 style="text-align: center">@lapidist/components</h2>

<div align="center">
<div style="text-align: center">

Opinionated [React](https://reactjs.org/) UI library, built with [@lapidist/styles](https://github.com/bylapidist/styles) and [TypeScript](https://www.typescriptlang.org/).

Expand Down Expand Up @@ -34,10 +34,10 @@ See [https://components.lapidist.net](https://components.lapidist.net) for the f

```shell
// via npm
npm install @lapidist/components styled-components
npm install @lapidist/components

// or via yarn
yarn add @lapidist/components styled-components
yarn add @lapidist/components
```

### Usage
Expand Down
15 changes: 0 additions & 15 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit 63fef10

Please sign in to comment.