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

Commit 94e465f

Browse files
committed
try it out
1 parent b01a68e commit 94e465f

18 files changed

+10921
-0
lines changed

Diff for: .babelrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": ["es2015", "stage-0", "stage-2"],
3+
"comments": false,
4+
"env": {
5+
"production": {
6+
"plugins": [
7+
["transform-runtime", { "polyfill": false, "regenerator": false }]
8+
]
9+
}
10+
}
11+
}

Diff for: .eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/**
2+
lib/**

Diff for: .eslintrc.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
sourceType: 'module',
5+
ecmaFeatures: {
6+
experimentalObjectRestSpread: true
7+
}
8+
},
9+
env: {
10+
browser: true,
11+
node: true
12+
},
13+
extends: 'standard',
14+
plugins: [
15+
'html'
16+
],
17+
'rules': {
18+
// allow paren-less arrow functions
19+
'arrow-parens': 0,
20+
// allow async-await
21+
'generator-star-spacing': 0,
22+
// allow debugger during development
23+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
24+
}
25+
}

Diff for: .gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.log
2+
.cache
3+
.DS_Store
4+
.idea
5+
.xml
6+
build
7+
dist
8+
node_modules
9+
.gitkeep
10+
converage

Diff for: Makefile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.PHONY: dist test
2+
3+
dev:
4+
@npm run dev
5+
6+
dist:
7+
@npm run dist
8+
9+
deploy:
10+
@npm run deploy
11+
12+
test:
13+
@npm test

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# GSR Skillbar

Diff for: cooking.build.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
var cooking = require('cooking')
2+
3+
cooking.set({
4+
entry: './src/index.js',
5+
dist: './lib',
6+
clean: false,
7+
format: 'cjs',
8+
extends: ['vue2'],
9+
minimize: true,
10+
postcss: [
11+
require('postcss-salad')({
12+
browsers: ['ie > 8', 'last 2 versions'],
13+
features: {
14+
bem: {
15+
shortcuts: { component: 'c', modifier: 'm', descendent: 'd' },
16+
separators: { modifier: '--', descendent: '__' }
17+
}
18+
}
19+
})
20+
],
21+
externals: {
22+
vue: 'vue'
23+
},
24+
extractCSS: 'gsr-skillbar.css'
25+
})
26+
27+
cooking.add('output.filename', 'gsr-skillbar.js')
28+
29+
module.exports = cooking.resolve()

Diff for: cooking.conf.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
var cooking = require('cooking')
2+
3+
cooking.set({
4+
entry: {
5+
app: ['./example/main.js']
6+
},
7+
dist: './dist',
8+
template: './example/index.tpl',
9+
10+
devServer: {
11+
port: 8095,
12+
publicPath: '/',
13+
log: false
14+
},
15+
16+
postcss: [
17+
require('postcss-salad')()
18+
],
19+
20+
// production
21+
clean: true,
22+
hash: true,
23+
sourceMap: true,
24+
minimize: true,
25+
chunk: true,
26+
publicPath: '/lib/',
27+
assetsPath: 'static',
28+
urlLoaderLimit: 10000,
29+
extractCSS: '[name].[contenthash:7].css',
30+
extends: ['vue2', 'lint']
31+
})
32+
33+
module.exports = cooking.resolve()

Diff for: example/app.vue

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<template>
2+
<div class="example-container">
3+
<div class="example-item">
4+
<label>XG~GD</label>
5+
<gsr-skillbar :items="itemsA" />
6+
</div>
7+
<div class="example-item">
8+
<label>V</label>
9+
<gsr-skillbar :items="itemsB" />
10+
</div>
11+
</div>
12+
</template>
13+
14+
<script>
15+
export default {
16+
data () {
17+
return {
18+
itemsA: [
19+
['#FFFFFF', '#FFFFFF'],
20+
['#FFFF99', '#FFFF99'],
21+
['#FFFF99', '#FFFFFF'],
22+
['#FFFF00', '#FFFF00'],
23+
['#FFFF00', '#FFFFFF'],
24+
['#33FF00', '#33FF00'],
25+
['#33FF00', '#FFFFFF'],
26+
['#3366FF', '#3366FF'],
27+
['#3366FF', '#FFFFFF'],
28+
['#FF00FF', '#FF00FF'],
29+
['#FF00FF', '#FFFFFF'],
30+
['#FF0000', '#FF0000'],
31+
['#FF0000', '#FFFFFF'],
32+
['#DD8844', '#DD8844'],
33+
['silver', 'silver'],
34+
['#FFD700', '#FFD700']
35+
],
36+
itemsB: [
37+
['#808080', '#808080'],
38+
['#FF8080', '#FF8080'],
39+
['#FF00FF', '#FF00FF'],
40+
['#80C0FF', '#80C0FF'],
41+
['#00FFFF', '#00FFFF'],
42+
['#00FF00', '#00FF00'],
43+
['#FFFF00', '#FFFF00'],
44+
['#FFC000', '#FFC000'],
45+
['#FF0000', '#FF0000'],
46+
['#C0C0C0', '#C0C0C0'],
47+
['#FF8000', '#FF8000']
48+
]
49+
}
50+
}
51+
}
52+
</script>
53+
54+
<style>
55+
@reset-global pc;
56+
57+
html, body {
58+
size: 100%;
59+
display: flex;
60+
align-items: center;
61+
}
62+
63+
@component-namespace example {
64+
@c container {
65+
size: 100% 120px;
66+
flex-direction: column;
67+
align-items: center;
68+
justify-content: center;
69+
}
70+
71+
@c item {
72+
size: 50% 64px;
73+
margin: auto;
74+
display: flex;
75+
align-items: center;
76+
77+
& label {
78+
width: 5rem;
79+
display: block;
80+
}
81+
}
82+
}
83+
</style>

Diff for: example/index.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
6+
<title>gsr skillbar</title>
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<!-- built files will be auto injected -->
11+
</body>
12+
</html>

Diff for: example/main.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Vue from 'vue'
2+
import App from './app.vue'
3+
import GSRSkillbar from '../src'
4+
5+
Vue.use(GSRSkillbar)
6+
7+
new Vue({ // eslint-disable-line
8+
el: '#app',
9+
render: h => h(App)
10+
})

Diff for: lib/gsr-skillbar.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/gsr-skillbar.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)