Permalink
Browse files

Make default size and earliest date config vars

  • Loading branch information...
1 parent aa54a9c commit 9469ef0fd7f27362546362e20db29e0642e88616 @benjreinhart benjreinhart committed Jun 16, 2014
Showing with 13 additions and 2 deletions.
  1. +3 −2 components/search/grammar.jison
  2. +10 −0 core/config/index.example.json
@@ -5,13 +5,14 @@
%{
var slice = [].slice
, hasOwn = {}.hasOwnProperty
+ , config = requireRoot('core/config').search
, DateUtils = requireRoot('core/lib/utils/date')
, canonicalDate$ = DateUtils.canonicalDate
, incDate$ = DateUtils.increment
, parseDate$ = DateUtils.parse;
- const DEFAULT_SIZE = 10;
- const EARLIEST_DATE = '1983-01-01';
+ const DEFAULT_SIZE = config.DEFAULT_SIZE;
+ const EARLIEST_DATE = config.EARLIEST_DATE;
function extend(first){
var i, ref, prop
@@ -2,10 +2,20 @@
"development":
{
"port": 1983
+ , "search":
+ {
+ "DEFAULT_SIZE": "10"
+ , "EARLIEST_DATE": "1983-01-01"
+ }
}
, "production":
{
"port": 80
+ , "search":
+ {
+ "DEFAULT_SIZE": "10"
+ , "EARLIEST_DATE": "1983-01-01"
+ }
}
}

0 comments on commit 9469ef0

Please sign in to comment.