Skip to content

Commit 4df9657

Browse files
committed
Vite implementation
1 parent 1b0ffcb commit 4df9657

File tree

142 files changed

+1013
-1398
lines changed

Some content is hidden

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

142 files changed

+1013
-1398
lines changed

.babelrc

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

.eslintignore

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

.eslintrc.js

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

.github/comparePackageVersions.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const getVersionFromBranch = branch => {
4848
const currentBranchVersion = getVersionFromBranch(currentBranch)
4949
const targetBranchVersion = getVersionFromBranch(`remotes/origin/${targetBranch}`)
5050

51-
console.log(`Version in branch ${currentBranch}: ${currentBranchVersion}`)
52-
console.log(`Version in branch ${targetBranch}: ${targetBranchVersion}`)
51+
console.info(`Version in branch ${currentBranch}: ${currentBranchVersion}`)
52+
console.info(`Version in branch ${targetBranch}: ${targetBranchVersion}`)
5353

5454
const isVersionGreater = (targetBranchVersion, currentBranchVersion) => {
5555
const parseVersion = version => version.split('.').map(Number)
@@ -65,7 +65,7 @@ const isVersionGreater = (targetBranchVersion, currentBranchVersion) => {
6565
}
6666

6767
if (isVersionGreater(targetBranchVersion, currentBranchVersion)) {
68-
console.log(
68+
console.info(
6969
`\x1b[32mCurrent version (${currentBranchVersion}) is greater than the target version (${targetBranchVersion}).\x1b[0m`
7070
)
7171
process.exit(0)

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"arrowParens": "avoid"
7+
}

.prettierrc.js

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

.storybook/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ module.exports = {
2323
addons: [
2424
'@storybook/addon-links',
2525
'@storybook/addon-essentials',
26-
'@storybook/addon-interactions',
27-
'@storybook/preset-create-react-app'
26+
'@storybook/addon-interactions'
2827
],
2928
framework: '@storybook/react',
3029
core: {

eslint.config.mjs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import eslintConfigPrettier from 'eslint-config-prettier'
2+
import globals from 'globals'
3+
import js from '@eslint/js'
4+
import react from 'eslint-plugin-react'
5+
import reactHooks from 'eslint-plugin-react-hooks'
6+
7+
export default [
8+
{ ignores: ['dist'] },
9+
js.configs.recommended,
10+
eslintConfigPrettier,
11+
{
12+
files: ['**/*.{js,jsx,ts,tsx}'],
13+
languageOptions: {
14+
ecmaVersion: 2021,
15+
globals: globals.browser,
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true
19+
}
20+
}
21+
},
22+
plugins: {
23+
react: react,
24+
'react-hooks': reactHooks
25+
},
26+
settings: {
27+
react: {
28+
version: 'detect'
29+
}
30+
},
31+
rules: {
32+
...reactHooks.configs.recommended.rules,
33+
...react.configs.recommended.rules,
34+
'react/react-in-jsx-scope': 'off',
35+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
36+
semi: ['error', 'never'],
37+
'no-unused-vars': process.env.NODE_ENV === 'production' ? 2 : 1,
38+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
39+
'no-console': process.env.NODE_ENV === 'production' ? 2 : 0
40+
}
41+
}
42+
]

package.json

Lines changed: 114 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,118 @@
11
{
2-
"name": "iguazio.dashboard-react-controls",
3-
"version": "2.2.20",
4-
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
5-
"main": "dist/index.js",
6-
"module": "dist/index.js",
7-
"files": [
8-
"dist",
9-
"README.md"
10-
],
11-
"repository": {
12-
"type": "git",
13-
"url": "[email protected]:iguazio/dashboard-react-controls.git"
2+
"name": "iguazio.dashboard-react-controls",
3+
"version": "2.2.20",
4+
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
5+
"module": "./dist/index.mjs",
6+
"main": "./dist/index.mjs",
7+
"types": "./dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"import": "./dist/index.mjs",
11+
"types": "./dist/index.d.ts"
1412
},
15-
"keywords": [
16-
"Iguazio",
17-
"iguazio",
18-
"MLRun",
19-
"mlrun"
13+
"./components": "./dist/components/index.mjs",
14+
"./elements": "./dist/elements/index.mjs",
15+
"./hooks": "./dist/hooks/index.mjs",
16+
"./constants": "./dist/constants.mjs",
17+
"./types": "./dist/types.mjs",
18+
"./utils": "./dist/utils/index.mjs",
19+
"./utils/*": "./dist/utils/*",
20+
"./images/*": "./dist/images/*",
21+
"./scss/*": "./dist/scss/*",
22+
"./index.css": "./dist/index.css"
23+
},
24+
"files": [
25+
"dist",
26+
"README.md"
27+
],
28+
"repository": {
29+
"type": "git",
30+
"url": "[email protected]:iguazio/dashboard-react-controls.git"
31+
},
32+
"keywords": [
33+
"Iguazio",
34+
"iguazio",
35+
"MLRun",
36+
"mlrun"
37+
],
38+
"peerDependencies": {
39+
"classnames": "*",
40+
"final-form": "*",
41+
"final-form-arrays": "*",
42+
"lodash": "*",
43+
"prop-types": "*",
44+
"react": "*",
45+
"react-dom": "*",
46+
"react-final-form": "*",
47+
"react-final-form-arrays": "*",
48+
"react-modal-promise": "*",
49+
"react-transition-group": "*"
50+
},
51+
"devDependencies": {
52+
"@eslint/js": "^9.19.0",
53+
"@storybook/addon-actions": "^8.0.0",
54+
"@storybook/addon-essentials": "^8.0.0",
55+
"@storybook/addon-interactions": "^8.0.0",
56+
"@storybook/addon-links": "^8.0.0",
57+
"@storybook/builder-webpack5": "^8.0.0",
58+
"@storybook/manager-webpack5": "^6.5.16",
59+
"@storybook/react": "^8.0.0",
60+
"@storybook/testing-library": "0.2.2",
61+
"@types/react": "^19.0.8",
62+
"@types/react-dom": "^19.0.3",
63+
"@vitejs/plugin-react": "^4.3.4",
64+
"classnames": "^2.3.1",
65+
"cross-env": "^7.0.3",
66+
"eslint": "^9.13.0",
67+
"eslint-config-prettier": "^9.1.0",
68+
"eslint-plugin-react": "^7.37.4",
69+
"eslint-plugin-react-hooks": "^5.1.0",
70+
"eslint-plugin-react-refresh": "^0.4.14",
71+
"final-form": "^4.20.10",
72+
"final-form-arrays": "^3.1.0",
73+
"globals": "^15.14.0",
74+
"lodash": "^4.17.21",
75+
"node": "21.6.2",
76+
"prettier": "3.3.3",
77+
"prop-types": "^15.8.1",
78+
"react": "^18.2.0",
79+
"react-dom": "^18.2.0",
80+
"react-final-form": "^6.5.9",
81+
"react-final-form-arrays": "^3.1.4",
82+
"react-modal-promise": "^1.0.2",
83+
"react-transition-group": "^4.4.5",
84+
"sass": "^1.72.0",
85+
"tsup": "^8.3.6",
86+
"typescript": "^5.7.3",
87+
"typescript-eslint": "^8.11.0",
88+
"vite": "^6.0.11",
89+
"vite-plugin-commonjs": "^0.10.4",
90+
"vite-plugin-eslint": "^1.8.1",
91+
"vite-plugin-static-copy": "^2.2.0",
92+
"vite-plugin-svgr": "^4.3.0"
93+
},
94+
"scripts": {
95+
"lint": "eslint 'src/**/*.{js,jsx}' --quiet",
96+
"lint:fix": "eslint 'src/**/*.{js,jsx}' --fix",
97+
"prettier": "prettier --check 'src/**/*.{js,jsx,scss}'",
98+
"prettier:fix": "prettier --write 'src/**/*.{js,jsx,scss}'",
99+
"build-storybook": "build-storybook",
100+
"storybook": "start-storybook -p 6006",
101+
"start": "vite",
102+
"build": "vite build && npx tsc",
103+
"compile": "cross-env NODE_ENV=development vite build && npx tsc",
104+
"serve": "vite preview"
105+
},
106+
"browserslist": {
107+
"production": [
108+
">0.2%",
109+
"not dead",
110+
"not op_mini all"
20111
],
21-
"peerDependencies": {
22-
"classnames": "*",
23-
"final-form": "*",
24-
"final-form-arrays": "*",
25-
"lodash": "*",
26-
"prop-types": "*",
27-
"react": "*",
28-
"react-dom": "*",
29-
"react-final-form": "*",
30-
"react-final-form-arrays": "*",
31-
"react-modal-promise": "*",
32-
"react-transition-group": "*"
33-
},
34-
"devDependencies": {
35-
"@babel/cli": "^7.17.6",
36-
"@babel/core": "^7.17.9",
37-
"@babel/eslint-parser": "^7.17.0",
38-
"@babel/plugin-transform-react-jsx": "^7.17.3",
39-
"@babel/preset-env": "^7.16.11",
40-
"@babel/preset-react": "^7.23.3",
41-
"@storybook/addon-actions": "^8.0.0",
42-
"@storybook/addon-essentials": "^8.0.0",
43-
"@storybook/addon-interactions": "^8.0.0",
44-
"@storybook/addon-links": "^8.0.0",
45-
"@storybook/builder-webpack5": "^8.0.0",
46-
"@storybook/manager-webpack5": "^6.5.16",
47-
"@storybook/preset-create-react-app": "^8.0.0",
48-
"@storybook/react": "^8.0.0",
49-
"@storybook/testing-library": "0.2.2",
50-
"@testing-library/jest-dom": "^6.4.2",
51-
"@testing-library/react": "^14.2.1",
52-
"@testing-library/user-event": "^14.5.2",
53-
"babel-loader": "^8.2.4",
54-
"babel-plugin-inline-react-svg": "^2.0.1",
55-
"classnames": "^2.3.1",
56-
"cross-env": "^7.0.3",
57-
"eslint": "^8.57.0",
58-
"eslint-config-prettier": "^9.1.0",
59-
"eslint-config-react-app": "^7.0.1",
60-
"eslint-plugin-prettier": "^5.1.3",
61-
"eslint-plugin-storybook": "^0.8.0",
62-
"eslint-webpack-plugin": "^4.0.1",
63-
"final-form": "^4.20.10",
64-
"final-form-arrays": "^3.1.0",
65-
"lodash": "^4.17.21",
66-
"node": "21.6.2",
67-
"prettier": "3.2.5",
68-
"prop-types": "^15.8.1",
69-
"react": "^18.2.0",
70-
"react-dom": "^18.2.0",
71-
"react-final-form": "^6.5.9",
72-
"react-final-form-arrays": "^3.1.4",
73-
"react-modal-promise": "^1.0.2",
74-
"react-scripts": "5.0.1",
75-
"react-transition-group": "^4.4.5",
76-
"sass": "^1.50.0",
77-
"web-vitals": "^2.1.4",
78-
"webpack": "^5.94.0"
79-
},
80-
"scripts": {
81-
"start": "react-scripts start",
82-
"build": "react-scripts build",
83-
"lint": "eslint 'src/**/*.{js,jsx}' --quiet",
84-
"lint:fix": "eslint 'src/**/*.{js,jsx}' --fix",
85-
"prettier": "prettier --check 'src/**/*.{js,jsx,scss}'",
86-
"prettier:fix": "prettier --write 'src/**/*.{js,jsx,scss}'",
87-
"test": "react-scripts test",
88-
"eject": "react-scripts eject",
89-
"build-storybook": "build-storybook",
90-
"storybook": "start-storybook -p 6006",
91-
"compile": "rm -rf dist/* && babel src/lib --out-dir dist --copy-files --no-copy-ignored --ignore src/**/*.stories.js"
92-
},
93-
"eslintConfig": {
94-
"extends": [
95-
"react-app",
96-
"react-app/jest"
97-
]
98-
},
99-
"browserslist": {
100-
"production": [
101-
">0.2%",
102-
"not dead",
103-
"not op_mini all"
104-
],
105-
"development": [
106-
"last 1 chrome version",
107-
"last 1 firefox version",
108-
"last 1 safari version"
109-
]
110-
}
112+
"development": [
113+
"last 1 chrome version",
114+
"last 1 firefox version",
115+
"last 1 safari version"
116+
]
117+
}
111118
}

public/favicon.ico

-3.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)