Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.

Commit 8711a79

Browse files
committed
enh: added a viewer
1 parent 7ecd54d commit 8711a79

30 files changed

+16331
-0
lines changed

preafqViewer/.babelrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7+
}
8+
}],
9+
"stage-2"
10+
],
11+
"plugins": ["transform-vue-jsx", "transform-runtime"],
12+
"env": {
13+
"test": {
14+
"presets": ["env", "stage-2"],
15+
"plugins": ["transform-vue-jsx", "transform-es2015-modules-commonjs", "dynamic-import-node"]
16+
}
17+
}
18+
}

preafqViewer/.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

preafqViewer/.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/build/
2+
/config/
3+
/dist/
4+
/*.js
5+
/test/unit/coverage/

preafqViewer/.eslintrc.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// https://eslint.org/docs/user-guide/configuring
2+
3+
module.exports = {
4+
root: true,
5+
parserOptions: {
6+
parser: 'babel-eslint'
7+
},
8+
env: {
9+
browser: true,
10+
},
11+
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
12+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
13+
extends: ['plugin:vue/essential', 'airbnb-base'],
14+
// required to lint *.vue files
15+
plugins: [
16+
'vue'
17+
],
18+
// check if imports actually resolve
19+
settings: {
20+
'import/resolver': {
21+
webpack: {
22+
config: 'build/webpack.base.conf.js'
23+
}
24+
}
25+
},
26+
// add your custom rules here
27+
rules: {
28+
// don't require .vue extension when importing
29+
'import/extensions': ['error', 'always', {
30+
js: 'never',
31+
vue: 'never'
32+
}],
33+
// disallow reassignment of function parameters
34+
// disallow parameter object manipulation except for specific exclusions
35+
'no-param-reassign': ['error', {
36+
props: true,
37+
ignorePropertyModificationsFor: [
38+
'state', // for vuex state
39+
'acc', // for reduce accumulators
40+
'e' // for e.returnvalue
41+
]
42+
}],
43+
// allow optionalDependencies
44+
'import/no-extraneous-dependencies': ['error', {
45+
optionalDependencies: ['test/unit/index.js']
46+
}],
47+
// allow debugger during development
48+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
49+
}
50+
}

preafqViewer/.gitignore

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

preafqViewer/.postcssrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// https://github.com/michael-ciniawsky/postcss-load-config
2+
3+
module.exports = {
4+
"plugins": {
5+
"postcss-import": {},
6+
"postcss-url": {},
7+
// to edit target browsers: use "browserslist" field in package.json
8+
"autoprefixer": {}
9+
}
10+
}

preafqViewer/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# preafq-viewer
2+
3+
> Viewer for preAFQ reports
4+
5+
## Build Setup
6+
7+
``` bash
8+
# install dependencies
9+
npm install
10+
11+
# serve with hot reload at localhost:8080
12+
npm run dev
13+
14+
# build for production with minification
15+
npm run build
16+
17+
# build for production and view the bundle analyzer report
18+
npm run build --report
19+
20+
# run unit tests
21+
npm run unit
22+
23+
# run e2e tests
24+
npm run e2e
25+
26+
# run all tests
27+
npm test
28+
```
29+
30+
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

preafqViewer/config/dev.env.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
const merge = require('webpack-merge')
3+
const prodEnv = require('./prod.env')
4+
5+
module.exports = merge(prodEnv, {
6+
NODE_ENV: '"development"'
7+
})

preafqViewer/config/index.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
'use strict'
2+
// Template version: 1.3.1
3+
// see http://vuejs-templates.github.io/webpack for documentation.
4+
5+
const path = require('path')
6+
7+
module.exports = {
8+
dev: {
9+
10+
// Paths
11+
assetsSubDirectory: 'static',
12+
assetsPublicPath: '/',
13+
proxyTable: {},
14+
15+
// Various Dev Server settings
16+
host: 'localhost', // can be overwritten by process.env.HOST
17+
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18+
autoOpenBrowser: false,
19+
errorOverlay: true,
20+
notifyOnErrors: true,
21+
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22+
23+
// Use Eslint Loader?
24+
// If true, your code will be linted during bundling and
25+
// linting errors and warnings will be shown in the console.
26+
useEslint: true,
27+
// If true, eslint errors and warnings will also be shown in the error overlay
28+
// in the browser.
29+
showEslintErrorsInOverlay: false,
30+
31+
/**
32+
* Source Maps
33+
*/
34+
35+
// https://webpack.js.org/configuration/devtool/#development
36+
devtool: 'cheap-module-eval-source-map',
37+
38+
// If you have problems debugging vue-files in devtools,
39+
// set this to false - it *may* help
40+
// https://vue-loader.vuejs.org/en/options.html#cachebusting
41+
cacheBusting: true,
42+
43+
cssSourceMap: true
44+
},
45+
46+
build: {
47+
// Template for index.html
48+
index: path.resolve(__dirname, '../dist/index.html'),
49+
50+
// Paths
51+
assetsRoot: path.resolve(__dirname, '../dist'),
52+
assetsSubDirectory: 'static',
53+
assetsPublicPath: '/',
54+
55+
/**
56+
* Source Maps
57+
*/
58+
59+
productionSourceMap: true,
60+
// https://webpack.js.org/configuration/devtool/#production
61+
devtool: '#source-map',
62+
63+
// Gzip off by default as many popular static hosts such as
64+
// Surge or Netlify already gzip all static assets for you.
65+
// Before setting to `true`, make sure to:
66+
// npm install --save-dev compression-webpack-plugin
67+
productionGzip: false,
68+
productionGzipExtensions: ['js', 'css'],
69+
70+
// Run the build command with an extra argument to
71+
// View the bundle analyzer report after build finishes:
72+
// `npm run build --report`
73+
// Set to `true` or `false` to always turn it on or off
74+
bundleAnalyzerReport: process.env.npm_config_report
75+
}
76+
}

preafqViewer/config/prod.env.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
'use strict'
2+
module.exports = {
3+
NODE_ENV: '"production"'
4+
}

0 commit comments

Comments
 (0)