From 157e95cdb1d6030ebc07373b542897e88f8e28f1 Mon Sep 17 00:00:00 2001 From: Olivier Hoareau Date: Mon, 27 May 2024 10:44:10 +0200 Subject: [PATCH] feat(plugin-js-vite-react-tailwind): creation of the package --- .../plugin-js-vite-react-tailwind/.gitignore | 1 + .../plugin-js-vite-react-tailwind/LICENSE.md | 21 +++ .../plugin-js-vite-react-tailwind/README.md | 1 + .../package.json | 35 +++++ .../src/Package.ts | 138 ++++++++++++++++++ .../src/Plugin.ts | 12 ++ .../src/index.ts | 1 + .../templates/.eslintrc.cjs.ejs | 18 +++ .../templates/env/env.env.ejs | 1 + .../templates/index.html.ejs | 13 ++ .../templates/postcss.config.js.ejs | 6 + .../templates/public/favicon.svg | 1 + .../templates/public/manifest.json.ejs | 15 ++ .../templates/public/robots.txt.ejs | 3 + .../templates/readme/original.md.ejs | 1 + .../templates/src/App.css.ejs | 0 .../templates/src/App.tsx.ejs | 19 +++ .../templates/src/index.css.ejs | 3 + .../templates/src/main.tsx.ejs | 10 ++ .../templates/src/vite-env.d.ts.ejs | 1 + .../templates/tailwind.config.js.ejs | 11 ++ .../templates/tsconfig.json.ejs | 25 ++++ .../templates/tsconfig.node.json.ejs | 11 ++ .../templates/vite.config.ts.ejs | 7 + .../tsconfig.json | 16 ++ .../plugin-js-vite-react-tailwind/vars.json | 38 +++++ 26 files changed, 408 insertions(+) create mode 100644 packages/plugin-js-vite-react-tailwind/.gitignore create mode 100644 packages/plugin-js-vite-react-tailwind/LICENSE.md create mode 100644 packages/plugin-js-vite-react-tailwind/README.md create mode 100644 packages/plugin-js-vite-react-tailwind/package.json create mode 100644 packages/plugin-js-vite-react-tailwind/src/Package.ts create mode 100644 packages/plugin-js-vite-react-tailwind/src/Plugin.ts create mode 100644 packages/plugin-js-vite-react-tailwind/src/index.ts create mode 100644 packages/plugin-js-vite-react-tailwind/templates/.eslintrc.cjs.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/env/env.env.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/index.html.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/postcss.config.js.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/public/favicon.svg create mode 100644 packages/plugin-js-vite-react-tailwind/templates/public/manifest.json.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/public/robots.txt.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/readme/original.md.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/src/App.css.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/src/App.tsx.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/src/index.css.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/src/main.tsx.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/src/vite-env.d.ts.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/tailwind.config.js.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/tsconfig.json.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/tsconfig.node.json.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/templates/vite.config.ts.ejs create mode 100644 packages/plugin-js-vite-react-tailwind/tsconfig.json create mode 100644 packages/plugin-js-vite-react-tailwind/vars.json diff --git a/packages/plugin-js-vite-react-tailwind/.gitignore b/packages/plugin-js-vite-react-tailwind/.gitignore new file mode 100644 index 00000000..4f09721e --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/.gitignore @@ -0,0 +1 @@ +!public/ \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/LICENSE.md b/packages/plugin-js-vite-react-tailwind/LICENSE.md new file mode 100644 index 00000000..97070f81 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 GenJS Dev Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/README.md b/packages/plugin-js-vite-react-tailwind/README.md new file mode 100644 index 00000000..cd635c8e --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/README.md @@ -0,0 +1 @@ +# genjs-plugin-js-vite-react-tailwind diff --git a/packages/plugin-js-vite-react-tailwind/package.json b/packages/plugin-js-vite-react-tailwind/package.json new file mode 100644 index 00000000..aeaab1c8 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/package.json @@ -0,0 +1,35 @@ +{ + "name": "@genjs/genjs-plugin-js-vite-react-tailwind", + "version": "0.0.0", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "templates", + "vars.json" + ], + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "tsc", + "test": "../../node_modules/.bin/jest -c ../../jest.config.js --rootDir=`pwd`", + "gen": "../genjs/bin/genjs", + "dump": "../genjs/bin/genjs dump" + }, + "peerDependencies": { + "@genjs/genjs": "^0" + }, + "dependencies": { + "@genjs/genjs-bundle-aws": "^0.1.28", + "@genjs/genjs-bundle-javascript": "^0.1.31" + }, + "devDependencies": { + "@genjs/genjs": "^0.4.25" + } +} diff --git a/packages/plugin-js-vite-react-tailwind/src/Package.ts b/packages/plugin-js-vite-react-tailwind/src/Package.ts new file mode 100644 index 00000000..e074d46c --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/src/Package.ts @@ -0,0 +1,138 @@ +import {JavascriptPackage} from '@genjs/genjs-bundle-javascript'; + +export default class Package extends JavascriptPackage { + constructor(config: any) { + super(config, __dirname); + } + // noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols + protected buildDefaultVars(vars: any) { + return { + ...super.buildDefaultVars(vars), + project_prefix: 'mycompany', + project_name: 'myproject', + }; + } + protected buildVars(vars: any): any { + const staticVars = require('../vars.json'); + vars = {...staticVars, ...super.buildVars(vars)}; + vars.scripts = { + ...staticVars.scripts, + ...(vars.scripts || {}), + }; + vars.dependencies = { + ...staticVars.dependencies, + ...(vars.dependencies || {}), + }; + vars.devDependencies = { + ...staticVars.devDependencies, + ...(vars.devDependencies || {}), + }; + return vars; + } + protected buildReadme(vars: any) { + return super.buildReadme(vars) + .addFragmentFromTemplate(`${__dirname}/../templates/readme/original.md.ejs`) + ; + } + // noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols + protected async buildStaticFiles(vars: any, cfg: any) { + return { + ...(await super.buildStaticFiles(vars, cfg)), + 'public/favicon.svg?': true, + }; + } + // noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols + protected async buildDynamicFiles(vars: any, cfg: any) { + return { + ...(await super.buildDynamicFiles({licenseFile: 'LICENSE.md', ...vars}, cfg)), + ['package.json?']: () => JSON.stringify({ + name: vars.name, + type: 'module', + version: vars.version, + license: vars.license, + scripts: vars.scripts, + devDependencies: vars.devDependencies, + dependencies: vars.dependencies, + description: vars.description, + author: (vars.author && ('object' === typeof vars.author)) ? vars.author : {name: vars.author_name, email: vars.author_email}, + private: true, + ...(vars.raw_package_json ? vars.raw_package_json : {}), + }, null, 4), + }; + } + protected async buildFilesFromTemplates(vars: any, cfg: any) { + return { + ...(await super.buildFilesFromTemplates(vars, cfg)), + 'tsconfig.json?': true, + 'tsconfig.node.json?': true, + 'vite.config.ts?': true, + 'tailwind.config.cjs?': true, + 'postcss.config.js?': true, + 'index.html?': true, + 'eslintrc.cjs?': true, + 'public/manifest.json?': true, + 'public/robots.txt?': true, + 'src/App.css?': true, + 'src/App.tsx?': true, + 'src/index.css?': true, + 'src/main.tsx?': true, + 'src/vite-env.d.ts?': true, + ...Object.entries(vars.project_envs || {}).reduce((acc, [k, v]) => { + acc[`env/${k}.env?`] = ['env/env.env.ejs', {project_env: v}]; + return acc; + }, {}), + }; + } + protected buildGitIgnore(vars: any) { + return super.buildGitIgnore(vars) + .addGroup('build output', [ + '/dist/', + '/dist-ssr/', + ]) + .addGroup('dependencies', [ + '/node_modules/', + ]) + .addGroup('testing', [ + '/coverage', + ]) + .addGroup('misc', [ + '.DS_Store', '/.idea/', '/.vscode/', + '.env.local', '.env.development.local', '.env.test.local', '.env.production.local', + 'npm-debug.log*', 'yarn-debug.log*', 'yarn-error.log*', 'pnpm-debug.log*', '/src/index.generated.css' + ]) + ; + } + protected buildMakefile(vars: any) { + return super.buildMakefile(vars) + .addGlobalVar('prefix', vars.project_prefix) + .addGlobalVar('bucket_prefix', vars.bucket_prefix ? vars.bucket_prefix : `$(prefix)-${vars.project_name}`) + .addGlobalVar('env', 'dev') + .addGlobalVar('AWS_PROFILE', `${vars.aws_profile_prefix || '$(prefix)'}-$(env)`) + .addGlobalVar('bucket', vars.bucket ? vars.bucket : `$(env)-$(bucket_prefix)-${vars.name}`) + .addGlobalVar('cloudfront', vars.cloudfront ? vars.cloudfront : `$(AWS_CLOUDFRONT_DISTRIBUTION_ID_${vars.name.toUpperCase().replace(/[^A-Z0-9_]+/g, '_')})`) + .addPredefinedTarget('install', 'js-install') + .addPredefinedTarget('build', 'js-build', {force_npm_run: true, ci: (!!vars.hide_ci) ? 'hidden' : undefined, sourceLocalEnvLocal: vars.sourceLocalEnvLocal}) + .addPredefinedTarget('deploy-code', 'aws-s3-sync', {source: 'dist/', cacheControl: vars.s3_cache_control}) + .addPredefinedTarget('invalidate-cache', 'aws-cloudfront-create-invalidation') + .addMetaTarget('deploy', ['deploy-code', 'invalidate-cache']) + .addPredefinedTarget('generate-env-local', 'generate-env-local', {prefix: 'PUBLIC', mode: vars.env_mode || 'terraform'}) + .addPredefinedTarget('start', 'js-start', {port: this.getParameter('startPort'), sourceLocalEnvLocal: vars.sourceLocalEnvLocal}) + .addPredefinedTarget('test', 'js-test', {force_npm_run: true, ci: true, coverage: false}) + .addPredefinedTarget('test-dev', 'js-test', {force_npm_run: true, local: true, all: true, coverage: false, color: true}) + .addPredefinedTarget('test-cov', 'js-test', {force_npm_run: true, local: true}) + .addPredefinedTarget('test-ci', 'js-test', {force_npm_run: true, ci: true, coverage: false}) + ; + } + protected getTechnologies() { + return [ + ...super.getTechnologies(), + // 'vite', + 'tailwindcss', + 'aws_cli', + 'aws_cloudfront', + 'aws_s3', + 'aws_route53', + this.vars.publish_image && 'docker', + ]; + } +} \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/src/Plugin.ts b/packages/plugin-js-vite-react-tailwind/src/Plugin.ts new file mode 100644 index 00000000..f5171e23 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/src/Plugin.ts @@ -0,0 +1,12 @@ +import Package from './Package'; +import {IGenerator, IPlugin} from '@genjs/genjs'; +import registerJavascriptBundle from '@genjs/genjs-bundle-javascript'; +import registerAwsBundle from '@genjs/genjs-bundle-aws'; + +export default class Plugin implements IPlugin { + register(generator: IGenerator): void { + registerAwsBundle(generator); + registerJavascriptBundle(generator); + generator.registerPackager('js-vite-react-tailwind', cfg => new Package(cfg)); + } +} diff --git a/packages/plugin-js-vite-react-tailwind/src/index.ts b/packages/plugin-js-vite-react-tailwind/src/index.ts new file mode 100644 index 00000000..f3eefc13 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/src/index.ts @@ -0,0 +1 @@ +export {default as default} from './Plugin'; \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/templates/.eslintrc.cjs.ejs b/packages/plugin-js-vite-react-tailwind/templates/.eslintrc.cjs.ejs new file mode 100644 index 00000000..d6c95379 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/.eslintrc.cjs.ejs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/env/env.env.ejs b/packages/plugin-js-vite-react-tailwind/templates/env/env.env.ejs new file mode 100644 index 00000000..38d6728c --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/env/env.env.ejs @@ -0,0 +1 @@ +AWS_CLOUDFRONT_DISTRIBUTION_ID_<%= (name || 'app').toUpperCase() -%>=<%= project_env[`${name}Cloudfront`] ||'EXXXXXXXXXXXXX' %> diff --git a/packages/plugin-js-vite-react-tailwind/templates/index.html.ejs b/packages/plugin-js-vite-react-tailwind/templates/index.html.ejs new file mode 100644 index 00000000..d3eff216 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/index.html.ejs @@ -0,0 +1,13 @@ + + + + + + + APP + + +
+ + + diff --git a/packages/plugin-js-vite-react-tailwind/templates/postcss.config.js.ejs b/packages/plugin-js-vite-react-tailwind/templates/postcss.config.js.ejs new file mode 100644 index 00000000..2e7af2b7 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/postcss.config.js.ejs @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/public/favicon.svg b/packages/plugin-js-vite-react-tailwind/templates/public/favicon.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/templates/public/manifest.json.ejs b/packages/plugin-js-vite-react-tailwind/templates/public/manifest.json.ejs new file mode 100644 index 00000000..c23c6f64 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/public/manifest.json.ejs @@ -0,0 +1,15 @@ +{ + "short_name": "App", + "name": "App", + "icons": [ + { + "src": "favicon.svg", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/svg+xml" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/public/robots.txt.ejs b/packages/plugin-js-vite-react-tailwind/templates/public/robots.txt.ejs new file mode 100644 index 00000000..e9e57dc4 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/public/robots.txt.ejs @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/packages/plugin-js-vite-react-tailwind/templates/readme/original.md.ejs b/packages/plugin-js-vite-react-tailwind/templates/readme/original.md.ejs new file mode 100644 index 00000000..a916173e --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/readme/original.md.ejs @@ -0,0 +1 @@ +# <%= name %> diff --git a/packages/plugin-js-vite-react-tailwind/templates/src/App.css.ejs b/packages/plugin-js-vite-react-tailwind/templates/src/App.css.ejs new file mode 100644 index 00000000..e69de29b diff --git a/packages/plugin-js-vite-react-tailwind/templates/src/App.tsx.ejs b/packages/plugin-js-vite-react-tailwind/templates/src/App.tsx.ejs new file mode 100644 index 00000000..77400885 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/src/App.tsx.ejs @@ -0,0 +1,19 @@ +import './App.css' +import { + createBrowserRouter, + RouterProvider, +} from "react-router-dom"; + +function App() { + const router = createBrowserRouter([ + { + path: '/', + element: () =>
HOME
, + }, + ]); + return ( + + ) +} + +export default App diff --git a/packages/plugin-js-vite-react-tailwind/templates/src/index.css.ejs b/packages/plugin-js-vite-react-tailwind/templates/src/index.css.ejs new file mode 100644 index 00000000..b5c61c95 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/src/index.css.ejs @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/packages/plugin-js-vite-react-tailwind/templates/src/main.tsx.ejs b/packages/plugin-js-vite-react-tailwind/templates/src/main.tsx.ejs new file mode 100644 index 00000000..3d7150da --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/src/main.tsx.ejs @@ -0,0 +1,10 @@ +import React from 'react' +import ReactDOM from 'react-dom/client' +import App from './App.tsx' +import './index.css' + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +) diff --git a/packages/plugin-js-vite-react-tailwind/templates/src/vite-env.d.ts.ejs b/packages/plugin-js-vite-react-tailwind/templates/src/vite-env.d.ts.ejs new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/src/vite-env.d.ts.ejs @@ -0,0 +1 @@ +/// diff --git a/packages/plugin-js-vite-react-tailwind/templates/tailwind.config.js.ejs b/packages/plugin-js-vite-react-tailwind/templates/tailwind.config.js.ejs new file mode 100644 index 00000000..555473f5 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/tailwind.config.js.ejs @@ -0,0 +1,11 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "./index.html", + "./src/**/*.{js,ts,jsx,tsx}", + ], + theme: { + extend: {}, + }, + plugins: [], +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/tsconfig.json.ejs b/packages/plugin-js-vite-react-tailwind/templates/tsconfig.json.ejs new file mode 100644 index 00000000..a7fc6fbf --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/tsconfig.json.ejs @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/tsconfig.node.json.ejs b/packages/plugin-js-vite-react-tailwind/templates/tsconfig.node.json.ejs new file mode 100644 index 00000000..97ede7ee --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/tsconfig.node.json.ejs @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true + }, + "include": ["vite.config.ts"] +} diff --git a/packages/plugin-js-vite-react-tailwind/templates/vite.config.ts.ejs b/packages/plugin-js-vite-react-tailwind/templates/vite.config.ts.ejs new file mode 100644 index 00000000..5a33944a --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/templates/vite.config.ts.ejs @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], +}) diff --git a/packages/plugin-js-vite-react-tailwind/tsconfig.json b/packages/plugin-js-vite-react-tailwind/tsconfig.json new file mode 100644 index 00000000..dc55eeec --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "composite": true + }, + "references": [ + { "path": "../genjs" }, + { "path": "../bundle-javascript" }, + { "path": "../bundle-aws" } + ], + "include": [ + "./src" + ] +} \ No newline at end of file diff --git a/packages/plugin-js-vite-react-tailwind/vars.json b/packages/plugin-js-vite-react-tailwind/vars.json new file mode 100644 index 00000000..d5ecc175 --- /dev/null +++ b/packages/plugin-js-vite-react-tailwind/vars.json @@ -0,0 +1,38 @@ +{ + "name": "my", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview", + "test": "echo true" + }, + "dependencies": { + "@headlessui/react": "^1.7.18", + "@heroicons/react": "^2.1.3", + "i18next": "^23.11.2", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-i18next": "^14.1.0", + "react-router-dom": "^6.22.3" + }, + "devDependencies": { + "@tailwindcss/forms": "^0.5.7", + "@types/react": "^18.2.66", + "@types/react-dom": "^18.2.22", + "@typescript-eslint/eslint-plugin": "^7.2.0", + "@typescript-eslint/parser": "^7.2.0", + "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.19", + "eslint": "^8.57.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.6", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.3", + "typescript": "^5.2.2", + "vite": "^5.2.0" + } +} \ No newline at end of file