Skip to content
Permalink
Browse files

update CLOC

  • Loading branch information...
upvalue committed Aug 26, 2017
1 parent 15f5ae6 commit 58b3b60417b9589c637daecc4ff8ca956d5d03b1
Showing with 14 additions and 15 deletions.
  1. +2 −1 README.md
  2. +2 −0 TODO.org
  3. +1 −1 frontend/bindings.d.ts
  4. +3 −10 frontend/common.tsx
  5. +1 −1 package.json
  6. +5 −2 webpack.config.js
@@ -1,6 +1,7 @@
![CircleCI Badge](https://circleci.com/gh/ioddly/meditations.png?circle-token=:circle-token&style=shield)

meditations is an application for tracking life progress that builds on habit formation and long term thinking.
meditations is an application for tracking progress towards goals that builds on habit formation and long term
thinking.

Originally a Trello board, meditations simply keeps track of how often you complete tasks, and how much time you spend
on them (optionally). It's fairly minimalist compared to more complex time management systems, and leave the structure
@@ -22,6 +22,8 @@
** TODO As before, navigation buttons should also be valid links so they can be opened in new tabs.
** TODO Export causes downloads on multiple tabs. Export does not work when served through nginx
** TODO Drag and drop on comment
** TODO Projects, rather than having a built-in range (e.g. 72 days) could have a user-settable range including years &etc
and could calculate time usage for such
* Journal
** DONE Month link is broken
** TODO Adding a new journal entry and navigating to it should change the URL appropriately
@@ -37,4 +37,4 @@ declare var MediumEditorTable: any;
declare module 'medium-editor-tables' {
import * as MediumEditor from 'medium-editor';
export default MediumEditorTable;
}
}
@@ -75,10 +75,7 @@ export type CommonState = {
socketReconnect: () => void;
};

function reduceReducers<S>(...reducers: redux.Reducer<S>[]): redux.Reducer<S> {
return (previous:any, current: any) =>
reducers.reduce((p: any, r: any) => r(p, current), previous);
}
export let dispatch: (action: CommonAction) => void;

export function commonReducer(state: CommonState, action: CommonAction): CommonState {
switch (action.type) {
@@ -88,9 +85,8 @@ export function commonReducer(state: CommonState, action: CommonAction): CommonS
return {...state,
notifications: [...state.notifications, action.notification],
};
} else {
return { ...state, notifications: [action.notification] };
}
}
return { ...state, notifications: [action.notification] };
case 'SOCKET_CLOSED':
return { ...state, socketClosed: true };
case 'SOCKET_OPENED':
@@ -107,8 +103,6 @@ export function commonReducer(state: CommonState, action: CommonAction): CommonS
return state;
}

export let dispatch: (action: CommonAction) => void;

/**
* This creates a store with thunk & logger middleware applied and a common reducer added.
* The store is also saved off so that common UI items can dispatch actions to it without it needing
@@ -124,7 +118,6 @@ export function createStore<State extends CommonState, Action extends redux.Acti
(action: Action | ((thunk: (action: Action) => void) => void)) => void
] {


// Apply common reducer to all actions
const combinedReducer = (pstate: State = initialState, action: redux.Action): State => {
let state = commonReducer(pstate as CommonState, action as any as CommonAction) ;
@@ -9,7 +9,7 @@
"lint-backend": "golint backend/*.go",
"lint": "yarn run lint-frontend && yarn run lint-backend",
"postinstall": "npm rebuild node-sass && webpack -p",
"cloc": "cloc frontend/**/*.ts frontend/**.tsx frontend/**/*.scss backend/*.go *.js",
"cloc": "cloc frontend/**/*.ts frontend/**.tsx frontend/**/*.tsx frontend/**/*.ts frontend/**/*.scss backend/*.go *.js",
"doc-frontend": "typedoc --out docs",
"doc-backend": "(godoc -http=:8958 &); xdg-open http://localhost:8958/pkg/github.com/ioddly/meditations/backend",
"test-backend": "godep go test -v ./backend --cover",
@@ -7,10 +7,13 @@ const sassExtract = new ExtractTextPlugin('bundle-[name].css');

const nodeModulesDirectory = path.resolve(__dirname, './node_modules');

const getEntryList = name =>
[`./frontend/entry/${name}.ts`, `./frontend/style/${name}.scss`];

module.exports = {
entry: {
journal: ['./frontend/entry/journal.ts', './frontend/style/journal.scss'],
habits: ['./frontend/entry/habits.ts', './frontend/style/habits.scss'],
journal: getEntryList('journal'),
habits: getEntryList('habits'),
},

output: {

0 comments on commit 58b3b60

Please sign in to comment.
You can’t perform that action at this time.