-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Barratt
committed
Oct 25, 2017
0 parents
commit 3a4dadf
Showing
22 changed files
with
8,491 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
"transform-react-jsx", | ||
"transform-object-rest-spread" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yaml,yml}] | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"extends": [ | ||
"airbnb", | ||
"wikimedia" | ||
], | ||
"rules": { | ||
"import/extensions": [ | ||
"error", | ||
"never", | ||
{ | ||
"png": "always", | ||
"scss": "always" | ||
} | ||
], | ||
"import/no-extraneous-dependencies": ["off"], | ||
"import/no-unresolved": ["off"], | ||
"jsx-a11y/label-has-for": ["off"], | ||
"jsx-a11y/anchor-is-valid": ["off"], | ||
"one-var": [ | ||
"error", | ||
"never" | ||
], | ||
"react/jsx-filename-extension": [ | ||
"error", | ||
{ | ||
"extensions": [ | ||
".js" | ||
] | ||
} | ||
], | ||
"react/jsx-indent": [ | ||
"error", | ||
"tab" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
npm install; | ||
npm run watch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: build-claim0 | ||
name: build-claim0 | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 100Mi | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
annotations: | ||
kompose.cmd: kompose convert | ||
kompose.version: 1.3.0 (4f187a1) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: build | ||
name: build | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: build | ||
spec: | ||
containers: | ||
- args: | ||
- ./bin/watch | ||
image: docker-registry.tools.wmflabs.org/toollabs-nodejs-web | ||
name: build | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /code | ||
name: build-claim0 | ||
workingDir: /code | ||
restartPolicy: Always | ||
volumes: | ||
- name: build-claim0 | ||
persistentVolumeClaim: | ||
claimName: build-claim0 | ||
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
kompose.cmd: kompose convert | ||
kompose.version: 1.3.0 (4f187a1) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: build | ||
name: build | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- name: headless | ||
port: 55555 | ||
targetPort: 0 | ||
selector: | ||
io.kompose.service: build | ||
status: | ||
loadBalancer: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '3' | ||
services: | ||
web: | ||
image: docker-registry.tools.wmflabs.org/toollabs-static-web | ||
ports: | ||
- 8888:80 | ||
command: lighttpd -D -f /etc/lighttpd/lighttpd.conf | ||
volumes: | ||
- ./etc/lighttpd/lighttpd.conf:/etc/lighttpd/lighttpd.conf:cached | ||
- ./:/var/www:cached | ||
build: | ||
image: docker-registry.tools.wmflabs.org/toollabs-nodejs-web | ||
working_dir: /code | ||
command: | ||
- ./bin/watch | ||
volumes: | ||
- ./:/code:cached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
server.modules = ( | ||
"mod_access", | ||
"mod_alias", | ||
"mod_compress", | ||
"mod_redirect", | ||
"mod_rewrite", | ||
) | ||
|
||
server.document-root = "/var/www/html" | ||
server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) | ||
server.errorlog = "/var/log/lighttpd/error.log" | ||
server.pid-file = "/var/run/lighttpd.pid" | ||
server.username = "www-data" | ||
server.groupname = "www-data" | ||
server.port = 80 | ||
|
||
|
||
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" ) | ||
url.access-deny = ( "~", ".inc" ) | ||
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) | ||
|
||
compress.cache-dir = "/var/cache/lighttpd/compress/" | ||
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) | ||
|
||
# default listening port for IPv6 falls back to the IPv4 port | ||
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port | ||
include_shell "/usr/share/lighttpd/create-mime.assign.pl" | ||
include_shell "/usr/share/lighttpd/include-conf-enabled.pl" | ||
|
||
# rewrite everything to index.html | ||
url.rewrite-if-not-file = ( "^/.*$" => "/index.html" ) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-env browser */ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { createStore, applyMiddleware } from 'redux'; | ||
import { Provider } from 'react-redux'; | ||
import createHistory from 'history/createBrowserHistory'; | ||
import { ConnectedRouter, routerMiddleware } from 'react-router-redux'; | ||
import { createEpicMiddleware } from 'redux-observable'; | ||
import { composeWithDevTools } from 'redux-devtools-extension'; | ||
import App from './src/components/app'; | ||
import reducer from './src/reducers/index'; | ||
import epic from './src/epics/index'; | ||
import './styles/styles.scss'; | ||
|
||
function main() { | ||
// Create a history of your choosing (we're using a browser history in this case) | ||
const history = createHistory(); | ||
// Build the middleware for intercepting and dispatching navigation actions | ||
const router = routerMiddleware( history ); | ||
const epicMiddleware = createEpicMiddleware( epic ); | ||
// Add the reducer to your store on the `router` key | ||
// Also apply our middleware for navigating | ||
const store = createStore( | ||
reducer, | ||
composeWithDevTools( applyMiddleware( router, epicMiddleware ) ), | ||
); | ||
|
||
ReactDOM.render( | ||
<Provider store={store}> | ||
<ConnectedRouter history={history}> | ||
<App /> | ||
</ConnectedRouter> | ||
</Provider>, | ||
document.getElementById( 'root' ), | ||
); | ||
} | ||
|
||
// Engage! | ||
main(); |
Oops, something went wrong.