Skip to content

Commit

Permalink
Make default size and earliest date config vars
Browse files Browse the repository at this point in the history
  • Loading branch information
benjreinhart committed Jun 16, 2014
1 parent aa54a9c commit 9469ef0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/search/grammar.jison
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions core/config/index.example.json
Expand Up @@ -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.