Skip to content

Commit

Permalink
[PPI-976] examples use new package versions and vite
Browse files Browse the repository at this point in the history
  • Loading branch information
lysy-vlc committed Dec 14, 2023
1 parent 3ff91cf commit 83522e5
Show file tree
Hide file tree
Showing 47 changed files with 4,665 additions and 11,688 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ dist
.DS_Store
.env
.env.local
.env.development.localnvm install node
.env.development.local
nvm install node
.env.test.local
.env.production.local

Expand Down
18 changes: 18 additions & 0 deletions example/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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 },
],
},
}
24 changes: 24 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
8 changes: 6 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
This example was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
# @piwikpro/react-piwik-pro + React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

This example was bootstrapped with [Vite](https://vitejs.dev/).

It is linked to the @piwikpro/react-piwik-pro package in the parent directory for development purposes.

You can run `yarn install` and then `yarn start` to test your package.
You can run `npm install` and then `npm run dev` to test your package.
13 changes: 13 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 83522e5

Please sign in to comment.