Skip to content

Commit

Permalink
Refactor example project
Browse files Browse the repository at this point in the history
  • Loading branch information
jpkleemans committed May 23, 2023
1 parent 351de45 commit b8cc048
Show file tree
Hide file tree
Showing 45 changed files with 1,206 additions and 3,908 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
uses: cypress-io/github-action@v4
with:
build: npm run example:build
start: npm run example:serve
wait-on: http://localhost:5000
start: npm run example:preview
wait-on: http://127.0.0.1:4173
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
7 changes: 5 additions & 2 deletions cypress.json
@@ -1,4 +1,7 @@
{
"baseUrl": "http://localhost:5000",
"video": false
"baseUrl": "http://127.0.0.1:4173",
"video": false,
"pluginsFile": false,
"supportFile": false,
"screenshotOnRunFailure": false
}
5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

4 changes: 2 additions & 2 deletions cypress/integration/spec.js
@@ -1,7 +1,7 @@
describe('Vite SVG Loader', () => {
it('successfully loads test page', () => {
cy.visit('/')
cy.contains('Hello Vue 3 + Vite')
cy.contains('Hello Vite SVG loader')
})

it('loads svg file', () => {
Expand Down Expand Up @@ -42,7 +42,7 @@ describe('Vite SVG Loader', () => {
})

it('supports ?url param', () => {
cy.get('#url').contains(/^\/assets\/test\..+\.svg/)
cy.get('#url').contains(/^\/assets\/test.*\.svg/)
})

it('supports ?raw param', () => {
Expand Down
22 changes: 0 additions & 22 deletions cypress/plugins/index.js

This file was deleted.

25 changes: 0 additions & 25 deletions cypress/support/commands.js

This file was deleted.

20 changes: 0 additions & 20 deletions cypress/support/index.js

This file was deleted.

28 changes: 28 additions & 0 deletions example/.gitignore
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
29 changes: 29 additions & 0 deletions example/README.md
@@ -0,0 +1,29 @@
# vite-svg-loader-example

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Compile and Minify for Production

```sh
npm run build
```
6 changes: 3 additions & 3 deletions examples/vue/index.html → example/index.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
Expand Down

0 comments on commit b8cc048

Please sign in to comment.