Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 08ffcc6

Browse files
authored
Merge pull request #12 from hisasann/feature/add-animejs
feat: add animejs
2 parents e497039 + f4dbbfd commit 08ffcc6

File tree

4 files changed

+76
-40
lines changed

4 files changed

+76
-40
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"@nuxtjs/sentry": "^2.3.2",
5454
"@types/webpack": "^4.4.27",
5555
"@ungap/url-search-params": "^0.1.2",
56+
"animejs": "^3.0.1",
5657
"body-parser": "^1.18.3",
5758
"cross-env": "^5.2.0",
5859
"express": "^4.16.4",
@@ -69,6 +70,7 @@
6970
"@nuxtjs/eslint-config": "^0.0.1",
7071
"@nuxtjs/style-resources": "^0.1.2",
7172
"@storybook/vue": "^5.0.6",
73+
"@types/animejs": "^2.0.2",
7274
"@types/babel-core": "6.25.6",
7375
"@types/eslint": "^4.16.6",
7476
"@types/eslint-plugin-prettier": "2.2.0",

src/pages/example/animejs.vue

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<template lang="pug">
2+
section.container
3+
h1.title
4+
| animjs
5+
div
6+
.anime(ref="anime" @click="click")
7+
</template>
8+
9+
<script lang="ts">
10+
import { Component, Vue } from 'nuxt-property-decorator'
11+
import anime from 'animejs'
12+
13+
@Component
14+
export default class extends Vue {
15+
public click(e) {
16+
anime({
17+
targets: this.$refs.anime,
18+
translateX: 250,
19+
begin: function(anim) {
20+
console.log('began : ' + anim.began)
21+
},
22+
complete: function(anim) {
23+
console.log('completed : ' + anim.completed)
24+
}
25+
})
26+
}
27+
28+
public head() {
29+
return {
30+
title: 'animejs'
31+
}
32+
}
33+
}
34+
</script>
35+
36+
<style lang="scss">
37+
.anime {
38+
width: 200px;
39+
height: 200px;
40+
background-color: crimson;
41+
}
42+
</style>

src/pages/example/index.vue

+22-40
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,47 @@ section
66
| - nuxtClientInit has been called is {{ isClientInitCalled }}
77
hr
88
p
9-
nuxt-link(to='/example/auth/require-auth')
10-
| require-auth
9+
nuxt-link(to='/example/auth/require-auth') require-auth
1110
p
12-
nuxt-link(to='/example/ajax/color', no-prefetch)
13-
| color
11+
nuxt-link(to='/example/ajax/color', no-prefetch) color
1412
p
15-
nuxt-link(to='/example/ajax/schema')
16-
| schema
13+
nuxt-link(to='/example/ajax/schema') schema
1714
p
18-
nuxt-link(to='/example/ajax/custom-http-headers')
19-
| custom-http-headers
15+
nuxt-link(to='/example/ajax/custom-http-headers') custom-http-headers
2016
p
21-
nuxt-link(to='/example/c-01/e-02/', no-prefetch)
22-
| custom-path /c-01/e-02/
17+
nuxt-link(to='/example/c-01/e-02/', no-prefetch) custom-path /c-01/e-02/
2318
p
24-
n-link(to='/example/d-03/f-04/')
25-
| custom-path /d-03/f-04/
19+
n-link(to='/example/d-03/f-04/') custom-path /d-03/f-04/
2620
p
27-
nuxt-link(to='/example/assets-and-static', no-prefetch)
28-
| assets and static
21+
nuxt-link(to='/example/assets-and-static', no-prefetch) assets and static
2922
p
30-
nuxt-link(to='/example/todos')
31-
| todos
23+
nuxt-link(to='/example/todos') todos
3224
p
33-
nuxt-link(to='/example/life-cycle', no-prefetch)
34-
| life-cycle
25+
nuxt-link(to='/example/life-cycle', no-prefetch) life-cycle
3526
p
36-
nuxt-link(to='/example/use-plugin')
37-
| use-plugin
27+
nuxt-link(to='/example/use-plugin') use-plugin
3828
p
39-
nuxt-link(to='/example/custom-head', no-prefetch)
40-
| custom-head
29+
nuxt-link(to='/example/custom-head', no-prefetch) custom-head
4130
p
42-
nuxt-link(to='/example/async-custom-head', no-prefetch)
43-
| async-custom-head
31+
nuxt-link(to='/example/async-custom-head', no-prefetch) async-custom-head
4432
p
45-
nuxt-link(to='/example/api')
46-
| api
33+
nuxt-link(to='/example/api') api
4734
p
48-
nuxt-link(to='/example/search/?hoge=foo&bar=fuga', no-prefetch)
49-
| search
35+
nuxt-link(to='/example/search/?hoge=foo&bar=fuga', no-prefetch) search
5036
p
51-
nuxt-link(to='/example/img-lazy-load')
52-
| img-lazy-load
37+
nuxt-link(to='/example/img-lazy-load') img-lazy-load
5338
p
54-
nuxt-link(to='/example/type-safe-vuex')
55-
| type-safe-vuex
39+
nuxt-link(to='/example/type-safe-vuex') type-safe-vuex
5640
p
57-
nuxt-link(to='/example/extend-css-class')
58-
| extend-css-class
41+
nuxt-link(to='/example/extend-css-class') extend-css-class
5942
p
60-
nuxt-link(to='/example/dynamic-import')
61-
| dynamic-import
43+
nuxt-link(to='/example/dynamic-import') dynamic-import
6244
p
63-
nuxt-link(to='/example/user-agent')
64-
| user-agent
45+
nuxt-link(to='/example/user-agent') user-agent
6546
p
66-
nuxt-link(to='/example/i18n')
67-
| i18n
47+
nuxt-link(to='/example/i18n') i18n
48+
p
49+
nuxt-link(to='/example/animejs') animejs
6850
</template>
6951

7052
<script lang="ts">

yarn.lock

+10
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,11 @@
20402040
react-dom "^16.8.1"
20412041
regenerator-runtime "^0.12.1"
20422042

2043+
"@types/animejs@^2.0.2":
2044+
version "2.0.2"
2045+
resolved "https://registry.yarnpkg.com/@types/animejs/-/animejs-2.0.2.tgz#80ec902fb0dc90778fbcdaf080c03c44ddda979f"
2046+
integrity sha512-ACymFQ5qgSrZNR1Fqjk7Wv9gH6dFgejn2gpLkkceWxTKzivRJsshX4xhBVALgvF79gUdXiMCRIdusN728XpeGA==
2047+
20432048
"@types/anymatch@*":
20442049
version "1.3.1"
20452050
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a"
@@ -2766,6 +2771,11 @@ amdefine@>=0.0.4:
27662771
version "1.0.1"
27672772
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
27682773

2774+
animejs@^3.0.1:
2775+
version "3.0.1"
2776+
resolved "https://registry.yarnpkg.com/animejs/-/animejs-3.0.1.tgz#8b808bad575e3b6106489d8b04b92bc4062166fe"
2777+
integrity sha512-7mMoBQScvA7s4zm3EVgnuXXrtOu6TJNAhU+Ajo7HsXYH0NwbuZIcRHMO65a9NyUlmAXz4VPxlK5cENNOQbCi8g==
2778+
27692779
ansi-align@^2.0.0:
27702780
version "2.0.0"
27712781
resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"

0 commit comments

Comments
 (0)