Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 29, 2019. It is now read-only.

Commit 9ca48f1

Browse files
author
Javier Diaz
committed
chore: configurations ✨
1 parent a9bf8a6 commit 9ca48f1

File tree

9 files changed

+122
-0
lines changed

9 files changed

+122
-0
lines changed

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

‎.eslintignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/node_modules

‎.eslintrc.js‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true,
5+
},
6+
extends: [
7+
'plugin:vue/essential',
8+
'airbnb-base',
9+
],
10+
rules: {
11+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13+
},
14+
parserOptions: {
15+
parser: 'babel-eslint',
16+
},
17+
};

‎.gitignore‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
testing/
5+
coverage/
6+
npm-debug.log
7+
yarn-error.log
8+
9+
# Editor directories and files
10+
.idea
11+
*.suo
12+
*.ntvs*
13+
*.njsproj
14+
*.sln

‎.travis.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: node_js
2+
node_js:
3+
- 8
4+
- 10
5+
cache:
6+
yarn: true
7+
directories:
8+
- node_modules
9+
install:
10+
- yarn install
11+
script:
12+
- yarn test:unit

‎babel.config.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['bili/babel'],
3+
};

‎bili.config.ts‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { Config } from 'bili';
2+
3+
const config: Config = {
4+
input: 'index.js',
5+
output: {
6+
moduleName: 'VueGlider',
7+
extractCSS: true,
8+
format: ['esm', 'umd', 'cjs'],
9+
fileName({ format }, defaultFileName) {
10+
if (format === 'esm') {
11+
return 'vue-glider.esm.js';
12+
}
13+
if (format === 'umd') {
14+
return 'vue-glider.js';
15+
}
16+
if (format === 'cjs') {
17+
return 'vue-glider.cjs.js';
18+
}
19+
return defaultFileName;
20+
},
21+
sourceMapExcludeSources: true
22+
},
23+
babel: {
24+
minimal: true
25+
},
26+
plugins: {
27+
vue: true,
28+
},
29+
extendConfig(config, { format }) {
30+
if (format === 'umd') {
31+
config.output.minify = true;
32+
config.env = Object.assign({}, config.env, {
33+
NODE_ENV: 'production',
34+
});
35+
}
36+
return config;
37+
},
38+
};
39+
40+
export default config;

‎jest.config.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
moduleFileExtensions: [
3+
'js',
4+
'jsx',
5+
'json',
6+
'vue',
7+
],
8+
transform: {
9+
'^.+\\.vue$': 'vue-jest',
10+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
11+
'^.+\\.jsx?$': 'babel-jest',
12+
},
13+
snapshotSerializers: [
14+
'jest-serializer-vue',
15+
],
16+
testMatch: [
17+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
18+
],
19+
testURL: 'http://localhost/',
20+
};

‎tests/unit/.eslintrc.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
env: {
3+
jest: true,
4+
},
5+
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /