Skip to content

Commit d1a903e

Browse files
authored
Merge pull request #1 from DCzajkowski/vue-cli-build-changes
Vue cli build changes
2 parents 0d6614f + 6358c38 commit d1a903e

File tree

5 files changed

+52
-34
lines changed

5 files changed

+52
-34
lines changed

dist/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,27 @@
22
"name": "vue-pure-lightbox",
33
"version": "2.1.9",
44
"description": "Very lightweight, JavaScript-only, lightbox plugin for Vue.js",
5-
"main": "dist/vue-pure-lightbox.common.js",
5+
"main": "dist/VuePureLightbox.common.js",
66
"scripts": {
77
"prepare": "npm run build",
88
"serve": "vue-cli-service serve",
99
"build": "vue-cli-service build --target lib --name VuePureLightbox src/Components/Lightbox.vue"
1010
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/DCzajkowski/vue-pure-lightbox.git"
14+
},
15+
"keywords": [
16+
"vue",
17+
"vue.js",
18+
"lightbox"
19+
],
20+
"author": "Dariusz Czajkowski",
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/DCzajkowski/vue-pure-lightbox/issues"
24+
},
25+
"homepage": "https://github.com/DCzajkowski/vue-pure-lightbox#readme",
1126
"files": [
1227
"dist/*",
1328
"src/*",

src/App.vue

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
11
<template>
2-
<Lightbox
2+
<Lightbox
33
class="lb-demo"
44
:thumbnail="thumbnail"
55
:images="images"
6-
>
6+
>
77
<LightboxDefaultLoader slot="loader" />
88
<div slot="content" slot-scope="{ url }">
9-
<iframe
10-
v-if="url.includes('youtube') || url.includes('youtu.be')"
11-
:src="url"
12-
frameborder="0"
13-
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14-
allowfullscreen
15-
style="width: 100%; height: 90vh;"
16-
/>
17-
<img v-else :src="url">
9+
<iframe
10+
v-if="url.includes('youtube') || url.includes('youtu.be')"
11+
:src="url"
12+
frameborder="0"
13+
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
14+
allowfullscreen
15+
style="width: 100%; height: 90vh;"
16+
/>
17+
<img v-else :src="url">
1818
</div>
19-
</Lightbox>
19+
</Lightbox>
2020
</template>
2121

2222
<script>
23-
import Lightbox, { LightboxDefaultLoader } from './Components/Lightbox.vue'
23+
import Lightbox, { LightboxDefaultLoader } from './Components/Lightbox.vue'
2424
25-
export default {
26-
components: { Lightbox, LightboxDefaultLoader, },
25+
export default {
26+
components: {
27+
Lightbox,
28+
LightboxDefaultLoader,
29+
},
2730
data() {
28-
return {
29-
thumbnail: "http://placekitten.com/g/100/100",
30-
images: [
31-
"http://placekitten.com/g/200/300",
32-
"http://placekitten.com/g/600/400",
33-
"https://bit.ly/2r8tNLH",
34-
"https://www.youtube.com/watch?v=Z4j5rJQMdOU",
35-
]
36-
}
31+
return {
32+
thumbnail: "http://placekitten.com/g/100/100",
33+
images: [
34+
"http://placekitten.com/g/200/300",
35+
"http://placekitten.com/g/600/400",
36+
"https://bit.ly/2r8tNLH",
37+
"https://www.youtube.com/watch?v=Z4j5rJQMdOU",
38+
]
39+
}
3740
}
38-
}
41+
}
3942
</script>
4043

41-
<style>
42-
.lb-demo {
44+
<style scoped>
45+
.lb-demo {
4346
height: 100px;
4447
width: 100px;
45-
}
46-
</style>
48+
}
49+
</style>

src/Components/Lightbox.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
<script>
4848
import Vue from 'vue'
49-
5049
import LightboxDefaultLoader from './LightboxDefaultLoader.vue'
5150
export { LightboxDefaultLoader }
5251
@@ -67,7 +66,9 @@
6766
default: false,
6867
},
6968
},
70-
components: { LightboxDefaultLoader, },
69+
components: {
70+
LightboxDefaultLoader,
71+
},
7172
data() {
7273
return {
7374
visible: this.value,

src/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import Vue from 'vue'
22
import App from './App.vue'
33

4-
54
new Vue({
65
el: '#app',
76
render: (h) => h(App),
8-
})
7+
})

0 commit comments

Comments
 (0)