-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Use Vite in the template #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
216bfaf
17ced7d
0bac571
b7bcf7f
c64cdd7
2386a24
7c15491
c10fd04
60d6763
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Build | ||
| on: [push] | ||
| jobs: | ||
| build-and-pack: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set Node.js 22.x | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22.x | ||
| - run: corepack enable | ||
| - name: Install dependencies | ||
| run: yarn install | ||
| - name: Bundle package | ||
| run: yarn build | ||
| - name: Upload package.tgz | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: package.tgz | ||
| path: dist/package.tgz |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="EslintConfiguration"> | ||
| <option name="fix-on-save" value="true" /> | ||
| </component> | ||
| </project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="PrettierConfiguration"> | ||
| <option name="myConfigurationMode" value="AUTOMATIC" /> | ||
| <option name="myRunOnSave" value="true" /> | ||
| </component> | ||
| </project> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # This file inherits .gitignore, there is no need to copy its content here |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "editor.defaultFormatter": "esbenp.prettier-vscode", | ||
| "editor.formatOnSave": true, | ||
| "eslint.validate": [ | ||
| "javascript", | ||
| "javascriptreact", | ||
| "typescript", | ||
| "typescriptreact" | ||
| ], | ||
| "eslint.run": "onSave" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nodeLinker: node-modules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // @ts-check | ||
| import { includeIgnoreFile } from "@eslint/compat"; | ||
| import eslint from "@eslint/js"; | ||
| import tseslint from "typescript-eslint"; | ||
| import path from "node:path"; | ||
| import globals from "globals"; | ||
| import eslintReact from "@eslint-react/eslint-plugin"; | ||
|
|
||
| export default tseslint.config( | ||
| { | ||
| languageOptions: { | ||
| globals: { ...globals.browser, ...globals.node }, | ||
| }, | ||
| }, | ||
|
|
||
| // JS/TS recommended | ||
| eslint.configs.recommended, | ||
| { files: ["**/*.ts", "**/*.tsx"], extends: tseslint.configs.recommended }, | ||
|
|
||
| // React | ||
| eslintReact.configs["recommended-typescript"], | ||
|
|
||
| // Ignore the same files as .gitignore | ||
| includeIgnoreFile(path.resolve(import.meta.dirname, ".gitignore")), | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * @type {import("prettier").Config} | ||
| * @see https://prettier.io/docs/en/configuration.html | ||
| */ | ||
| export default { | ||
| quoteProps: "consistent", | ||
| printWidth: 100, | ||
| plugins: ["prettier-plugin-jsdoc", "prettier-plugin-packagejson"], | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1 @@ | ||
| // PublicPath is used to make webpack able to download the chunks and assets from the correct location | ||
| // Since JS can be aggregated by Jahia on live, the path of the original file is lost | ||
| // Also the context of the server should be handled properly | ||
| // eslint-disable-next-line camelcase, no-undef | ||
| __webpack_public_path__ = `${window.__APPSHELL_INIT_DATA__.moduleBaseUrl}/$$MODULE_NAME$$/javascript/client/`; | ||
| // define your client components in this folder (configured in vite.config.mjs: client.input.dir) |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.