Skip to content

Commit f1d7c9e

Browse files
authored
Merge pull request #87 from mrholek/dev-v2
v2.0.0-alpha.1
2 parents 7dcd6bf + d4d2de4 commit f1d7c9e

File tree

152 files changed

+4684
-21435
lines changed

Some content is hidden

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

152 files changed

+4684
-21435
lines changed

.babelrc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"presets": [
3-
["env", { "modules": false }],
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7+
}
8+
}],
49
"stage-2"
510
],
6-
"plugins": ["transform-runtime"],
7-
"comments": false,
11+
"plugins": ["transform-vue-jsx", "transform-runtime"],
812
"env": {
913
"test": {
1014
"presets": ["env", "stage-2"],
11-
"plugins": [ "istanbul" ]
15+
"plugins": ["transform-vue-jsx", "istanbul"]
1216
}
1317
}
1418
}

.eslintignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
build/*.js
2-
config/*.js
1+
/build/
2+
/config/
3+
/dist/
4+
/*.js
5+
/test/unit/coverage/
6+
/test/e2e/specs/

.eslintrc.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@
22

33
module.exports = {
44
root: true,
5-
parser: 'babel-eslint',
65
parserOptions: {
7-
sourceType: 'module'
6+
parser: 'babel-eslint'
87
},
98
env: {
109
browser: true,
1110
},
12-
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13-
extends: 'standard',
11+
extends: [
12+
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
13+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
14+
'plugin:vue/essential',
15+
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
16+
'standard'
17+
],
1418
// required to lint *.vue files
1519
plugins: [
16-
'html'
20+
'vue'
1721
],
1822
// add your custom rules here
19-
'rules': {
20-
// allow paren-less arrow functions
21-
'arrow-parens': 0,
23+
rules: {
2224
// allow async-await
23-
'generator-star-spacing': 0,
25+
'generator-star-spacing': 'off',
2426
// allow debugger during development
25-
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
27+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
2628
}
2729
}

.gitignore

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
.DS_Store
22
node_modules/
3-
dist/
3+
/dist/
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7-
test/unit/coverage
8-
test/e2e/reports
7+
/test/unit/coverage/
8+
/test/e2e/reports/
99
selenium-debug.log
10+
package-lock.json
11+
12+
# Editor directories and files
13+
.idea
14+
.vscode
15+
*.suo
16+
*.ntvs*
17+
*.njsproj
18+
*.sln

.postcssrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
module.exports = {
44
"plugins": {
5-
// to edit target browsers: use "browserlist" field in package.json
5+
"postcss-import": {},
6+
"postcss-url": {},
7+
// to edit target browsers: use "browserslist" field in package.json
68
"autoprefixer": {}
79
}
810
}

CHANGELOG.md

Lines changed: 39 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,42 @@
11
## [vue](./README.md) version `changelog`
22

3-
##### `v1.0.10`
4-
- fix: `className` -> `class`
5-
- refactor: `<b-input-group-prepend>`
6-
- refactor: `<b-input-group-append>`
7-
- refactor: `<b-input-group-text>`
8-
- refactor: remove `<b-input-group-button>`
9-
- test: initial `Dashboard` unit test added
10-
- update: bootstrap-vue to `2.0.0-rc.1`
3+
##### `v2.0.0-alpha.1`
4+
- refactor: separation of concerns - (CoreUI template/components) for use CoreUI as npm module
5+
- refactor: project structure change
6+
- refactor: moved to [vuejs-templates](http://vuejs-templates.github.io/webpack/)
7+
- chore: moved to [Semantic Versioning](https://semver.org/)
8+
- refactor: move to [CoreUI-Vue](https://github.com/coreui/coreui-vue) components `v2`
9+
- refactor: rename containers
10+
- refactor(Colors): view layout, sub-components
11+
- refactor(Switches): move to `Switch component v2`
12+
- refactor(Cards): add `transition` to card-header-action `btn-close`
13+
- refactor(Cards): add `collapse` to card-header-action `btn-minimize`
14+
- refactor(Forms): add `transition` to card-header-action `btn-close`
15+
- refactor(Forms): add `autocomplete` attrib
16+
- refactor(Forms): add missing `form` tags
17+
- refactor(Buttons): view rearrange
18+
- refactor(Jumbotrons): view rearrange
19+
- feat(Icons): add `CoreUI Icons` set
20+
- feat(Tabs): add missing feat `tabs`
21+
- feat(Charts): add `CustomTooltips`, fix tooltip `chartId` issue
22+
- refactor: move `scss` to `assets`
23+
- refactor: IE polyfills
1124
- chore: dependencies update
12-
13-
###### `v1.0.9`
14-
- refactor: Sidebar structure
15-
- test: initial e2e test added
16-
- chore: dependencies update
17-
18-
###### `v1.0.8`
19-
- update: vue to `2.5.13`
20-
- update: Bootstrap to `4.0.0-beta.3`
21-
- update: bootstrap-vue to `1.4.0`
22-
- chore: dependencies update
23-
- refactor: `<b-table>` use the prop `responsive="sm"` instead of `class="table-responsive-sm"`
24-
- fix: `Vue warn:` Do not use built-in or reserved HTML elements as component id: (header, aside, footer, table)
25-
- feature: some Bootstrap4 components added
26-
- temp tweaks(b4 beta3): `InputGroupAddon` and `InputGroupButton`
27-
- refactor(checkboxes, radios, labels): temp tweaks
28-
- feat: mobile sidebar link click closes the sidebar [#18](https://github.com/mrholek/CoreUI-Vue/pull/18)
29-
30-
###### `v1.0.6`
31-
- refactor: raw html to `b-row`, `b-col`, `b-card`, `b-button` components
32-
- fix: Cards.vue: change `variant="accent-` to `class="card-accent-`
33-
- refactor: Modal's ok-button variants
34-
- refactor: forms with validation feedback
35-
- update: bootstrap-vue to `1.1.0`
36-
- update: to vue: `2.5.6`
37-
38-
###### `v1.0.5`
39-
- update: bootstrap-vue to `1.0.x`
40-
- fix: use `<b-form-radio-group>` instead of `<b-form-radio>` **[breaking change](https://bootstrap-vue.js.org/docs/components/form-radios)** :fire:
41-
- refactor: `<b-table>` bootstrap-vue component in `Tables` #24
42-
- refactor: extract `Table` component from `Tables`
43-
- refactor: `<b-table>` bootstrap-vue component in `Switches` #24
44-
- fix: add `table-responsive-sm` class to `Tables` #26
45-
- refactor: use component `<b-navbar-nav>` instead of deprecated prop `is-nav-bar`
46-
- fix: `b-progress` `height` property workaround (bootstrap-vue)
47-
- chore: dependencies update
48-
49-
###### `v1.0.4`
50-
- refactor: import Bootstrap 4 SCSS files from node_modules
51-
- fix: callouts styles
52-
53-
###### `v1.0.3`
54-
- update: Bootstrap version to `4.0.0-beta.2`
55-
- update: vue-chartjs to `3.0.0` **[breaking change](https://github.com/apertureless/vue-chartjs/releases/tag/v3.0.0)** :fire:
56-
57-
###### `v1.0.2`
58-
- update: to vue: `^2.5.x`
59-
- update: bootstrap-vue to `1.0.0-beta.9`
60-
- refactor: (vue `v2.5.x`) deprecated `<template scope="props">` replace with `<div slot-scope="props">`
61-
- refactor: `HeaderDropdown` component added to `Header`
62-
- refactor: `b-badge` component added (bootstrap-vue)
63-
- chore: `package.json` project dependencies update
64-
25+
- chore: cleanups
26+
27+
other:
28+
29+
- feat: app-footer fixed
30+
- refactor(dashboard): brand-card, progress-group-bars
31+
- refactor(social-box-chart-example): props
32+
- feat(forms): new `<b-form-input type="date">` example added
33+
- refactor(cards): Card outline, Card accent - title variants added
34+
- feat: card-header-actions
35+
- feat(_nav): Navbars example added
36+
- update: vuejs-templates/webpack to v1.3.1
37+
- fix: eslint `valid template root`
38+
- refactor: card header title spacing
39+
- refactor: btn-brand
40+
- test(e2e): update
41+
- refactor: sidebar
42+
- refactor: chart examples

README.md

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,74 @@ Within the download you'll find the following directories and files:
3232

3333
```
3434
CoreUI-Vue/
35-
├── Vue_Full_Project/
36-
├── Vue_Starter/
37-
35+
├── build/ # webpack config files
36+
├── config/ # main project config
37+
├── scss/ # styles
38+
├── src/ # project root
39+
│ ├── assets/ # module assets (processed by webpack)
40+
│ ├── components/ # ui components
41+
│ ├── containers/ # ui containers
42+
│ ├── router/ # routing
43+
│ ├── shared/ # utils
44+
│ ├── views/ # ui views
45+
│ ├── App.vue # main app component
46+
│ └── main.js # app entry file
47+
├── _nav.js # sidebar nav config
48+
├── static/ # pure static assets (directly copied)
49+
├── test/
50+
│ └── unit/ # unit tests
51+
│ └── e2e/ # e2e tests
52+
├── .babelrc.js # babel config
53+
├── .editorconfig # settings for your editor
54+
├── .eslintignore # eslint ignore rules
55+
├── .eslintrc.js # eslint config
56+
├── .gitignore # defaults for gitignore
57+
├── .postcssrc.js # postcss config
58+
├── CHANGELOG.md
59+
├── index.html # index.html template
60+
├── LICENSE
61+
├── README.md
62+
└── package.json # build scripts and dependencies
3863
```
3964

4065
## Other Versions
4166

4267
CoreUI includes 6 Version for Angular 4, AngularJS, React.js, Vue.js, Static HTML5 and AJAX HTML5.
4368

44-
* [Angular Version (Angular 2+)](https://github.com/mrholek/CoreUI-Angular).
45-
* [AngularJS Version](https://github.com/mrholek/CoreUI-AngularJS).
46-
* [HTML5 AJAX Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template).
47-
* [HTML5 Static Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template).
48-
* [React.js Version](https://github.com/mrholek/CoreUI-React).
49-
* [Vue.js Version](https://github.com/mrholek/CoreUI-Vue).
69+
* [Angular Version (Angular 2+)](https://github.com/mrholek/CoreUI-Angular)
70+
* [AngularJS Version](https://github.com/mrholek/CoreUI-AngularJS)
71+
* [HTML5 AJAX Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template)
72+
* [HTML5 Static Version](https://github.com/mrholek/CoreUI-Free-Bootstrap-Admin-Template)
73+
* [React.js Version](https://github.com/mrholek/CoreUI-React)
74+
* [Vue.js Version](https://github.com/mrholek/CoreUI-Vue)
75+
* [ASP.NET Core 2 MVC Version](https://github.com/mrholek/CoreUI-NET)
76+
77+
## Build Setup
78+
79+
``` bash
80+
# install dependencies
81+
npm install
82+
83+
# serve with hot reload at localhost:8080
84+
npm run dev
85+
86+
# build for production with minification
87+
npm run build
88+
89+
# build for production and view the bundle analyzer report
90+
npm run build --report
91+
92+
# run unit tests
93+
npm run unit
94+
95+
# run e2e tests
96+
npm run e2e
97+
98+
# run all tests
99+
npm test
100+
```
101+
102+
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
50103

51104
## Bugs and feature requests
52105

build/build.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
1+
'use strict'
12
require('./check-versions')()
23

34
process.env.NODE_ENV = 'production'
45

5-
var ora = require('ora')
6-
var rm = require('rimraf')
7-
var path = require('path')
8-
var chalk = require('chalk')
9-
var webpack = require('webpack')
10-
var config = require('../config')
11-
var webpackConfig = require('./webpack.prod.conf')
6+
const ora = require('ora')
7+
const rm = require('rimraf')
8+
const path = require('path')
9+
const chalk = require('chalk')
10+
const webpack = require('webpack')
11+
const config = require('../config')
12+
const webpackConfig = require('./webpack.prod.conf')
1213

13-
var spinner = ora('building for production...')
14+
const spinner = ora('building for production...')
1415
spinner.start()
1516

1617
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
1718
if (err) throw err
18-
webpack(webpackConfig, function (err, stats) {
19+
webpack(webpackConfig, (err, stats) => {
1920
spinner.stop()
2021
if (err) throw err
2122
process.stdout.write(stats.toString({
2223
colors: true,
2324
modules: false,
24-
children: false,
25+
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
2526
chunks: false,
2627
chunkModules: false
2728
}) + '\n\n')
2829

30+
if (stats.hasErrors()) {
31+
console.log(chalk.red(' Build failed with errors.\n'))
32+
process.exit(1)
33+
}
34+
2935
console.log(chalk.cyan(' Build complete.\n'))
3036
console.log(chalk.yellow(
3137
' Tip: built files are meant to be served over an HTTP server.\n' +

build/check-versions.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
var chalk = require('chalk')
2-
var semver = require('semver')
3-
var packageConfig = require('../package.json')
4-
var shell = require('shelljs')
1+
'use strict'
2+
const chalk = require('chalk')
3+
const semver = require('semver')
4+
const packageConfig = require('../package.json')
5+
const shell = require('shelljs')
6+
57
function exec (cmd) {
68
return require('child_process').execSync(cmd).toString().trim()
79
}
810

9-
var versionRequirements = [
11+
const versionRequirements = [
1012
{
1113
name: 'node',
1214
currentVersion: semver.clean(process.version),
1315
versionRequirement: packageConfig.engines.node
14-
},
16+
}
1517
]
1618

1719
if (shell.which('npm')) {
@@ -23,9 +25,11 @@ if (shell.which('npm')) {
2325
}
2426

2527
module.exports = function () {
26-
var warnings = []
27-
for (var i = 0; i < versionRequirements.length; i++) {
28-
var mod = versionRequirements[i]
28+
const warnings = []
29+
30+
for (let i = 0; i < versionRequirements.length; i++) {
31+
const mod = versionRequirements[i]
32+
2933
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
3034
warnings.push(mod.name + ': ' +
3135
chalk.red(mod.currentVersion) + ' should be ' +
@@ -38,10 +42,12 @@ module.exports = function () {
3842
console.log('')
3943
console.log(chalk.yellow('To use this template, you must update following to modules:'))
4044
console.log()
41-
for (var i = 0; i < warnings.length; i++) {
42-
var warning = warnings[i]
45+
46+
for (let i = 0; i < warnings.length; i++) {
47+
const warning = warnings[i]
4348
console.log(' ' + warning)
4449
}
50+
4551
console.log()
4652
process.exit(1)
4753
}

0 commit comments

Comments
 (0)