Skip to content
This repository was archived by the owner on Mar 8, 2025. It is now read-only.

Commit 41e2b93

Browse files
committed
feat: init the project
0 parents  commit 41e2b93

23 files changed

+12486
-0
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not dead

.eslintrc.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
"plugin:vue/vue3-essential",
8+
"eslint:recommended",
9+
"@vue/typescript/recommended",
10+
"@vue/prettier",
11+
"@vue/prettier/@typescript-eslint",
12+
],
13+
parserOptions: {
14+
ecmaVersion: 2020,
15+
},
16+
rules: {
17+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
18+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
19+
},
20+
overrides: [
21+
{
22+
files: [
23+
"**/__tests__/*.{j,t}s?(x)",
24+
"**/tests/unit/**/*.spec.{j,t}s?(x)",
25+
],
26+
env: {
27+
jest: true,
28+
},
29+
},
30+
],
31+
};

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
/tests/e2e/videos/
6+
/tests/e2e/screenshots/
7+
8+
9+
# local env files
10+
.env.local
11+
.env.*.local
12+
13+
# Log files
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
pnpm-debug.log*
18+
19+
# Editor directories and files
20+
.idea
21+
.vscode
22+
*.suo
23+
*.ntvs*
24+
*.njsproj
25+
*.sln
26+
*.sw?

README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# vue-animation-timeline
2+
3+
## Project setup
4+
```
5+
yarn install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
yarn serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
yarn build
16+
```
17+
18+
### Run your unit tests
19+
```
20+
yarn test:unit
21+
```
22+
23+
### Run your end-to-end tests
24+
```
25+
yarn test:e2e
26+
```
27+
28+
### Lints and fixes files
29+
```
30+
yarn lint
31+
```
32+
33+
### Customize configuration
34+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["@vue/cli-plugin-babel/preset"],
3+
};

cypress.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pluginsFile": "tests/e2e/plugins/index.js"
3+
}

jest.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
3+
transform: {
4+
"^.+\\.vue$": "vue-jest",
5+
},
6+
};

package.json

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "vue-animation-timeline",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"test:unit": "vue-cli-service test:unit",
9+
"test:e2e": "vue-cli-service test:e2e",
10+
"lint": "vue-cli-service lint"
11+
},
12+
"dependencies": {
13+
"core-js": "^3.6.5",
14+
"vue": "^3.0.0"
15+
},
16+
"devDependencies": {
17+
"@types/jest": "^24.0.19",
18+
"@typescript-eslint/eslint-plugin": "^4.18.0",
19+
"@typescript-eslint/parser": "^4.18.0",
20+
"@vue/cli-plugin-babel": "~4.5.0",
21+
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
22+
"@vue/cli-plugin-eslint": "~4.5.0",
23+
"@vue/cli-plugin-typescript": "~4.5.0",
24+
"@vue/cli-plugin-unit-jest": "~4.5.0",
25+
"@vue/cli-service": "~4.5.0",
26+
"@vue/compiler-sfc": "^3.0.0",
27+
"@vue/eslint-config-prettier": "^6.0.0",
28+
"@vue/eslint-config-typescript": "^7.0.0",
29+
"@vue/test-utils": "^2.0.0-0",
30+
"eslint": "^6.7.2",
31+
"eslint-plugin-prettier": "^3.3.1",
32+
"eslint-plugin-vue": "^7.0.0",
33+
"fibers": "^5.0.0",
34+
"lint-staged": "^9.5.0",
35+
"node-sass": "^7.0.0",
36+
"prettier": "^2.2.1",
37+
"sass": "^1.44.0",
38+
"sass-loader": "^10",
39+
"typescript": "~4.1.5",
40+
"vue-jest": "^5.0.0-0"
41+
},
42+
"gitHooks": {
43+
"pre-commit": "lint-staged"
44+
},
45+
"lint-staged": {
46+
"*.{js,jsx,vue,ts,tsx}": [
47+
"vue-cli-service lint",
48+
"git add"
49+
]
50+
}
51+
}

public/favicon.ico

4.19 KB
Binary file not shown.

public/index.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
</head>
10+
<body style="padding: 0; margin: 0">
11+
<noscript>
12+
<strong>
13+
We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without
14+
JavaScript enabled. Please enable it to continue.
15+
</strong>
16+
</noscript>
17+
<div id="app" style="width: 100vw; height: 100vh"></div>
18+
<!-- built files will be auto injected -->
19+
</body>
20+
</html>

src/assets/logo.png

6.69 KB
Loading

src/components/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import VueAnimationTimeline from "./timeline.vue";
2+
3+
export { VueAnimationTimeline };
4+
5+
export default VueAnimationTimeline;

src/components/timeline.vue

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<template>
2+
<div class="va-timeline__wrapper">
3+
<!-- -->
4+
</div>
5+
</template>
6+
7+
<script lang="ts">
8+
import { defineComponent } from "vue";
9+
10+
export default defineComponent({
11+
name: "AnimationTimeline",
12+
components: {},
13+
setup() {
14+
//
15+
},
16+
});
17+
</script>
18+
19+
<style lang="scss">
20+
.va-timeline {
21+
&__wrapper {
22+
width: 100%;
23+
height: 100%;
24+
background-color: rgb(32, 32, 32);
25+
}
26+
}
27+
</style>

src/main.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { createApp } from "vue";
2+
3+
import VueAnimationTimeline from "./components";
4+
5+
createApp(VueAnimationTimeline).mount("#app");

src/shims-vue.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* eslint-disable */
2+
declare module '*.vue' {
3+
import type { DefineComponent } from 'vue'
4+
const component: DefineComponent<{}, {}, any>
5+
export default component
6+
}

tests/e2e/.eslintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
plugins: ["cypress"],
3+
env: {
4+
mocha: true,
5+
"cypress/globals": true,
6+
},
7+
rules: {
8+
strict: "off",
9+
},
10+
};

tests/e2e/plugins/index.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* eslint-disable arrow-body-style */
2+
// https://docs.cypress.io/guides/guides/plugins-guide.html
3+
4+
// if you need a custom webpack configuration you can uncomment the following import
5+
// and then use the `file:preprocessor` event
6+
// as explained in the cypress docs
7+
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
8+
9+
// /* eslint-disable import/no-extraneous-dependencies, global-require */
10+
// const webpack = require('@cypress/webpack-preprocessor')
11+
12+
module.exports = (on, config) => {
13+
// on('file:preprocessor', webpack({
14+
// webpackOptions: require('@vue/cli-service/webpack.config'),
15+
// watchOptions: {}
16+
// }))
17+
18+
return Object.assign({}, config, {
19+
fixturesFolder: "tests/e2e/fixtures",
20+
integrationFolder: "tests/e2e/specs",
21+
screenshotsFolder: "tests/e2e/screenshots",
22+
videosFolder: "tests/e2e/videos",
23+
supportFile: "tests/e2e/support/index.js",
24+
});
25+
};

tests/e2e/specs/test.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// https://docs.cypress.io/api/introduction/api.html
2+
3+
describe("My First Test", () => {
4+
it("Visits the app root url", () => {
5+
cy.visit("/");
6+
cy.contains("h1", "Welcome to Your Vue.js + TypeScript App");
7+
});
8+
});

tests/e2e/support/commands.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add("login", (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This is will overwrite an existing command --
25+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

tests/e2e/support/index.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import "./commands";
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

tests/unit/example.spec.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { shallowMount } from "@vue/test-utils";
2+
import HelloWorld from "@/components/HelloWorld.vue";
3+
4+
describe("HelloWorld.vue", () => {
5+
it("renders props.msg when passed", () => {
6+
const msg = "new message";
7+
const wrapper = shallowMount(HelloWorld, {
8+
props: { msg },
9+
});
10+
expect(wrapper.text()).toMatch(msg);
11+
});
12+
});

tsconfig.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"module": "esnext",
5+
"strict": true,
6+
"jsx": "preserve",
7+
"importHelpers": true,
8+
"moduleResolution": "node",
9+
"skipLibCheck": true,
10+
"esModuleInterop": true,
11+
"allowSyntheticDefaultImports": true,
12+
"sourceMap": true,
13+
"baseUrl": ".",
14+
"types": [
15+
"webpack-env",
16+
"jest"
17+
],
18+
"paths": {
19+
"@/*": [
20+
"src/*"
21+
]
22+
},
23+
"lib": [
24+
"esnext",
25+
"dom",
26+
"dom.iterable",
27+
"scripthost"
28+
]
29+
},
30+
"include": [
31+
"src/**/*.ts",
32+
"src/**/*.tsx",
33+
"src/**/*.vue",
34+
"tests/**/*.ts",
35+
"tests/**/*.tsx"
36+
],
37+
"exclude": [
38+
"node_modules"
39+
]
40+
}

0 commit comments

Comments
 (0)