Skip to content

Commit

Permalink
Rebuild UI architecture (#9)
Browse files Browse the repository at this point in the history
* Rebuild UI architecture

* Fixed ESLint and Prettier config

---------

Co-authored-by: Misha Topchilo <[email protected]>
  • Loading branch information
miksrv and miksrv authored Oct 3, 2024
1 parent fff36df commit e1eb6bd
Show file tree
Hide file tree
Showing 108 changed files with 1,992 additions and 6,874 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

7 changes: 1 addition & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,11 @@ jobs:
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
echo "@miksrv:registry=https://npm.pkg.github.com/" >> ~/.npmrc
- name: Create Release Pull Request or Publish to npm
- name: Create Release and Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths:
- 'storybook/**'
- 'storybook/**'

jobs:
build-storybook:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.css
README.md
eslint.config.mjs
rollup.config.js
site.webmanifest
node_modules
dist
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# simple-react-ui-kit

## 1.0.3

### Patch Changes

- Rebuild UI architecture
- Fixed Button component styles
- Added story for Button component
- Rename concat class names functions (cn)

## 1.0.2

### Patch Changes
Expand Down
466 changes: 466 additions & 0 deletions build/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
11 changes: 8 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,22 @@ export default [
'**/.yarn/**',
'**/eslint.config.mjs',
'**/eslint.config.js',
'**/eslint.config.cjs',
'**/jest.config.ts',
'**/declarations.d.ts',
'**/node_modules/**',
'**/build/**',
'**/dist/**',
'**/fixtures/**',
'**/coverage/**',
'**/__snapshots__/**',
'**/.docusaurus/**',
'**/build/**',

// WebPack
'**/webpack.config.js',
// '**/webpack.config.js',

// RollUp
'**/rollup.config.js',

// PM2 Server
// '**/ecosystem.config.js',
Expand Down Expand Up @@ -84,7 +89,7 @@ export default [
// in the rare case that we do - just need to manually restart their IDE.
glob: 'Infinity'
},
project: ['tsconfig.json'],
project: ['eslint.tsconfig.json'],
warnOnUnsupportedTypeScriptVersion: false
}
},
Expand Down
26 changes: 26 additions & 0 deletions eslint.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"baseUrl": "src",

"target": "es2022",
"module": "es2020",
"lib": ["dom", "dom.iterable", "esnext", "es2018"],

"strict": true,
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"downlevelIteration": true,
"declaration": true,
"declarationDir": "dist"
},
"include": ["src", "storybook"],
"exclude": ["node_modules", "dist"]
}
15 changes: 0 additions & 15 deletions index.tsx

This file was deleted.

30 changes: 14 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "simple-react-ui-kit",
"version": "1.0.2",
"version": "1.0.3",
"description": "My small UI framework for projects",
"repository": "https://github.com/miksrv/simple-react-ui-kit.git",
"scripts": {
"build": "webpack",
"build": "rollup -c",
"changeset": "npx changeset",
"changeversion": "npx changeset version",
"release": "changeset publish",
Expand All @@ -17,8 +17,10 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"access": "public",
"main": "dist/index.js",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
"files": [
"dist",
Expand All @@ -29,18 +31,15 @@
"author": "Misha Topchilo <[email protected]>",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@changesets/cli": "^2.27.8",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.11.1",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/lodash-es": "^4.17.12",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"babel-loader": "^9.2.1",
"css-loader": "^7.1.2",
"eslint": "^9.11.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^6.2.0",
Expand All @@ -49,19 +48,18 @@
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.10.0",
"html-webpack-plugin": "^5.6.0",
"jest": "^29.7.0",
"postcss-sass": "^0.5.0",
"prettier": "^3.3.3",
"rollup": "^4.24.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"sass": "^1.79.4",
"sass-loader": "^16.0.2",
"style-loader": "^4.0.0",
"ts-loader": "^9.5.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.6.2",
"typescript-eslint": "^8.8.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
"typescript-eslint": "^8.8.0"
},
"dependencies": {
"embla-carousel-react": "^8.3.0",
Expand Down
35 changes: 35 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import typescript from 'rollup-plugin-typescript2';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import postcss from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';

export default {
input: 'src/index.ts',
output: [
{
file: 'dist/index.esm.js',
format: 'esm',
sourcemap: false
}
],
plugins: [
resolve(),
commonjs(),
terser(), // Минификация
typescript({
tsconfig: './tsconfig.json',
useTsconfigDeclarationDir: true,
clean: true
}),
postcss({
extensions: ['.sass', '.scss'],
extract: false,
modules: true,
use: [
['sass', { includePaths: ['./src/styles'] }]
]
})
],
external: ['react', 'react-dom']
};
Loading

0 comments on commit e1eb6bd

Please sign in to comment.