Skip to content

Commit fc7631e

Browse files
authored
switch to Vue.js
1 parent deb80e4 commit fc7631e

File tree

133 files changed

+12451
-79701
lines changed

Some content is hidden

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

133 files changed

+12451
-79701
lines changed

.babelrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
plugins: ['@babel/plugin-syntax-dynamic-import'],
3+
presets: [
4+
[
5+
'@babel/preset-env',
6+
{
7+
targets: {
8+
browsers: ['last 2 versions', 'ie >= 11']
9+
}
10+
}
11+
]
12+
]
13+
}
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# editorconfig.org
21
root = true
32

43
[*]
5-
indent_style = space
6-
indent_size = 2
7-
end_of_line = lf
84
charset = utf-8
9-
trim_trailing_whitespace = true
5+
indent_style = tab
6+
indent_size = 4
7+
end_of_line = lf
108
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint',
5+
ecmaVersion: 6,
6+
},
7+
settings: {
8+
'import/resolver': {
9+
webpack: {
10+
config: 'webpack.common.js',
11+
},
12+
node: {
13+
paths: ['src'],
14+
extensions: ['.js', '.vue'],
15+
},
16+
},
17+
},
18+
extends: [
19+
'eslint:recommended',
20+
'plugin:import/recommended',
21+
'plugin:vue/recommended',
22+
'standard',
23+
],
24+
globals: {
25+
$: 'readonly',
26+
t: 'readonly',
27+
n: 'readonly',
28+
OC: 'readonly',
29+
OCA: 'readonly',
30+
},
31+
plugins: [
32+
'vue',
33+
],
34+
rules: {
35+
// allow space before function () (was "always" in "standard")
36+
'space-before-function-paren': ['error', 'never'],
37+
// stay consistent with array brackets (not in "standard")
38+
'array-bracket-newline': ['error', 'consistent'],
39+
40+
// tabs only (was spaces in "standard")
41+
'indent': ['error', 'tab'],
42+
// allow tabs for indentation (was forbidden in "standard")
43+
'no-tabs': ['error', { allowIndentationTabs: true }],
44+
// indentation in vue's html should be tabs (was spaces in "vue/strongly-recommended")
45+
'vue/html-indent': ['error', 'tab'],
46+
47+
// only debug console (not in "standard")
48+
'no-console': ['error', { allow: ['error', 'warn', 'info', 'debug'] }],
49+
// always add a trailing comma, for diff readability (was "never" in "standard")
50+
'comma-dangle': ['warn', 'always-multiline'],
51+
// always have the operator in front (was "after" in "standard")
52+
'operator-linebreak': ['error', 'before'],
53+
// ternary on multiline (not in "standard")
54+
'multiline-ternary': ['error', 'always-multiline'],
55+
56+
// disallow use of "var" (not in "standard")
57+
'no-var': 'error',
58+
// Suggest using const
59+
'prefer-const': 'warn',
60+
61+
// check case of component names (not in "vue/recommended")
62+
'vue/component-name-in-template-casing': 'error',
63+
// no ending html tag on a new line (was warn in "vue/strongly-recommended")
64+
'vue/html-closing-bracket-newline': 'error',
65+
// space before self-closing elements (was warn in "vue/strongly-recommended")
66+
'vue/html-closing-bracket-spacing': 'error',
67+
// code spacing with attributes (default is 1)
68+
'vue/max-attributes-per-line': [
69+
'error',
70+
{
71+
singleline: 3,
72+
multiline: {
73+
max: 3,
74+
allowFirstLine: true,
75+
}
76+
}
77+
],
78+
},
79+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
node_modules/
22
*.log
3-
build/artifacts
3+
build/
4+
js/
45
.rvm
56
report
67
clover.xml

.scrutinizer.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
filter:
2-
excluded_paths:
3-
- 'js/vendor/*'
4-
- 'js/public/*'
5-
- 'js/tests/stubs/*'
6-
- 'templates/*'
7-
- 'l10n/*'
8-
- 'tests/*'
2+
excluded_paths:
3+
- 'js/*'
4+
- 'templates/*'
5+
- 'l10n/*'
6+
- 'tests/*'
97

10-
imports:
11-
- javascript
12-
- php
8+
build:
9+
nodes:
10+
analysis:
11+
tests:
12+
override:
13+
- php-scrutinizer-run
14+
- eslint-run --ext .js,.vue src
1315

1416
tools:
15-
external_code_coverage:
16-
timeout: 1800
17+
external_code_coverage: false
18+
js_hint: false

.stylelintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
extends: 'stylelint-config-recommended-scss',
3+
rules: {
4+
indentation: 'tab',
5+
'selector-type-no-unknown': null,
6+
'number-leading-zero': null,
7+
'rule-empty-line-before': [
8+
'always',
9+
{
10+
ignore: ['after-comment', 'inside-block']
11+
}
12+
],
13+
'declaration-empty-line-before': [
14+
'never',
15+
{
16+
ignore: ['after-declaration']
17+
}
18+
],
19+
'comment-empty-line-before': null,
20+
'selector-type-case': null,
21+
'selector-list-comma-newline-after': null,
22+
'no-descending-specificity': null,
23+
'string-quotes': 'single'
24+
},
25+
plugins: ['stylelint-scss']
26+
}

.travis.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ addons:
77
packages:
88
- libxml2-utils
99

10+
cache:
11+
directories:
12+
- node_modules
13+
1014
env:
1115
global:
1216
- CORE_BRANCH=master
@@ -44,24 +48,9 @@ script:
4448
# - phpunit --coverage-clover clover.xml -c phpunit.xml
4549
# - phpunit -c phpunit.integration.xml
4650

47-
# execute js tests
48-
- cd js
49-
- npm install
50-
- npm install -g gulp
51-
#- gulp test
52-
- gulp
53-
54-
# Create coverage report
55-
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
56-
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
57-
58-
#matrix:
59-
# include:
60-
# - php: 7.1
61-
# env: DB=mysql
62-
# - php: 7.0
63-
# env: "DB=mysql CORE_BRANCH=stable9.1"
64-
# - php: 5.6
65-
# env: "DB=sqlite CORE_BRANCH=stable9"
66-
# fast_finish: true
51+
# build js
52+
- make npm-init
53+
- make lint
54+
- make stylelint
55+
- make build-js-production
6756

AUTHORS

Lines changed: 0 additions & 2 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)