diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..c4f879a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "extends": "airbnb-base", + "rules": { + "class-methods-use-this": 0, + "no-continue": 0, + "no-plusplus": 0, + "object-curly-newline": 0 + }, + "globals": { + "customElements": false, + "document": false, + "fetch": false, + "Plotly": false + }, + "settings": { + "import/parser": "babel-eslint" + }, + "parser": "babel-eslint" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..260d8b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/dist/ +npm-debug.log diff --git a/package.json b/package.json new file mode 100644 index 0000000..734f2d9 --- /dev/null +++ b/package.json @@ -0,0 +1,32 @@ +{ + "name": "infoscreens", + "version": "1.0.0", + "description": "c-base info screens", + "main": "index.js", + "scripts": { + "build": "webpack", + "pretest": "eslint lib/*.js elements/*.js index.js", + "start": "http-server . -p 3000 -s", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Henri Bergius ", + "license": "MIT", + "dependencies": { + "@webcomponents/webcomponentsjs": "^1.0.19", + "d3": "^4.12.0", + "plotly.js": "^1.31.2", + "skatejs": "^5.0.0-beta.4" + }, + "devDependencies": { + "@babel/core": "^7.0.0-beta.32", + "@babel/preset-env": "^7.0.0-beta.32", + "babel-eslint": "^8.0.2", + "babel-loader": "^8.0.0-beta.0", + "babel-plugin-transform-class-properties": "^6.24.1", + "eslint": "^4.12.0", + "eslint-config-airbnb-base": "^12.1.0", + "eslint-plugin-import": "^2.8.0", + "http-server": "^0.10.0", + "webpack": "^3.8.1" + } +} diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..0ae7447 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,21 @@ +module.exports = { + entry: './index.js', + output: { + path: __dirname, + filename: 'dist/infoscreens.js' + }, + module: { + rules: [ + { + test: /\.js$/, + use: { + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env'], + plugins: ['transform-class-properties'], + } + } + } + ] + } +};