Skip to content

Commit b52069a

Browse files
committed
first commit
0 parents  commit b52069a

File tree

1,044 files changed

+214591
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,044 files changed

+214591
-0
lines changed

.gitignore

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

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Marvin Klimm
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# vue-undraw
2+
Vue Illustration Components from https://undraw.co/
3+
For any requests open an issue on https://github.com/netzfluencer/vue-undraw/issues
4+
5+
## Installation
6+
`npm install vue-undraw`
7+
8+
## Setup
9+
You can use the vue-undraw in multiple approaches. Keep in mind that the total size of all illustrations goes beyond 20mb. A global usage in vue projects is technical possible, but not generaly not recommended.
10+
11+
### 1. Register a component by referencing to the specific Source
12+
This is the most simplest approach to keep depended projects as small as possible, by importing only the illustrations which are needed.
13+
```
14+
import UndrawAddColor from 'vue-undraw/src/components/UndrawAddColor'
15+
16+
export default {
17+
components: {
18+
UndrawAddColor
19+
}
20+
}
21+
```
22+
23+
### 2. Register a component-module from '@netzfluencer/vue-undraw'
24+
Similar to first approach. Benefits compared to first:
25+
1. shorter and clearer imports
26+
2. consistent illustrationnames
27+
28+
Feel free to take this approach if treeshaking is no problem. https://webpack.js.org/guides/tree-shaking/
29+
```
30+
import { UndrawAbstract, UndrawAddColor } from '@netzfluencer/vue-undraw'
31+
32+
export default {
33+
components: {
34+
UndrawAbstract
35+
UndrawAddColor
36+
}
37+
}
38+
```
39+
40+
### 3. Global installation
41+
If project size does not need to be considered as much (e.g. in a design systems documentation env.) it is also possible to use the illustrations globally.
42+
43+
Just add this in your entrypoints js-file:
44+
```
45+
import * as VueUndraw from 'vue-undraw'
46+
47+
Vue.use(VueUndraw)
48+
```
49+
50+
## Color Setup
51+
By default the svgs colors are inherting the svgs/parents text-color. You can overwrite this colors by using the `vue-undraw` css-class or by setting it up in the installations options. (If you don't want to install the components globally you need to add the `noGlobalInstall: true` key too)
52+
```
53+
import * as VueUndraw from 'vue-undraw'
54+
55+
Vue.use(VueUndraw, {color: '#777777', noGlobalInstall: true})
56+
```
57+
58+
-----------
59+
60+
## Project Development
61+
```
62+
npm install
63+
```
64+
65+
### Renaming svgs
66+
Rename saved svgs from undraw.co in the _illustrations dir. Some manual adjustments need to get done (e.g. removing a handfull of '-').
67+
```
68+
npm run rename
69+
```
70+
71+
### Component Creation
72+
Create vue components from svgs. Some manual adjustments need to get done (e.g. syntax errors in components/index.js)
73+
```
74+
npm run create
75+
```
76+
77+
### Compiles and minifies for production
78+
```
79+
npm run build
80+
```

babel.config.js

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

dist/demo.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<meta charset="utf-8">
2+
<title>vue-undraw demo</title>
3+
<script src="./vue-undraw.umd.js"></script>
4+
5+
<link rel="stylesheet" href="./vue-undraw.css">
6+
7+
8+
<script>
9+
console.log(vue-undraw)
10+
</script>

0 commit comments

Comments
 (0)