-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5333 from paolostyle/use-vite-to-build-docs-site
chore(docs): use Vite to build docs site
- Loading branch information
Showing
15 changed files
with
3,588 additions
and
12,122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import react from "eslint-plugin-react"; | ||
import reactHooks from "eslint-plugin-react-hooks"; | ||
import reactRefresh from "eslint-plugin-react-refresh"; | ||
|
||
export default [ | ||
{ ignores: ["dist"] }, | ||
{ | ||
files: ["**/*.{js,jsx}"], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
ecmaFeatures: { jsx: true }, | ||
sourceType: "module", | ||
}, | ||
}, | ||
settings: { react: { version: "18.3" } }, | ||
plugins: { | ||
react, | ||
"react-hooks": reactHooks, | ||
"react-refresh": reactRefresh, | ||
}, | ||
rules: { | ||
...js.configs.recommended.rules, | ||
...react.configs.recommended.rules, | ||
...react.configs["jsx-runtime"].rules, | ||
...reactHooks.configs.recommended.rules, | ||
"react/jsx-no-target-blank": "off", | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"react/no-unescaped-entities": "off", | ||
"react/prop-types": "off", | ||
}, | ||
}, | ||
{ | ||
files: ["src/examples/**/*.{js,jsx}"], | ||
languageOptions: { | ||
globals: { | ||
useState: false, | ||
render: false, | ||
DatePicker: false, | ||
getHours: false, | ||
setHours: false, | ||
setSeconds: false, | ||
setMinutes: false, | ||
getDate: false, | ||
addDays: false, | ||
subDays: false, | ||
addMonths: false, | ||
fi: false, | ||
getDay: false, | ||
isValid: false, | ||
format: false, | ||
range: false, | ||
getYear: false, | ||
getMonth: false, | ||
CalendarContainer: false, | ||
subMonths: false, | ||
forwardRef: false, | ||
}, | ||
}, | ||
rules: { | ||
"no-unused-expressions": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-no-undef": [ | ||
"error", | ||
{ | ||
allowGlobals: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="theme-color" content="#000000" /> | ||
<meta | ||
name="description" | ||
content="A simple and reusable datepicker component for React." | ||
/> | ||
<meta | ||
name="keywords" | ||
content="React, HTML, CSS, JavaScript, JSX, date, datepicker" | ||
/> | ||
<title>React Datepicker crafted by HackerOne</title> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" | ||
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" | ||
crossorigin="anonymous" | ||
referrerpolicy="no-referrer" | ||
/> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.jsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,37 +2,36 @@ | |
"name": "react-datepicker-docs", | ||
"version": "0.1.0", | ||
"private": true, | ||
"type": "module", | ||
"dependencies": { | ||
"date-fns": "^4.1.0", | ||
"highlight.js": "^11.11.1", | ||
"lodash": "^4.17.21", | ||
"prism-react-renderer": "^2.4.1", | ||
"react": "^19.0.0", | ||
"react-datepicker": "portal:../", | ||
"react-dom": "^19.0.0", | ||
"react-live": "^4.1.8" | ||
"react-live": "^4.1.8", | ||
"slugify": "^1.6.6" | ||
}, | ||
"scripts": { | ||
"start": "react-app-rewired start", | ||
"build": "react-app-rewired build", | ||
"test": "react-app-rewired test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"browserslist": { | ||
"production": [">0.2%", "not dead", "not op_mini all"], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
"start": "vite", | ||
"build": "vite build", | ||
"lint": "eslint .", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"raw-loader": "^4.0.2", | ||
"react-app-rewired": "^2.2.1", | ||
"react-scripts": "5.0.1", | ||
"sass": "^1.83.4" | ||
}, | ||
"resolutions": { | ||
"strip-ansi": "6.0.1" | ||
"@eslint/js": "^9.17.0", | ||
"@types/react": "^18.3.18", | ||
"@types/react-dom": "^18.3.5", | ||
"@vitejs/plugin-react": "^4.3.4", | ||
"eslint": "^9.17.0", | ||
"eslint-plugin-react": "^7.37.2", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"eslint-plugin-react-refresh": "^0.4.16", | ||
"globals": "^15.14.0", | ||
"sass": "^1.83.4", | ||
"vite": "^6.0.10" | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file was deleted.
Oops, something went wrong.
20 changes: 8 additions & 12 deletions
20
docs-site/src/components/App/index.js → docs-site/src/components/App/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.