Skip to content

Commit f27d675

Browse files
committed
Init component structure
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent 4dde928 commit f27d675

24 files changed

+14127
-74
lines changed

.babelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"targets": {
7+
"browsers": ["> 1%", "last 2 versions", "not ie <= 11"]
8+
}
9+
}
10+
]
11+
]
12+
}

.editorconfig

Lines changed: 9 additions & 0 deletions
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

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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: false,
11+
n: false,
12+
OC: false,
13+
OCA: false
14+
},
15+
parserOptions: {
16+
parser: 'babel-eslint'
17+
},
18+
extends: [
19+
'eslint:recommended',
20+
'plugin:node/recommended',
21+
'plugin:vue/recommended',
22+
'standard'
23+
],
24+
plugins: ['vue', 'node'],
25+
rules: {
26+
// space before function ()
27+
'space-before-function-paren': ['error', 'never'],
28+
// curly braces always space
29+
'object-curly-spacing': ['error', 'always'],
30+
// stay consistent with array brackets
31+
'array-bracket-newline': ['error', 'consistent'],
32+
// 1tbs brace style
33+
'brace-style': 'error',
34+
// tabs only
35+
indent: ['error', 'tab'],
36+
'no-tabs': 0,
37+
'vue/html-indent': ['error', 'tab'],
38+
// only debug console
39+
'no-console': ['error', { 'allow': ['error', 'warn', 'debug'] }],
40+
// classes blocks
41+
'padded-blocks': ['error', { 'classes': 'always' }],
42+
// es6 import/export and require
43+
'node/no-unpublished-require': ['off'],
44+
'node/no-unsupported-features': ['off'],
45+
// space before self-closing elements
46+
'vue/html-closing-bracket-spacing': 'error',
47+
// code spacing with attributes
48+
'vue/max-attributes-per-line': [
49+
'error',
50+
{
51+
singleline: 3,
52+
multiline: {
53+
max: 3,
54+
allowFirstLine: true
55+
}
56+
}
57+
]
58+
}
59+
};

.gitignore

Lines changed: 10 additions & 61 deletions
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.prettierrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

.stylelintrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
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": ["always", {
8+
"ignore": ["after-comment", "inside-block"]
9+
}],
10+
"declaration-empty-line-before": ["never", {
11+
"ignore": ["after-declaration"]
12+
}],
13+
"comment-empty-line-before": null,
14+
"selector-type-case": null,
15+
"selector-list-comma-newline-after": null,
16+
"no-descending-specificity": null,
17+
"string-quotes": "single"
18+
},
19+
"plugins": [
20+
"stylelint-scss"
21+
]
22+
}

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
# Cleaning
40+
clean:
41+
rm -f dist/ncvuecomponents.js
42+
rm -f dist/ncvuecomponents.js.map
43+
44+
clean-dev:
45+
rm -rf node_modules
46+

dist/ncvuecomponents.js

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ncvuecomponents.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)