Skip to content

Commit 3ec1d53

Browse files
committed
Added first layout for frontend. LGTM :-)
1 parent c21235b commit 3ec1d53

Some content is hidden

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

46 files changed

+15227
-0
lines changed

Diff for: .gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@
1212

1313
# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
1414
.glide/
15+
16+
# Node/Javascript
17+
.DS_Store
18+
node_modules/
19+
dist/
20+
.idea
21+
npm-debug.log
22+
yarn-error.log
23+
selenium-debug.log
24+
test/unit/coverage
25+
test/e2e/reports

Diff for: frontend/.babelrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"presets": [
3+
["es2015", { "modules": false }],
4+
"stage-2"
5+
],
6+
"plugins": [
7+
"transform-export-extensions"
8+
]
9+
}

Diff for: frontend/.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

Diff for: frontend/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/build.js

Diff for: frontend/.eslintrc.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
root: true,
3+
parser: 'babel-eslint',
4+
parserOptions: {
5+
sourceType: 'module'
6+
},
7+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
8+
extends: 'standard',
9+
// required to lint *.vue files
10+
plugins: [
11+
'html'
12+
],
13+
// add your custom rules here
14+
'rules': {
15+
// allow paren-less arrow functions
16+
'arrow-parens': 0,
17+
// allow async-await
18+
'generator-star-spacing': 0,
19+
// allow debugger during development
20+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
21+
}
22+
}

Diff for: frontend/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Fangdun Cai <[email protected]> (fundon.me)
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
13+
all 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
21+
THE SOFTWARE.

Diff for: frontend/README.md

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<div align="center">
2+
<p><img width="200" src="https://github.com/vue-bulma/vue-admin/blob/master/client/assets/[email protected]"></p>
3+
4+
<h1>Vue Admin</h1>
5+
6+
<p>
7+
<strong>Vue Admin Panel Framework</strong>,
8+
<a href="https://admin.vuebulma.com">Live Demo</a>
9+
</p>
10+
11+
<p>
12+
<sub>Made with ❤︎ by
13+
<a href="https://twitter.com/_fundon">Fangdun Cai</a> and
14+
<a href="https://github.com/vue-bulma/vue-admin/graphs/contributors">contributors</a>
15+
</sub>
16+
</p>
17+
18+
<p>
19+
<a href="https://npmjs.org/package/vue-admin"><img src="https://img.shields.io/npm/v/vue-admin.svg" alt="NPM version"></a>
20+
<a href="https://www.npmjs.com/package/vue-admin"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="MIT License"></a>
21+
<a href="https://travis-ci.org/vue-bulma/vue-admin"><img src="https://img.shields.io/travis/vue-bulma/vue-admin.svg?label=linux" alt="Linux Build"></a>
22+
<a href="https://ci.appveyor.com/project/fundon/vue-admin"><img src="https://img.shields.io/appveyor/ci/fundon/vue-admin/master.svg?label=windows" alt="Window Build"/></a>
23+
<a href="https://gitter.im/fundon/vue-admin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/fundon/vue-admin.svg" alt="Gitter"></a>
24+
</p>
25+
26+
</div>
27+
28+
![](screenshots/preview.jpg)
29+
30+
31+
## Features
32+
33+
* Powered by [Vue][] **2.0** & [Bulma][] **0.3**
34+
* Responsive and Flexible Box Layout
35+
* [Variety of Charts](doc/charts.md)
36+
* [Rich Components](doc/components.md) or See [vue-bulma][]
37+
* Based on the awesome third-party [libraries](doc/dependencies.md)
38+
39+
40+
## [Backers](backers.md)
41+
42+
Its ongoing development is made possible thanks to the support by these awesome backers. If you'd like to join them, check out:
43+
44+
* [Patreon campaign](https://www.patreon.com/_fundon)
45+
46+
* [OpenCollective](https://opencollective.com/vue-admin#backer): Support us with a monthly donation and help us continue our activities
47+
48+
<a href="https://opencollective.com/vue-admin/backer/0/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/0/avatar.svg"></a>
49+
<a href="https://opencollective.com/vue-admin/backer/1/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/1/avatar.svg"></a>
50+
<a href="https://opencollective.com/vue-admin/backer/2/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/2/avatar.svg"></a>
51+
<a href="https://opencollective.com/vue-admin/backer/3/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/3/avatar.svg"></a>
52+
<a href="https://opencollective.com/vue-admin/backer/4/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/4/avatar.svg"></a>
53+
<a href="https://opencollective.com/vue-admin/backer/5/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/5/avatar.svg"></a>
54+
<a href="https://opencollective.com/vue-admin/backer/6/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/6/avatar.svg"></a>
55+
<a href="https://opencollective.com/vue-admin/backer/7/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/7/avatar.svg"></a>
56+
<a href="https://opencollective.com/vue-admin/backer/8/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/8/avatar.svg"></a>
57+
<a href="https://opencollective.com/vue-admin/backer/9/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/9/avatar.svg"></a>
58+
<a href="https://opencollective.com/vue-admin/backer/10/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/10/avatar.svg"></a>
59+
<a href="https://opencollective.com/vue-admin/backer/11/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/11/avatar.svg"></a>
60+
<a href="https://opencollective.com/vue-admin/backer/12/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/12/avatar.svg"></a>
61+
<a href="https://opencollective.com/vue-admin/backer/13/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/13/avatar.svg"></a>
62+
<a href="https://opencollective.com/vue-admin/backer/14/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/14/avatar.svg"></a>
63+
<a href="https://opencollective.com/vue-admin/backer/15/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/15/avatar.svg"></a>
64+
<a href="https://opencollective.com/vue-admin/backer/16/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/16/avatar.svg"></a>
65+
<a href="https://opencollective.com/vue-admin/backer/17/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/17/avatar.svg"></a>
66+
<a href="https://opencollective.com/vue-admin/backer/18/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/18/avatar.svg"></a>
67+
<a href="https://opencollective.com/vue-admin/backer/19/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/19/avatar.svg"></a>
68+
<a href="https://opencollective.com/vue-admin/backer/20/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/20/avatar.svg"></a>
69+
<a href="https://opencollective.com/vue-admin/backer/21/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/21/avatar.svg"></a>
70+
<a href="https://opencollective.com/vue-admin/backer/22/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/22/avatar.svg"></a>
71+
<a href="https://opencollective.com/vue-admin/backer/23/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/23/avatar.svg"></a>
72+
<a href="https://opencollective.com/vue-admin/backer/24/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/24/avatar.svg"></a>
73+
<a href="https://opencollective.com/vue-admin/backer/25/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/25/avatar.svg"></a>
74+
<a href="https://opencollective.com/vue-admin/backer/26/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/26/avatar.svg"></a>
75+
<a href="https://opencollective.com/vue-admin/backer/27/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/27/avatar.svg"></a>
76+
<a href="https://opencollective.com/vue-admin/backer/28/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/28/avatar.svg"></a>
77+
<a href="https://opencollective.com/vue-admin/backer/29/website" target="_blank"><img src="https://opencollective.com/vue-admin/backer/29/avatar.svg"></a>
78+
79+
## Sponsors
80+
81+
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/vue-admin#sponsor)]
82+
83+
<a href="https://opencollective.com/vue-admin/sponsor/0/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/0/avatar.svg"></a>
84+
<a href="https://opencollective.com/vue-admin/sponsor/1/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/1/avatar.svg"></a>
85+
<a href="https://opencollective.com/vue-admin/sponsor/2/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/2/avatar.svg"></a>
86+
<a href="https://opencollective.com/vue-admin/sponsor/3/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/3/avatar.svg"></a>
87+
<a href="https://opencollective.com/vue-admin/sponsor/4/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/4/avatar.svg"></a>
88+
<a href="https://opencollective.com/vue-admin/sponsor/5/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/5/avatar.svg"></a>
89+
<a href="https://opencollective.com/vue-admin/sponsor/6/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/6/avatar.svg"></a>
90+
<a href="https://opencollective.com/vue-admin/sponsor/7/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/7/avatar.svg"></a>
91+
<a href="https://opencollective.com/vue-admin/sponsor/8/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/8/avatar.svg"></a>
92+
<a href="https://opencollective.com/vue-admin/sponsor/9/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/9/avatar.svg"></a>
93+
<a href="https://opencollective.com/vue-admin/sponsor/10/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/10/avatar.svg"></a>
94+
<a href="https://opencollective.com/vue-admin/sponsor/11/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/11/avatar.svg"></a>
95+
<a href="https://opencollective.com/vue-admin/sponsor/12/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/12/avatar.svg"></a>
96+
<a href="https://opencollective.com/vue-admin/sponsor/13/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/13/avatar.svg"></a>
97+
<a href="https://opencollective.com/vue-admin/sponsor/14/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/14/avatar.svg"></a>
98+
<a href="https://opencollective.com/vue-admin/sponsor/15/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/15/avatar.svg"></a>
99+
<a href="https://opencollective.com/vue-admin/sponsor/16/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/16/avatar.svg"></a>
100+
<a href="https://opencollective.com/vue-admin/sponsor/17/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/17/avatar.svg"></a>
101+
<a href="https://opencollective.com/vue-admin/sponsor/18/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/18/avatar.svg"></a>
102+
<a href="https://opencollective.com/vue-admin/sponsor/19/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/19/avatar.svg"></a>
103+
<a href="https://opencollective.com/vue-admin/sponsor/20/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/20/avatar.svg"></a>
104+
<a href="https://opencollective.com/vue-admin/sponsor/21/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/21/avatar.svg"></a>
105+
<a href="https://opencollective.com/vue-admin/sponsor/22/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/22/avatar.svg"></a>
106+
<a href="https://opencollective.com/vue-admin/sponsor/23/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/23/avatar.svg"></a>
107+
<a href="https://opencollective.com/vue-admin/sponsor/24/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/24/avatar.svg"></a>
108+
<a href="https://opencollective.com/vue-admin/sponsor/25/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/25/avatar.svg"></a>
109+
<a href="https://opencollective.com/vue-admin/sponsor/26/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/26/avatar.svg"></a>
110+
<a href="https://opencollective.com/vue-admin/sponsor/27/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/27/avatar.svg"></a>
111+
<a href="https://opencollective.com/vue-admin/sponsor/28/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/28/avatar.svg"></a>
112+
<a href="https://opencollective.com/vue-admin/sponsor/29/website" target="_blank"><img src="https://opencollective.com/vue-admin/sponsor/29/avatar.svg"></a>
113+
114+
115+
## [Development](doc/development.md)
116+
117+
118+
### Requirements
119+
120+
* Node >= v5
121+
122+
* NPM >= v3
123+
124+
* Webpack v2
125+
126+
127+
## Notes
128+
129+
If you want to use Vue Admin with Vue 1.0 version, please checkout the [vue-v1](https://github.com/vue-bulma/vue-admin/tree/vue-v1) branch.
130+
131+
Launch Vue Admin as a desktop application! Please check [Run Project with Electron](https://github.com/vue-bulma/vue-admin/wiki/Guide#run-project-with-electron)
132+
133+
134+
## Maintainers
135+
+ [fundon](https://github.com/fundon) &nbsp;&middot;&nbsp; [fundon.me](https://fundon.me) &nbsp;&middot;&nbsp; [Twitter@fundon](https://twitter.com/_fundon)
136+
+ [luventa](https://github.com/luventa)
137+
138+
139+
[Live Demo]: https://admin.vuebulma.com/
140+
[Fangdun Cai]: https://twitter.com/_fundon
141+
[Vue]: http://vuejs.org
142+
[Bulma]: http://bulma.io
143+
[Vue-bulma]: https://github.com/vue-bulma
144+

Diff for: frontend/appveyor.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
environment:
2+
matrix:
3+
- nodejs_version: '4'
4+
- nodejs_version: '5'
5+
- nodejs_version: '6'
6+
7+
install:
8+
- ps: Install-Product node $env:nodejs_version
9+
- npm install npm@latest -g
10+
- npm install
11+
12+
test_script:
13+
- node --version
14+
- npm --version
15+
- npm run build
16+
17+
build: off
18+
19+
version: "{build}"

Diff for: frontend/build/build.js

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// https://github.com/shelljs/shelljs
2+
'use strict'
3+
4+
require('./check-versions')()
5+
require('shelljs/global')
6+
7+
env.NODE_ENV = 'production'
8+
9+
const ora = require('ora')
10+
const path = require('path')
11+
const chalk = require('chalk')
12+
const webpack = require('webpack')
13+
const config = require('../config')
14+
const webpackConfig = require('./webpack.prod.conf')
15+
16+
const spinner = ora('building for production...')
17+
spinner.start()
18+
19+
const assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
20+
rm('-rf', assetsPath)
21+
mkdir('-p', assetsPath)
22+
cp('-R', 'assets/*', assetsPath)
23+
24+
const compiler = webpack(webpackConfig)
25+
const ProgressPlugin = require('webpack/lib/ProgressPlugin')
26+
compiler.apply(new ProgressPlugin())
27+
28+
compiler.run((err, stats) => {
29+
spinner.stop()
30+
if (err) throw err
31+
process.stdout.write(stats.toString({
32+
colors: true,
33+
modules: false,
34+
children: false,
35+
chunks: false,
36+
chunkModules: false
37+
}) + '\n\n')
38+
39+
console.log(chalk.cyan(' Build complete.\n'))
40+
console.log(chalk.yellow(
41+
' Tip: built files are meant to be served over an HTTP server.\n' +
42+
' Opening index.html over file:// won\'t work.\n'
43+
))
44+
})

Diff for: frontend/build/check-versions.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
'use strict'
2+
3+
const chalk = require('chalk')
4+
const semver = require('semver')
5+
const packageConfig = require('../package.json')
6+
7+
const exec = (cmd) => {
8+
return require('child_process').execSync(cmd).toString().trim()
9+
}
10+
11+
const versionRequirements = [
12+
{
13+
name: 'node',
14+
currentVersion: semver.clean(process.version),
15+
versionRequirement: packageConfig.engines.node
16+
},
17+
{
18+
name: 'npm',
19+
currentVersion: exec('npm --version'),
20+
versionRequirement: packageConfig.engines.npm
21+
}
22+
]
23+
24+
module.exports = () => {
25+
const warnings = []
26+
for (let i = 0; i < versionRequirements.length; i++) {
27+
const mod = versionRequirements[i]
28+
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
29+
warnings.push(mod.name + ': ' +
30+
chalk.red(mod.currentVersion) + ' should be ' +
31+
chalk.green(mod.versionRequirement)
32+
)
33+
}
34+
}
35+
36+
if (warnings.length) {
37+
console.log('')
38+
console.log(chalk.yellow('To use this template, you must update following to modules:'))
39+
console.log()
40+
for (let i = 0; i < warnings.length; i++) {
41+
const warning = warnings[i]
42+
console.log(' ' + warning)
43+
}
44+
console.log()
45+
process.exit(1)
46+
}
47+
}

Diff for: frontend/build/dev-client.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use strict'
2+
3+
/* eslint-disable */
4+
require('eventsource-polyfill')
5+
const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true')
6+
7+
hotClient.subscribe(event => {
8+
if (event.action === 'reload') {
9+
window.location.reload()
10+
}
11+
})

0 commit comments

Comments
 (0)