git ssb

1+

dinoworm ๐Ÿ› / catstack



Commit a51858b13e497beda1e5deb1c48381c361a0ccfa

slpash

Michael Williams committed on 11/27/2015, 11:46:08 AM
Parent: 881e0db0626731290a9e89886bd428bf34791416

Files changed

package.jsonchanged
.gitignoreadded
app/api.jsadded
app/client.jsadded
app/package.jsonadded
app/server.jsadded
app/services/index.jsadded
app/services/static.jsadded
feature/index.jsadded
feature/steps.jsadded
package.jsonView
@@ -3,9 +3,18 @@
33 "version": "0.0.0",
44 "description": "production-quality TodoMVC example",
55 "main": "index.js",
66 "scripts": {
7- "test": "ava"
7+ "lint": "snazzy",
8+ "format": "snazzy --format",
9+ "test": "(npm run spec & npm run feature)",
10+ "spec": "node spec",
11+ "feature": "node feature",
12+ "dev-server": "nodemon app/server",
13+ "prod-server": "node app/server",
14+ "dev-client": "budo app/client.js -d --serve bundle.js --live",
15+ "prod-client": "browserify app/client.js -o bundle.js -g uglifyify"
16+
817 },
918 "repository": {
1019 "type": "git",
1120 "url": "git+https://github.com/ahdinosaur/craftworks-todomvc.git"
@@ -22,11 +31,20 @@
2231 "feathers",
2332 "ddd",
2433 "tcomb"
2534 ],
26- "author": "Mikey <michael.williams@enspiral.com> (http://dinosaur.os)",
35+ "author": "Mikey <michael.williams@enspiral.com> (http://dinosaur.is)",
2736 "license": "ISC",
2837 "bugs": {
2938 "url": "https://github.com/ahdinosaur/craftworks-todomvc/issues"
3039 },
31- "homepage": "https://github.com/ahdinosaur/craftworks-todomvc#readme"
40+ "homepage": "https://github.com/ahdinosaur/craftworks-todomvc#readme",
41+ "devDependencies": {
42+ "cuke-tap": "^1.0.2",
43+ "jsdom": "^7.1.0",
44+ "nodemon": "^1.8.1",
45+ "tape": "^4.2.2"
46+ },
47+ "dependencies": {
48+ "ramda": "^0.18.0"
49+ }
3250 }
.gitignoreView
@@ -1,0 +1,3 @@
1+/node_modules
2+npm-debug.log*
3+
app/api.jsView
app/client.jsView
@@ -1,0 +1,26 @@
1+const React = require('react')
2+const { render } = require('react-dom')
3+const { createStore, applyMiddleware } = require('redux')
4+const { Provider } = require('react-redux')
5+const logger = require('redux-logger')
6+const thunk = require('redux-thunk')
7+
8+const reducer = require('./reducers')
9+const { getAllTodos } = require('./actions')
10+const App = require('./containers/App')
11+
12+const middleware = process.env.NODE_ENV === 'production' ?
13+ [ thunk ] :
14+ [ thunk, logger() ]
15+
16+const createStoreWithMiddleware = applyMiddleware(...middleware)(createStore)
17+const store = createStoreWithMiddleware(reducer)
18+
19+store.dispatch(getAllTodos())
20+
21+render(
22+ <Provider store={store}>
23+ <App />
24+ </Provider>,
25+ document.getElementById('root')
26+)
app/package.jsonView
@@ -1,0 +1,5 @@
1+{
2+ "browser": {
3+ "./api": "./clients"
4+ }
5+}
app/server.jsView
@@ -1,0 +1,5 @@
1+const feathers = require('feathers')
2+
3+const { createServices } = require('./services')
4+
5+createServices()
app/services/index.jsView
@@ -1,0 +1,7 @@
1+var fs = require('fs')
2+var { filter } = require('rambda')
3+
4+filter(
5+ fs.readdirSync(__dirname),
6+ (name) => name.endsWith('index.js')
7+)
app/services/static.jsView
@@ -1,0 +1,5 @@
1+const serveStatic = require('serve-static')
2+
3+function createStaticService (config) {
4+ return serveStatic(config.root, config)
5+}
feature/index.jsView
@@ -1,0 +1,7 @@
1+const cuke = require('cuke-tap')
2+const path = require('path')
3+
4+const features = [ path.join(__dirname, '/feature.feature') ]
5+const steps = [ require('./steps') ]
6+
7+cuke(features, steps)
feature/steps.jsView
@@ -1,0 +1,11 @@
1+const test = require('cuke-tap')
2+const jsdom = require('jsdom')
3+
4+test.given(/^I am on the landing page$/, (t, world, params) => {
5+ t.plan(1)
6+ jsdom.env('http://localhost:9966', (err, window) => {
7+ t.error(err)
8+ world.window = window
9+ t.pass('done')
10+ })
11+})

Built with git-ssb-web