Skip to content

Commit

Permalink
switch to Vue.js
Browse files Browse the repository at this point in the history
  • Loading branch information
korelstar committed May 22, 2019
1 parent deb80e4 commit fc7631e
Show file tree
Hide file tree
Showing 133 changed files with 12,451 additions and 79,701 deletions.
13 changes: 13 additions & 0 deletions .babelrc.js
@@ -0,0 +1,13 @@
module.exports = {
plugins: ['@babel/plugin-syntax-dynamic-import'],
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: ['last 2 versions', 'ie >= 11']
}
}
]
]
}
9 changes: 4 additions & 5 deletions js/vendor/restangular/.editorconfig → .editorconfig
@@ -1,10 +1,9 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
79 changes: 79 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,79 @@
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 6,
},
settings: {
'import/resolver': {
webpack: {
config: 'webpack.common.js',
},
node: {
paths: ['src'],
extensions: ['.js', '.vue'],
},
},
},
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:vue/recommended',
'standard',
],
globals: {
$: 'readonly',
t: 'readonly',
n: 'readonly',
OC: 'readonly',
OCA: 'readonly',
},
plugins: [
'vue',
],
rules: {
// allow space before function () (was "always" in "standard")
'space-before-function-paren': ['error', 'never'],
// stay consistent with array brackets (not in "standard")
'array-bracket-newline': ['error', 'consistent'],

// tabs only (was spaces in "standard")
'indent': ['error', 'tab'],
// allow tabs for indentation (was forbidden in "standard")
'no-tabs': ['error', { allowIndentationTabs: true }],
// indentation in vue's html should be tabs (was spaces in "vue/strongly-recommended")
'vue/html-indent': ['error', 'tab'],

// only debug console (not in "standard")
'no-console': ['error', { allow: ['error', 'warn', 'info', 'debug'] }],
// always add a trailing comma, for diff readability (was "never" in "standard")
'comma-dangle': ['warn', 'always-multiline'],
// always have the operator in front (was "after" in "standard")
'operator-linebreak': ['error', 'before'],
// ternary on multiline (not in "standard")
'multiline-ternary': ['error', 'always-multiline'],

// disallow use of "var" (not in "standard")
'no-var': 'error',
// Suggest using const
'prefer-const': 'warn',

// check case of component names (not in "vue/recommended")
'vue/component-name-in-template-casing': 'error',
// no ending html tag on a new line (was warn in "vue/strongly-recommended")
'vue/html-closing-bracket-newline': 'error',
// space before self-closing elements (was warn in "vue/strongly-recommended")
'vue/html-closing-bracket-spacing': 'error',
// code spacing with attributes (default is 1)
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: true,
}
}
],
},
}
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,6 +1,7 @@
node_modules/
*.log
build/artifacts
build/
js/
.rvm
report
clover.xml
Expand Down
26 changes: 14 additions & 12 deletions .scrutinizer.yml
@@ -1,16 +1,18 @@
filter:
excluded_paths:
- 'js/vendor/*'
- 'js/public/*'
- 'js/tests/stubs/*'
- 'templates/*'
- 'l10n/*'
- 'tests/*'
excluded_paths:
- 'js/*'
- 'templates/*'
- 'l10n/*'
- 'tests/*'

imports:
- javascript
- php
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
- eslint-run --ext .js,.vue src

tools:
external_code_coverage:
timeout: 1800
external_code_coverage: false
js_hint: false
26 changes: 26 additions & 0 deletions .stylelintrc.js
@@ -0,0 +1,26 @@
module.exports = {
extends: 'stylelint-config-recommended-scss',
rules: {
indentation: 'tab',
'selector-type-no-unknown': null,
'number-leading-zero': null,
'rule-empty-line-before': [
'always',
{
ignore: ['after-comment', 'inside-block']
}
],
'declaration-empty-line-before': [
'never',
{
ignore: ['after-declaration']
}
],
'comment-empty-line-before': null,
'selector-type-case': null,
'selector-list-comma-newline-after': null,
'no-descending-specificity': null,
'string-quotes': 'single'
},
plugins: ['stylelint-scss']
}
29 changes: 9 additions & 20 deletions .travis.yml
Expand Up @@ -7,6 +7,10 @@ addons:
packages:
- libxml2-utils

cache:
directories:
- node_modules

env:
global:
- CORE_BRANCH=master
Expand Down Expand Up @@ -44,24 +48,9 @@ script:
# - phpunit --coverage-clover clover.xml -c phpunit.xml
# - phpunit -c phpunit.integration.xml

# execute js tests
- cd js
- npm install
- npm install -g gulp
#- gulp test
- gulp

# Create coverage report
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"

#matrix:
# include:
# - php: 7.1
# env: DB=mysql
# - php: 7.0
# env: "DB=mysql CORE_BRANCH=stable9.1"
# - php: 5.6
# env: "DB=sqlite CORE_BRANCH=stable9"
# fast_finish: true
# build js
- make npm-init
- make lint
- make stylelint
- make build-js-production

2 changes: 0 additions & 2 deletions AUTHORS

This file was deleted.

29 changes: 0 additions & 29 deletions CONTRIBUTING.md

This file was deleted.

0 comments on commit fc7631e

Please sign in to comment.