Skip to content

Commit 0426ef9

Browse files
Boiler-plate with vu-cli and vue-cli-plugin-component
1 parent 319b6dc commit 0426ef9

19 files changed

+15395
-1
lines changed

.browserslistrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
extends: ["plugin:vue/essential", "@vue/prettier"],
7+
rules: {
8+
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
10+
},
11+
parserOptions: {
12+
parser: "babel-eslint"
13+
}
14+
};

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
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

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

README.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
vue-plotly.js
1+
2+
# vue-ploty.js
3+
[![GitHub open issues](https://img.shields.io/github/issues/David/vue-ploty.js.svg?maxAge=2592000)](https://github.com/David/vue-ploty.js/issues)
4+
[![Npm version](https://img.shields.io/npm/v/vue-ploty.js.svg?maxAge=2592000)](https://www.npmjs.com/package/vue-ploty.js)
5+
[![MIT License](https://img.shields.io/github/license/David/vue-ploty.js.svg)](https://github.com/David/vue-ploty.js/blob/master/LICENSE)
6+
7+
## Usage
8+
```HTML
9+
<Ploty :text="hello"></Ploty>
10+
```
11+
```javascript
12+
import { Ploty } from 'vue-ploty.js'
13+
14+
export default {
15+
components: {
16+
Ploty
17+
}
18+
}
19+
```
20+
## API
21+
22+
## Installation
23+
```
24+
npm install vue-ploty.js
25+
```
26+
27+
## Project setup
28+
```
29+
npm install
30+
```
31+
32+
### Compiles and hot-reloads for development
33+
```
34+
npm run serve
35+
```
36+
37+
### Compiles and minifies for production
38+
```
39+
npm run build
40+
```
41+
42+
### Run your tests
43+
```
44+
npm run test
45+
```
46+
47+
### Lints and fixes files
48+
```
49+
npm run lint
50+
```
51+
52+
### Run your unit tests
53+
```
54+
npm run test:unit
55+
```
56+
57+
### Customize configuration
58+
See [Configuration Reference](https://cli.vuejs.org/config/).
59+
60+
### Update the API section of README.md with generated documentation
61+
```
62+
npm run doc:build
63+
```

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ["@vue/app"]
3+
};

example/App.vue

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<div id="app">
3+
<img alt="Vue logo" src="./assets/logo.png">
4+
<Ploty msg="Welcome to Your Vue.js App"/>
5+
</div>
6+
</template>
7+
8+
<script>
9+
import Ploty from '@/components/Ploty.vue'
10+
11+
export default {
12+
name: 'app',
13+
components: {
14+
Ploty
15+
}
16+
}
17+
</script>
18+
19+
<style lang="less">
20+
#app {
21+
font-family: 'Avenir', Helvetica, Arial, sans-serif;
22+
-webkit-font-smoothing: antialiased;
23+
-moz-osx-font-smoothing: grayscale;
24+
text-align: center;
25+
color: #2c3e50;
26+
margin-top: 60px;
27+
}
28+
</style>

example/assets/logo.png

6.69 KB
Loading

example/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from "vue";
2+
import App from "./App.vue";
3+
4+
Vue.config.productionTip = false;
5+
6+
new Vue({
7+
render: h => h(App)
8+
}).$mount("#app");

jest.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
moduleFileExtensions: ["js", "jsx", "json", "vue"],
3+
transform: {
4+
"^.+\\.vue$": "vue-jest",
5+
".+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$":
6+
"jest-transform-stub",
7+
"^.+\\.jsx?$": "babel-jest"
8+
},
9+
transformIgnorePatterns: ["/node_modules/"],
10+
moduleNameMapper: {
11+
"^@/(.*)$": "<rootDir>/src/$1"
12+
},
13+
snapshotSerializers: ["jest-serializer-vue"],
14+
testMatch: [
15+
"**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)"
16+
],
17+
testURL: "http://localhost/"
18+
};

0 commit comments

Comments
 (0)