Skip to content

Commit c84fc85

Browse files
authored
Merge pull request #10 from nextcloud/init
Init component repository
2 parents 4dde928 + 521e033 commit c84fc85

26 files changed

+16469
-74
lines changed

.babelrc.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: {
7+
browsers: ['last 2 versions', 'ie >= 11']
8+
}
9+
}
10+
]
11+
]
12+
}

.browserslistrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
last 2 versions
2+
ie >= 11

.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 = tab
6+
indent_size = 4
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc.js

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es6: true,
6+
node: true,
7+
jest: true
8+
},
9+
globals: {
10+
t: true,
11+
n: true,
12+
OC: true,
13+
OCA: true,
14+
Vue: true,
15+
VueRouter: true
16+
},
17+
parserOptions: {
18+
parser: 'babel-eslint'
19+
},
20+
extends: [
21+
'eslint:recommended',
22+
'plugin:node/recommended',
23+
'plugin:vue/essential',
24+
'plugin:vue/recommended',
25+
'standard'
26+
],
27+
plugins: ['vue', 'node'],
28+
rules: {
29+
// space before function ()
30+
'space-before-function-paren': ['error', 'never'],
31+
// curly braces always space
32+
'object-curly-spacing': ['error', 'always'],
33+
// stay consistent with array brackets
34+
'array-bracket-newline': ['error', 'consistent'],
35+
// 1tbs brace style
36+
'brace-style': 'error',
37+
// tabs only
38+
indent: ['error', 'tab'],
39+
'no-tabs': 0,
40+
'vue/html-indent': ['error', 'tab'],
41+
// only debug console
42+
'no-console': ['error', { allow: ['error', 'warn', 'debug'] }],
43+
// classes blocks
44+
'padded-blocks': ['error', { classes: 'always' }],
45+
// always have the operator in front
46+
'operator-linebreak': ['error', 'before'],
47+
// ternary on multiline
48+
'multiline-ternary': ['error', 'always-multiline'],
49+
// es6 import/export and require
50+
'node/no-unpublished-require': ['off'],
51+
'node/no-unsupported-features': ['off'],
52+
// space before self-closing elements
53+
'vue/html-closing-bracket-spacing': 'error',
54+
// code spacing with attributes
55+
'vue/max-attributes-per-line': [
56+
'error',
57+
{
58+
singleline: 3,
59+
multiline: {
60+
max: 3,
61+
allowFirstLine: true
62+
}
63+
}
64+
]
65+
}
66+
}

.gitignore

+10-61
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,15 @@
1-
2-
# Created by https://www.gitignore.io/api/node
3-
4-
### Node ###
5-
# Logs
6-
logs
7-
*.log
1+
.DS_Store
2+
node_modules/
83
npm-debug.log*
94
yarn-debug.log*
105
yarn-error.log*
116

12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
24-
# nyc test coverage
25-
.nyc_output
26-
27-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28-
.grunt
29-
30-
# Bower dependency directory (https://bower.io/)
31-
bower_components
32-
33-
# node-waf configuration
34-
.lock-wscript
35-
36-
# Compiled binary addons (http://nodejs.org/api/addons.html)
37-
build/Release
38-
39-
# Dependency directories
40-
node_modules/
41-
jspm_packages/
42-
43-
# Typescript v1 declaration files
44-
typings/
45-
46-
# Optional npm cache directory
47-
.npm
48-
49-
# Optional eslint cache
50-
.eslintcache
51-
52-
# Optional REPL history
53-
.node_repl_history
54-
55-
# Output of 'npm pack'
56-
*.tgz
57-
58-
# Yarn Integrity file
59-
.yarn-integrity
60-
61-
# dotenv environment variables file
62-
.env
63-
64-
7+
# Editor directories and files
8+
.idea
9+
.vscode
10+
*.suo
11+
*.ntvs*
12+
*.njsproj
13+
*.sln
6514

66-
# End of https://www.gitignore.io/api/node
15+
.marginalia

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.stylelintrc.js

+26
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+
}

Makefile

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
all: dev-setup lint build-js-production test
2+
3+
# Dev env management
4+
dev-setup: clean clean-dev npm-init
5+
6+
npm-init:
7+
npm install
8+
9+
npm-update:
10+
npm update
11+
12+
# Building
13+
build-js:
14+
npm run dev
15+
16+
build-js-production:
17+
npm run build
18+
19+
watch-js:
20+
npm run watch
21+
22+
# Testing
23+
test:
24+
npm run test
25+
26+
test-watch:
27+
npm run test:watch
28+
29+
test-coverage:
30+
npm run test:coverage
31+
32+
# Linting
33+
lint:
34+
npm run lint
35+
36+
lint-fix:
37+
npm run lint:fix
38+
39+
# Style linting
40+
stylelint:
41+
npm run stylelint
42+
43+
stylelint-fix:
44+
npm run stylelint:fix
45+
46+
# Cleaning
47+
clean:
48+
rm -f dist/ncvuecomponents.js
49+
rm -f dist/ncvuecomponents.js.map
50+
51+
clean-dev:
52+
rm -rf node_modules
53+

dist/ncvuecomponents.js

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

dist/ncvuecomponents.js.map

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

lerna.json

-8
This file was deleted.

0 commit comments

Comments
 (0)