Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #29 - Remove frontend and switch to Neutrino #1

Merged
merged 15 commits into from Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

56 changes: 0 additions & 56 deletions .eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,5 @@
const { Neutrino } = require('neutrino');

module.exports = Neutrino()
.use('.neutrinorc.js')
.call('eslintrc');
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,3 +5,4 @@ dist
.env
.eslintcache
*.log
build/
75 changes: 75 additions & 0 deletions .neutrinorc.js
@@ -0,0 +1,75 @@
module.exports = {
use: [
[
'@neutrinojs/airbnb-base',
{
eslint: {
rules: {
"no-console": 0,
"no-nested-ternary": 0,
"no-prototype-builtins": 0,
"jsx-quotes": [
"error",
"prefer-single"
],
"max-len": 1,
"no-await-in-loop": 0,
"no-param-reassign": 0,
"no-return-assign": 0,
"guard-for-in": 0,
"arrow-body-style": 0,
"no-restricted-syntax": 0,
"no-unused-vars": [
1,
{
"vars": "local",
"args": "after-used",
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"no-loop-func": 0,
"import/prefer-default-export": 0,
"no-confusing-arrow": [
"error",
{
"allowParens": true
}
],
"object-shorthand": 0,
"class-methods-use-this": 0,
"camelcase": 0,
"global-require": 0,
"react/prefer-stateless-function": 0,
"react/jsx-filename-extension": 0,
"react/forbid-prop-types": 0,
"react/require-default-props": 0,
"react/no-array-index-key": 0,
"react/no-multi-comp": 0,
"react/no-unused-prop-types": 0,
"react/no-danger": 0,
"no-mixed-operators": 0,
"generator-star-spacing": 0,
"jsx-quotes": 0,
"react/default-props-match-prop-types": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/jsx-closing-tag-location": 0,
"no-nested-ternary": 0,
"no-unused-vars": 0,
"indent": 0,
"prefer-destructuring": 0
}
}
}
],
[
'@neutrinojs/node',
{
html: {
title: 'Firefox health backend'
},
}
],
['@neutrinojs/mocha', { exit: true }]
]
};
13 changes: 11 additions & 2 deletions .travis.yml
@@ -1,12 +1,21 @@
dist: trusty
language: node_js
cache: yarn
node_js:
- '8'
env:
global:
- REDIS_URL=redis://localhost:6379
install: npm install
install:
- yarn install --frozen-lockfile
before_install:
- curl -sSfL https://yarnpkg.com/install.sh | bash # Required due to: https://github.com/travis-ci/travis-ci/issues/7951
- export PATH=$HOME/.yarn/bin:$PATH
after_failure:
- yarn build -- --inspect
script:
- npm test
- yarn build
- yarn test
services:
- 'redis-server'
after_success: npm run coverage
12 changes: 5 additions & 7 deletions README.md
@@ -1,12 +1,10 @@
# Project *Platform Health*
# Project *Firefox Health*

Platform Product Metrics & Insights

[![Build Status](https://api.travis-ci.org/mozilla/platform-health.svg?branch=master)](https://travis-ci.org/mozilla/platform-health)
[![dependencies](https://img.shields.io/david/mozilla/platform-health.svg)](https://david-dm.org/mozilla/platform-health)
[![devdependencies](https://img.shields.io/david/dev/mozilla/platform-health.svg)](https://david-dm.org/mozilla/platform-health#info=devDependencies)
Firefox metrics & insights backend.
For the frontend code visit the [Firefox health dashboard](https://github.com/mozilla/firefox-health-dashboard) repo.

[![Build Status](https://api.travis-ci.org/mozilla/firefox-health-backend.svg?branch=master)](https://travis-ci.org/mozilla/firefox-health-backend)

## Attributions

- heartbeat by Creative Stall from the Noun Project
- heartbeat icon by Creative Stall from the Noun Project
102 changes: 15 additions & 87 deletions package.json
Expand Up @@ -5,125 +5,53 @@
"scripts": {
"watch:src": "supervisor -q -w src server.js",
"watch:test": "NODE_ENV=testing mocha --watch",
"build:dev": "npm run clean; webpack -d",
"build:prod": "npm run clean; webpack -p",
"test:src": "NODE_ENV=testing nyc --require babel-core/register mocha",
"test:lint": "eslint --quiet --cache '?(static|src)/**/*.js'",
"test:src": "nyc neutrino test",
"test:lint": "neutrino lint",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"clean": "rm -rf dist",
"test": "npm-run-all --parallel test:*",
"watch": "npm-run-all --parallel watch:*",
"build": "npm run build:prod",
"start": "node server.js",
"heroku-postbuild": "npm run build:prod && npm run flush-cdn",
"flush-cdn": "node postinstall.js"
"build": "neutrino build",
"start": "neutrino start",
"heroku-postbuild": "npm run build"
},
"author": "Harald Kirschner <npm@digitarald.com> (http://digitarald.de/)",
"license": "MPL-2.0",
"dependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.25.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-es2015-destructuring": "^6.23.0",
"babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
"babel-plugin-transform-es2015-parameters": "^6.23.0",
"babel-plugin-transform-regenerator": "^6.16.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2015-loose": "^8.0.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-0": "^6.16.0",
"babel-register": "^6.23.0",
"babel-runtime": "^6.25.0",
"browserslist": "^2.2.2",
"bz": "^0.4.5",
"caniuse-db": "^1.0.30000712",
"cheerio": "^1.0.0-rc.2",
"chrono-node": "^1.3.5",
"classnames": "^2.2.5",
"cloudflare": "^1.0.5",
"css-loader": "^0.28.4",
"css-mqpacker": "^6.0.1",
"d3": "^4.10.0",
"d3-scale": "^1.0.6",
"d3-shape": "^1.2.0",
"d3-time": "^1.0.7",
"debug": "^3.1.0",
"dotenv": "^4.0.0",
"es6-promise": "^4.1.1",
"eslint": "^3.19.0",
"eslint-config-airbnb": "^15.0.2",
"eslint-loader": "^1.9.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jsx-a11y": "^5.1.1",
"eslint-plugin-react": "^7.1.0",
"event-emitter": "^0.3.4",
"exports-loader": "^0.6.4",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.5",
"github": "^9.2.0",
"github-api": "^3.0.0",
"googleapis": "^20.1.0",
"gsjson": "^0.1.8",
"html-webpack-plugin": "^2.30.1",
"ical": "^0.5.0",
"image-webpack-loader": "^3.3.1",
"imports-loader": "^0.7.1",
"json2csv": "^3.11.0",
"koa": "^2.3.0",
"koa-cors": "0.0.16",
"koa-logger": "^2.0.1",
"koa-response-time": "^2.0.0",
"koa-router": "^7.2.1",
"koa-static-cache": "^4.0.0",
"koa-webpack-dev-middleware": "^1.4.4",
"koa-webpack-hot-middleware": "^1.0.3",
"lodash": "^4.17.2",
"metrics-graphics": "^2.10.1",
"moment": "^2.19.3",
"moment-business": "^3.0.1",
"node-fetch": "^1.7.1",
"normalize.css": "^7.0.0",
"npm-run-all": "^4.0.2",
"numbro": "^1.11.1",
"numeral": "^2.0.4",
"postcss-css-variables": "^0.7.0",
"postcss-cssnext": "^2.11.0",
"postcss-custom-properties": "^5.0.2",
"postcss-import": "^9.1.0",
"postcss-loader": "^1.3.3",
"postcss-nested": "^1.0.0",
"postcss-reporter": "^3.0.0",
"postcss-simple-extend": "^1.0.0",
"postcss-simple-vars": "^3.0.0",
"prop-types": "^15.5.10",
"qs": "^6.5.0",
"query-string": "^5.0.1",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-hot-loader": "^3.1.3",
"react-router": "^3.0.2",
"redis": "^2.7.0",
"redis-commands": "^1.3.1",
"semver": "^5.4.1",
"simple-statistics": "^5.2.0",
"style-loader": "^0.19.0",
"supervisor": "^0.12.0",
"then-redis": "^2.0.1",
"url-loader": "^0.6.2",
"web-app-manifest-loader": "^0.1.1",
"webpack": "^3.10.0",
"webpack-dev-middleware": "^1.12.2",
"webpack-sources": "^1.1.0",
"whatwg-fetch": "^2.0.3",
"wolfy87-eventemitter": "^5.2.2"
"then-redis": "^2.0.1"
},
"devDependencies": {
"mocha": "^4.0.1",
"@neutrinojs/airbnb-base": "^8.0.18",
"@neutrinojs/mocha": "^8.0.18",
"@neutrinojs/node": "^8.0.18",
"coveralls": "^3.0.0",
"eslint-plugin-babel": "^4.1.2",
"mocha-lcov-reporter": "^1.3.0",
"neutrino": "^8.0.18",
"nyc": "^11.1.0",
"supertest": "^3.0.0"
"supertest": "^3.0.0",
"webpack": "^3.10.0"
}
}
3 changes: 0 additions & 3 deletions postinstall.js

This file was deleted.

2 changes: 1 addition & 1 deletion server.js
@@ -1,3 +1,3 @@
require('babel-register')();

require('./src/app.js');
require('./src/index.js');
10 changes: 0 additions & 10 deletions src/.babelrc

This file was deleted.