redux-optimist usage
import optimist from 'redux-optimist';
import { combineReducers } from 'redux';
import todos from './todos';
export default optimist(combineReducers({
todos
}));
import * as ACTION_TYPES from 'twiddle/actions/types'; | |
import { | |
previousPageNumber, | |
nextPageNumber, | |
lastPageNumber | |
} from 'twiddle/reducers/selectors'; | |
export const updatePageSize = (newPageSize) => ({ | |
type: ACTION_TYPES.SET_PAGE_SIZE, |
import * as ACTION_TYPES from 'twiddle/actions/types'; | |
const goToPage = (pageNumber) => ({ | |
type: ACTION_TYPES.SET_PAGE, | |
payload: pageNumber | |
}); | |
const updatePageSize = (newPageSize) => ({ | |
type: ACTION_TYPES.SET_PAGE_SIZE, | |
payload: newPageSize |
redux-optimist usage
import optimist from 'redux-optimist';
import { combineReducers } from 'redux';
import todos from './todos';
export default optimist(combineReducers({
todos
}));
{
"added": {
"object": [{ // single entry array
"id": "12345678-abcd-efab-23456789",
}]
},
"updated":{}, // empty
"deleted":{}, // empty
"updateData":[] // empty
line 1 of date-picker.hbs
, change placeholder to YYYY
.
{{input class="datepicker" placeholder="MM/DD/YYYY"}}
line 54/55 of date_picker_component.js
, update format
to YYYY
and add new parseFormat
format: "MM/DD/YYYY",
parseFormat: ["MM/DD/YY", "MM/DD/YYYY"],
The existing lookupHelper
really only supports 3 helpers.
function lookupHelper(helperName) {
if (helperName === 'attribute') {
return this.attribute;
}
else if (helperName === 'partial'){
return this.partial;
}
require: { | |
optimize: { | |
overrides: function( runConfig ) { | |
if ( !runConfig.paths ) { | |
runConfig.paths = {}; | |
} | |
// prod version of ember for optimized builds | |
runConfig.paths.ember = 'vendor/ember/ember.prod'; | |
} | |
} |
exports.config = { | |
modules: [ | |
"copy", | |
"jshint", | |
"csslint", | |
"server", | |
"require", | |
"minify-js", | |
"minify-css", | |
"live-reload", |
var Hapi = require('hapi'); | |
exports.startServer = function (config, callback) { | |
var port = process.env.PORT || config.server.port; | |
var serverOptions = { | |
views: { | |
path: config.server.views.path, | |
engines: { | |
dust: { | |
compileMode: 'async', |
var path = require( 'path' ); | |
var _tweakEmber = function( mimosaConfig, options, next ) { | |
if (options.files && options.files.length) { | |
options.files.forEach( function( file ) { | |
if (path.basename(file.inputFileName) === "ember.js") { | |
file.inputFileText = | |
file.inputFileText.replace( /define\("ember",/, "define(\"ember-int\"," ) | |
.replace(/requireModule\("ember"\)/, "requireModule(\"ember-int\")"); | |
} |