Initial commit
This commit is contained in:
6
.browserslistrc
Normal file
6
.browserslistrc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Chrome >=79
|
||||||
|
ChromeAndroid >=79
|
||||||
|
Firefox >=70
|
||||||
|
Edge >=79
|
||||||
|
Safari >=14
|
||||||
|
iOS >=14
|
||||||
27
.eslintignore
Normal file
27
.eslintignore
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/coverage
|
||||||
|
/dist
|
||||||
|
/ios
|
||||||
|
/android
|
||||||
|
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
20
.eslintrc.cjs
Normal file
20
.eslintrc.cjs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
'extends': [
|
||||||
|
'plugin:vue/vue3-essential',
|
||||||
|
'eslint:recommended',
|
||||||
|
'@vue/typescript/recommended'
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 2020
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
|
'vue/no-deprecated-slot-attribute': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
}
|
||||||
|
}
|
||||||
32
.gitignore
vendored
Normal file
32
.gitignore
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Specifies intentionally untracked files to ignore when using Git
|
||||||
|
# http://git-scm.com/docs/gitignore
|
||||||
|
|
||||||
|
*~
|
||||||
|
*.sw[mnpcod]
|
||||||
|
.tmp
|
||||||
|
*.tmp
|
||||||
|
*.tmp.*
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
UserInterfaceState.xcuserstate
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
*.log
|
||||||
|
log.txt
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
/.idea
|
||||||
|
/.ionic
|
||||||
|
/.sass-cache
|
||||||
|
/.sourcemaps
|
||||||
|
/.versions
|
||||||
|
/.vscode/*
|
||||||
|
!/.vscode/extensions.json
|
||||||
|
/coverage
|
||||||
|
/dist
|
||||||
|
/node_modules
|
||||||
|
/platforms
|
||||||
|
/plugins
|
||||||
|
/www
|
||||||
5
.vscode/extensions.json
vendored
Normal file
5
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"Webnative.webnative"
|
||||||
|
]
|
||||||
|
}
|
||||||
9
capacitor.config.ts
Normal file
9
capacitor.config.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import type { CapacitorConfig } from '@capacitor/cli';
|
||||||
|
|
||||||
|
const config: CapacitorConfig = {
|
||||||
|
appId: 'io.ionic.starter',
|
||||||
|
appName: 'UpdaterApp',
|
||||||
|
webDir: 'dist'
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
15
cypress.config.ts
Normal file
15
cypress.config.ts
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { defineConfig } from 'cypress';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
e2e: {
|
||||||
|
supportFile: 'tests/e2e/support/e2e.{js,jsx,ts,tsx}',
|
||||||
|
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
|
||||||
|
videosFolder: 'tests/e2e/videos',
|
||||||
|
screenshotsFolder: 'tests/e2e/screenshots',
|
||||||
|
baseUrl: 'http://localhost:5173',
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
|
setupNodeEvents(on, config) {
|
||||||
|
// implement node event listeners here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
31
index.html
Normal file
31
index.html
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Ionic App</title>
|
||||||
|
|
||||||
|
<base href="/" />
|
||||||
|
|
||||||
|
<meta name="color-scheme" content="light dark" />
|
||||||
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||||
|
/>
|
||||||
|
<meta name="format-detection" content="telephone=no" />
|
||||||
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
|
|
||||||
|
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
|
||||||
|
|
||||||
|
<!-- add to homescreen for ios -->
|
||||||
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="Ionic App" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
||||||
7
ionic.config.json
Normal file
7
ionic.config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"name": "UpdaterApp",
|
||||||
|
"integrations": {
|
||||||
|
"capacitor": {}
|
||||||
|
},
|
||||||
|
"type": "vue-vite"
|
||||||
|
}
|
||||||
9815
package-lock.json
generated
Normal file
9815
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
46
package.json
Normal file
46
package.json
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"name": "UpdaterApp",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.1",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vue-tsc && vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"test:e2e": "cypress run",
|
||||||
|
"test:unit": "vitest",
|
||||||
|
"lint": "eslint ."
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@capacitor/app": "7.1.0",
|
||||||
|
"@capacitor/core": "7.4.3",
|
||||||
|
"@capacitor/haptics": "7.0.2",
|
||||||
|
"@capacitor/keyboard": "7.0.3",
|
||||||
|
"@capacitor/status-bar": "7.0.3",
|
||||||
|
"@ionic/vue": "^8.0.0",
|
||||||
|
"@ionic/vue-router": "^8.0.0",
|
||||||
|
"ionicons": "^7.0.0",
|
||||||
|
"vue": "^3.3.0",
|
||||||
|
"vue-router": "^4.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@capacitor/cli": "7.4.3",
|
||||||
|
"@vitejs/plugin-legacy": "^5.0.0",
|
||||||
|
"@vitejs/plugin-vue": "^4.0.0",
|
||||||
|
"@vue/eslint-config-typescript": "^12.0.0",
|
||||||
|
"@vue/test-utils": "^2.3.0",
|
||||||
|
"cypress": "^13.5.0",
|
||||||
|
"eslint": "^8.35.0",
|
||||||
|
"eslint-plugin-vue": "^9.9.0",
|
||||||
|
"jsdom": "^22.1.0",
|
||||||
|
"terser": "^5.4.0",
|
||||||
|
"typescript": "~5.6.2",
|
||||||
|
"vite": "~5.2.0",
|
||||||
|
"vitest": "^0.34.6",
|
||||||
|
"vue-tsc": "^2.1.10"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"rollup": "4.44.0"
|
||||||
|
},
|
||||||
|
"description": "An Ionic project"
|
||||||
|
}
|
||||||
BIN
public/favicon.png
Normal file
BIN
public/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 930 B |
9
src/App.vue
Normal file
9
src/App.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<ion-app>
|
||||||
|
<ion-router-outlet />
|
||||||
|
</ion-app>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { IonApp, IonRouterOutlet } from '@ionic/vue';
|
||||||
|
</script>
|
||||||
43
src/main.ts
Normal file
43
src/main.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
import App from './App.vue'
|
||||||
|
import router from './router';
|
||||||
|
|
||||||
|
import { IonicVue } from '@ionic/vue';
|
||||||
|
|
||||||
|
/* Core CSS required for Ionic components to work properly */
|
||||||
|
import '@ionic/vue/css/core.css';
|
||||||
|
|
||||||
|
/* Basic CSS for apps built with Ionic */
|
||||||
|
import '@ionic/vue/css/normalize.css';
|
||||||
|
import '@ionic/vue/css/structure.css';
|
||||||
|
import '@ionic/vue/css/typography.css';
|
||||||
|
|
||||||
|
/* Optional CSS utils that can be commented out */
|
||||||
|
import '@ionic/vue/css/padding.css';
|
||||||
|
import '@ionic/vue/css/float-elements.css';
|
||||||
|
import '@ionic/vue/css/text-alignment.css';
|
||||||
|
import '@ionic/vue/css/text-transformation.css';
|
||||||
|
import '@ionic/vue/css/flex-utils.css';
|
||||||
|
import '@ionic/vue/css/display.css';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ionic Dark Mode
|
||||||
|
* -----------------------------------------------------
|
||||||
|
* For more info, please see:
|
||||||
|
* https://ionicframework.com/docs/theming/dark-mode
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* @import '@ionic/vue/css/palettes/dark.always.css'; */
|
||||||
|
/* @import '@ionic/vue/css/palettes/dark.class.css'; */
|
||||||
|
import '@ionic/vue/css/palettes/dark.system.css';
|
||||||
|
|
||||||
|
/* Theme variables */
|
||||||
|
import './theme/variables.css';
|
||||||
|
|
||||||
|
const app = createApp(App)
|
||||||
|
.use(IonicVue)
|
||||||
|
.use(router);
|
||||||
|
|
||||||
|
router.isReady().then(() => {
|
||||||
|
app.mount('#app');
|
||||||
|
});
|
||||||
22
src/router/index.ts
Normal file
22
src/router/index.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import { createRouter, createWebHistory } from '@ionic/vue-router';
|
||||||
|
import { RouteRecordRaw } from 'vue-router';
|
||||||
|
import HomePage from '../views/HomePage.vue'
|
||||||
|
|
||||||
|
const routes: Array<RouteRecordRaw> = [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
redirect: '/home'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/home',
|
||||||
|
name: 'Home',
|
||||||
|
component: HomePage
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
|
routes
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
||||||
2
src/theme/variables.css
Normal file
2
src/theme/variables.css
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* For information on how to create your own theme, please see:
|
||||||
|
http://ionicframework.com/docs/theming/ */
|
||||||
56
src/views/HomePage.vue
Normal file
56
src/views/HomePage.vue
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<template>
|
||||||
|
<ion-page>
|
||||||
|
<ion-header :translucent="true">
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title>Blank</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content :fullscreen="true">
|
||||||
|
<ion-header collapse="condense">
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-title size="large">Blank</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
<strong>Ready to create an app?</strong>
|
||||||
|
<p>Start with Ionic <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
|
||||||
|
</div>
|
||||||
|
</ion-content>
|
||||||
|
</ion-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#container {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
#container strong {
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container p {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 22px;
|
||||||
|
|
||||||
|
color: #8c8c8c;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#container a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
1
src/vite-env.d.ts
vendored
Normal file
1
src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
5
tests/e2e/fixtures/example.json
Normal file
5
tests/e2e/fixtures/example.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "Using fixtures to represent data",
|
||||||
|
"email": "hello@cypress.io",
|
||||||
|
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||||
|
}
|
||||||
6
tests/e2e/specs/test.cy.ts
Normal file
6
tests/e2e/specs/test.cy.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
describe('My First Test', () => {
|
||||||
|
it('Visits the app root url', () => {
|
||||||
|
cy.visit('/')
|
||||||
|
cy.contains('#container', 'Ready to create an app?')
|
||||||
|
})
|
||||||
|
})
|
||||||
37
tests/e2e/support/commands.ts
Normal file
37
tests/e2e/support/commands.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/// <reference types="cypress" />
|
||||||
|
// ***********************************************
|
||||||
|
// This example commands.ts shows you how to
|
||||||
|
// create various custom commands and overwrite
|
||||||
|
// existing commands.
|
||||||
|
//
|
||||||
|
// For more comprehensive examples of custom
|
||||||
|
// commands please read more here:
|
||||||
|
// https://on.cypress.io/custom-commands
|
||||||
|
// ***********************************************
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a parent command --
|
||||||
|
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a child command --
|
||||||
|
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a dual command --
|
||||||
|
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This will overwrite an existing command --
|
||||||
|
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||||
|
//
|
||||||
|
// declare global {
|
||||||
|
// namespace Cypress {
|
||||||
|
// interface Chainable {
|
||||||
|
// login(email: string, password: string): Chainable<void>
|
||||||
|
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||||
|
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||||
|
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
20
tests/e2e/support/e2e.ts
Normal file
20
tests/e2e/support/e2e.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
// ***********************************************************
|
||||||
|
// This example support/e2e.ts is processed and
|
||||||
|
// loaded automatically before your test files.
|
||||||
|
//
|
||||||
|
// This is a great place to put global configuration and
|
||||||
|
// behavior that modifies Cypress.
|
||||||
|
//
|
||||||
|
// You can change the location of this file or turn off
|
||||||
|
// automatically serving support files with the
|
||||||
|
// 'supportFile' configuration option.
|
||||||
|
//
|
||||||
|
// You can read more here:
|
||||||
|
// https://on.cypress.io/configuration
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// Import commands.js using ES2015 syntax:
|
||||||
|
import './commands'
|
||||||
|
|
||||||
|
// Alternatively you can use CommonJS syntax:
|
||||||
|
// require('./commands')
|
||||||
10
tests/unit/example.spec.ts
Normal file
10
tests/unit/example.spec.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import HomePage from '@/views/HomePage.vue'
|
||||||
|
import { describe, expect, test } from 'vitest'
|
||||||
|
|
||||||
|
describe('HomePage.vue', () => {
|
||||||
|
test('renders home vue', () => {
|
||||||
|
const wrapper = mount(HomePage)
|
||||||
|
expect(wrapper.text()).toMatch('Ready to create an app?')
|
||||||
|
})
|
||||||
|
})
|
||||||
21
tsconfig.json
Normal file
21
tsconfig.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ESNext",
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"strict": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"lib": ["ESNext", "DOM"],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||||
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
|
}
|
||||||
9
tsconfig.node.json
Normal file
9
tsconfig.node.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"include": ["vite.config.ts"]
|
||||||
|
}
|
||||||
23
vite.config.ts
Normal file
23
vite.config.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/// <reference types="vitest" />
|
||||||
|
|
||||||
|
import legacy from '@vitejs/plugin-legacy'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import path from 'path'
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
vue(),
|
||||||
|
legacy()
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
globals: true,
|
||||||
|
environment: 'jsdom'
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user