├── src
├── vite-env.d.ts
├── style.scss
└── main.ts
├── .gitignore
├── .eslintignore
├── .prettierignore
├── .prettierrc.js
├── index.html
├── tsconfig.json
├── .eslintrc.js
├── package.json
└── favicon.svg
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
6 | node_modules/*
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
6 | node_modules/*
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | semi: true,
3 | trailingComma: 'none',
4 | singleQuote: true,
5 | printWidth: 90,
6 | tabWidth: 2,
7 | endOfLine: 'auto',
8 | semi: false,
9 | }
10 |
--------------------------------------------------------------------------------
/src/style.scss:
--------------------------------------------------------------------------------
1 | #app {
2 | font-family: Avenir, Helvetica, Arial, sans-serif;
3 | -webkit-font-smoothing: antialiased;
4 | -moz-osx-font-smoothing: grayscale;
5 | text-align: center;
6 | color: #2c3e50;
7 | margin-top: 60px;
8 | }
9 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import './style.scss'
2 | import './lib/core'
3 |
4 | const app = document.querySelector('#app')!
5 |
6 | app.innerHTML = `
7 | Hello Vite!
8 | Documentation
9 | `
10 | console.log(document.querySelectorAll('h1'))
11 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ESNext",
4 | "useDefineForClassFields": true,
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "moduleResolution": "Node",
8 | "strict": true,
9 | "sourceMap": true,
10 | "resolveJsonModule": true,
11 | "esModuleInterop": true,
12 | "noEmit": true,
13 | "noUnusedLocals": true,
14 | "noUnusedParameters": true,
15 | "noImplicitReturns": true
16 | },
17 | "include": ["./src"]
18 | }
19 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | parserOptions: {
5 | ecmaVersion: 2020,
6 | sourceType: 'module',
7 | ecmaFeatures: {
8 | jsx: true
9 | }
10 | },
11 | settings: {
12 | react: {
13 | version: 'detect'
14 | }
15 | },
16 | env: {
17 | browser: true,
18 | amd: true,
19 | node: true
20 | },
21 | extends: [
22 | 'eslint:recommended',
23 | 'plugin:prettier/recommended' // Make sure this is always the last element in the array.
24 | ],
25 | plugins: ['simple-import-sort', 'prettier'],
26 | rules: {
27 | 'prettier/prettier': ['error', {}, { usePrettierrc: true }],
28 | '@typescript-eslint/explicit-function-return-type': 'off',
29 | 'simple-import-sort/imports': 'error',
30 | 'simple-import-sort/exports': 'error',
31 | semi: ['error', 'never'],
32 | 'comma-dangle': ['error', 'never']
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "component-library",
3 | "version": "1.0.0",
4 | "author": "Andrey Kudinov",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "tsc && vite build",
8 | "preview": "vite preview",
9 | "lint:fix": "eslint ./src --ext .js,.ts --quiet --fix --ignore-path ./.gitignore",
10 | "lint:format": "prettier --loglevel warn --write \"./**/*.{js,ts,css,md,json}\" ",
11 | "lint": "yarn lint:format && yarn lint:fix ",
12 | "type-check": "tsc"
13 | },
14 | "devDependencies": {
15 | "sass": "^1.49.4",
16 | "typescript": "^4.4.4",
17 | "vite": "^2.7.2",
18 | "@typescript-eslint/eslint-plugin": "^4.28.2",
19 | "@typescript-eslint/parser": "^4.28.2",
20 | "eslint": "^7.30.0",
21 | "eslint-config-prettier": "^8.3.0",
22 | "eslint-plugin-import": "^2.23.4",
23 | "eslint-plugin-prettier": "^3.4.0",
24 | "eslint-plugin-simple-import-sort": "^7.0.0",
25 | "pre-commit": "^1.2.2",
26 | "prettier": "^2.3.2"
27 | },
28 | "pre-commit": "lint"
29 | }
30 |
--------------------------------------------------------------------------------
/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------