Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make default size and earliest date config vars

  • Loading branch information...
commit 9469ef0fd7f27362546362e20db29e0642e88616 1 parent aa54a9c
@benjreinhart benjreinhart authored
Showing with 13 additions and 2 deletions.
  1. +3 −2 components/search/grammar.jison
  2. +10 −0 core/config/index.example.json
View
5 components/search/grammar.jison
@@ -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
View
10 core/config/index.example.json
@@ -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"
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.