second
[josuexyz/.git] / node_modules / ejs / ejs.js
1 (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ejs = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
2 /*
3  * EJS Embedded JavaScript templates
4  * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *         http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18 */
19
20 'use strict';
21
22 /**
23  * @file Embedded JavaScript templating engine. {@link http://ejs.co}
24  * @author Matthew Eernisse <mde@fleegix.org>
25  * @author Tiancheng "Timothy" Gu <timothygu99@gmail.com>
26  * @project EJS
27  * @license {@link http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0}
28  */
29
30 /**
31  * EJS internal functions.
32  *
33  * Technically this "module" lies in the same file as {@link module:ejs}, for
34  * the sake of organization all the private functions re grouped into this
35  * module.
36  *
37  * @module ejs-internal
38  * @private
39  */
40
41 /**
42  * Embedded JavaScript templating engine.
43  *
44  * @module ejs
45  * @public
46  */
47
48 var fs = require('fs');
49 var path = require('path');
50 var utils = require('./utils');
51
52 var scopeOptionWarned = false;
53 var _VERSION_STRING = require('../package.json').version;
54 var _DEFAULT_OPEN_DELIMITER = '<';
55 var _DEFAULT_CLOSE_DELIMITER = '>';
56 var _DEFAULT_DELIMITER = '%';
57 var _DEFAULT_LOCALS_NAME = 'locals';
58 var _NAME = 'ejs';
59 var _REGEX_STRING = '(<%%|%%>|<%=|<%-|<%_|<%#|<%|%>|-%>|_%>)';
60 var _OPTS_PASSABLE_WITH_DATA = ['delimiter', 'scope', 'context', 'debug', 'compileDebug',
61   'client', '_with', 'rmWhitespace', 'strict', 'filename', 'async'];
62 // We don't allow 'cache' option to be passed in the data obj for
63 // the normal `render` call, but this is where Express 2 & 3 put it
64 // so we make an exception for `renderFile`
65 var _OPTS_PASSABLE_WITH_DATA_EXPRESS = _OPTS_PASSABLE_WITH_DATA.concat('cache');
66 var _BOM = /^\uFEFF/;
67
68 /**
69  * EJS template function cache. This can be a LRU object from lru-cache NPM
70  * module. By default, it is {@link module:utils.cache}, a simple in-process
71  * cache that grows continuously.
72  *
73  * @type {Cache}
74  */
75
76 exports.cache = utils.cache;
77
78 /**
79  * Custom file loader. Useful for template preprocessing or restricting access
80  * to a certain part of the filesystem.
81  *
82  * @type {fileLoader}
83  */
84
85 exports.fileLoader = fs.readFileSync;
86
87 /**
88  * Name of the object containing the locals.
89  *
90  * This variable is overridden by {@link Options}`.localsName` if it is not
91  * `undefined`.
92  *
93  * @type {String}
94  * @public
95  */
96
97 exports.localsName = _DEFAULT_LOCALS_NAME;
98
99 /**
100  * Promise implementation -- defaults to the native implementation if available
101  * This is mostly just for testability
102  *
103  * @type {Function}
104  * @public
105  */
106
107 exports.promiseImpl = (new Function('return this;'))().Promise;
108
109 /**
110  * Get the path to the included file from the parent file path and the
111  * specified path.
112  *
113  * @param {String}  name     specified path
114  * @param {String}  filename parent file path
115  * @param {Boolean} isDir    parent file path whether is directory
116  * @return {String}
117  */
118 exports.resolveInclude = function(name, filename, isDir) {
119   var dirname = path.dirname;
120   var extname = path.extname;
121   var resolve = path.resolve;
122   var includePath = resolve(isDir ? filename : dirname(filename), name);
123   var ext = extname(name);
124   if (!ext) {
125     includePath += '.ejs';
126   }
127   return includePath;
128 };
129
130 /**
131  * Get the path to the included file by Options
132  *
133  * @param  {String}  path    specified path
134  * @param  {Options} options compilation options
135  * @return {String}
136  */
137 function getIncludePath(path, options) {
138   var includePath;
139   var filePath;
140   var views = options.views;
141   var match = /^[A-Za-z]+:\\|^\//.exec(path);
142
143   // Abs path
144   if (match && match.length) {
145     includePath = exports.resolveInclude(path.replace(/^\/*/,''), options.root || '/', true);
146   }
147   // Relative paths
148   else {
149     // Look relative to a passed filename first
150     if (options.filename) {
151       filePath = exports.resolveInclude(path, options.filename);
152       if (fs.existsSync(filePath)) {
153         includePath = filePath;
154       }
155     }
156     // Then look in any views directories
157     if (!includePath) {
158       if (Array.isArray(views) && views.some(function (v) {
159         filePath = exports.resolveInclude(path, v, true);
160         return fs.existsSync(filePath);
161       })) {
162         includePath = filePath;
163       }
164     }
165     if (!includePath) {
166       throw new Error('Could not find the include file "' +
167           options.escapeFunction(path) + '"');
168     }
169   }
170   return includePath;
171 }
172
173 /**
174  * Get the template from a string or a file, either compiled on-the-fly or
175  * read from cache (if enabled), and cache the template if needed.
176  *
177  * If `template` is not set, the file specified in `options.filename` will be
178  * read.
179  *
180  * If `options.cache` is true, this function reads the file from
181  * `options.filename` so it must be set prior to calling this function.
182  *
183  * @memberof module:ejs-internal
184  * @param {Options} options   compilation options
185  * @param {String} [template] template source
186  * @return {(TemplateFunction|ClientFunction)}
187  * Depending on the value of `options.client`, either type might be returned.
188  * @static
189  */
190
191 function handleCache(options, template) {
192   var func;
193   var filename = options.filename;
194   var hasTemplate = arguments.length > 1;
195
196   if (options.cache) {
197     if (!filename) {
198       throw new Error('cache option requires a filename');
199     }
200     func = exports.cache.get(filename);
201     if (func) {
202       return func;
203     }
204     if (!hasTemplate) {
205       template = fileLoader(filename).toString().replace(_BOM, '');
206     }
207   }
208   else if (!hasTemplate) {
209     // istanbul ignore if: should not happen at all
210     if (!filename) {
211       throw new Error('Internal EJS error: no file name or template '
212                     + 'provided');
213     }
214     template = fileLoader(filename).toString().replace(_BOM, '');
215   }
216   func = exports.compile(template, options);
217   if (options.cache) {
218     exports.cache.set(filename, func);
219   }
220   return func;
221 }
222
223 /**
224  * Try calling handleCache with the given options and data and call the
225  * callback with the result. If an error occurs, call the callback with
226  * the error. Used by renderFile().
227  *
228  * @memberof module:ejs-internal
229  * @param {Options} options    compilation options
230  * @param {Object} data        template data
231  * @param {RenderFileCallback} cb callback
232  * @static
233  */
234
235 function tryHandleCache(options, data, cb) {
236   var result;
237   if (!cb) {
238     if (typeof exports.promiseImpl == 'function') {
239       return new exports.promiseImpl(function (resolve, reject) {
240         try {
241           result = handleCache(options)(data);
242           resolve(result);
243         }
244         catch (err) {
245           reject(err);
246         }
247       });
248     }
249     else {
250       throw new Error('Please provide a callback function');
251     }
252   }
253   else {
254     try {
255       result = handleCache(options)(data);
256     }
257     catch (err) {
258       return cb(err);
259     }
260
261     cb(null, result);
262   }
263 }
264
265 /**
266  * fileLoader is independent
267  *
268  * @param {String} filePath ejs file path.
269  * @return {String} The contents of the specified file.
270  * @static
271  */
272
273 function fileLoader(filePath){
274   return exports.fileLoader(filePath);
275 }
276
277 /**
278  * Get the template function.
279  *
280  * If `options.cache` is `true`, then the template is cached.
281  *
282  * @memberof module:ejs-internal
283  * @param {String}  path    path for the specified file
284  * @param {Options} options compilation options
285  * @return {(TemplateFunction|ClientFunction)}
286  * Depending on the value of `options.client`, either type might be returned
287  * @static
288  */
289
290 function includeFile(path, options) {
291   var opts = utils.shallowCopy({}, options);
292   opts.filename = getIncludePath(path, opts);
293   return handleCache(opts);
294 }
295
296 /**
297  * Get the JavaScript source of an included file.
298  *
299  * @memberof module:ejs-internal
300  * @param {String}  path    path for the specified file
301  * @param {Options} options compilation options
302  * @return {Object}
303  * @static
304  */
305
306 function includeSource(path, options) {
307   var opts = utils.shallowCopy({}, options);
308   var includePath;
309   var template;
310   includePath = getIncludePath(path, opts);
311   template = fileLoader(includePath).toString().replace(_BOM, '');
312   opts.filename = includePath;
313   var templ = new Template(template, opts);
314   templ.generateSource();
315   return {
316     source: templ.source,
317     filename: includePath,
318     template: template
319   };
320 }
321
322 /**
323  * Re-throw the given `err` in context to the `str` of ejs, `filename`, and
324  * `lineno`.
325  *
326  * @implements RethrowCallback
327  * @memberof module:ejs-internal
328  * @param {Error}  err      Error object
329  * @param {String} str      EJS source
330  * @param {String} filename file name of the EJS file
331  * @param {String} lineno   line number of the error
332  * @static
333  */
334
335 function rethrow(err, str, flnm, lineno, esc){
336   var lines = str.split('\n');
337   var start = Math.max(lineno - 3, 0);
338   var end = Math.min(lines.length, lineno + 3);
339   var filename = esc(flnm); // eslint-disable-line
340   // Error context
341   var context = lines.slice(start, end).map(function (line, i){
342     var curr = i + start + 1;
343     return (curr == lineno ? ' >> ' : '    ')
344       + curr
345       + '| '
346       + line;
347   }).join('\n');
348
349   // Alter exception message
350   err.path = filename;
351   err.message = (filename || 'ejs') + ':'
352     + lineno + '\n'
353     + context + '\n\n'
354     + err.message;
355
356   throw err;
357 }
358
359 function stripSemi(str){
360   return str.replace(/;(\s*$)/, '$1');
361 }
362
363 /**
364  * Compile the given `str` of ejs into a template function.
365  *
366  * @param {String}  template EJS template
367  *
368  * @param {Options} opts     compilation options
369  *
370  * @return {(TemplateFunction|ClientFunction)}
371  * Depending on the value of `opts.client`, either type might be returned.
372  * Note that the return type of the function also depends on the value of `opts.async`.
373  * @public
374  */
375
376 exports.compile = function compile(template, opts) {
377   var templ;
378
379   // v1 compat
380   // 'scope' is 'context'
381   // FIXME: Remove this in a future version
382   if (opts && opts.scope) {
383     if (!scopeOptionWarned){
384       console.warn('`scope` option is deprecated and will be removed in EJS 3');
385       scopeOptionWarned = true;
386     }
387     if (!opts.context) {
388       opts.context = opts.scope;
389     }
390     delete opts.scope;
391   }
392   templ = new Template(template, opts);
393   return templ.compile();
394 };
395
396 /**
397  * Render the given `template` of ejs.
398  *
399  * If you would like to include options but not data, you need to explicitly
400  * call this function with `data` being an empty object or `null`.
401  *
402  * @param {String}   template EJS template
403  * @param {Object}  [data={}] template data
404  * @param {Options} [opts={}] compilation and rendering options
405  * @return {(String|Promise<String>)}
406  * Return value type depends on `opts.async`.
407  * @public
408  */
409
410 exports.render = function (template, d, o) {
411   var data = d || {};
412   var opts = o || {};
413
414   // No options object -- if there are optiony names
415   // in the data, copy them to options
416   if (arguments.length == 2) {
417     utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA);
418   }
419
420   return handleCache(opts, template)(data);
421 };
422
423 /**
424  * Render an EJS file at the given `path` and callback `cb(err, str)`.
425  *
426  * If you would like to include options but not data, you need to explicitly
427  * call this function with `data` being an empty object or `null`.
428  *
429  * @param {String}             path     path to the EJS file
430  * @param {Object}            [data={}] template data
431  * @param {Options}           [opts={}] compilation and rendering options
432  * @param {RenderFileCallback} cb callback
433  * @public
434  */
435
436 exports.renderFile = function () {
437   var args = Array.prototype.slice.call(arguments);
438   var filename = args.shift();
439   var cb;
440   var opts = {filename: filename};
441   var data;
442   var viewOpts;
443
444   // Do we have a callback?
445   if (typeof arguments[arguments.length - 1] == 'function') {
446     cb = args.pop();
447   }
448   // Do we have data/opts?
449   if (args.length) {
450     // Should always have data obj
451     data = args.shift();
452     // Normal passed opts (data obj + opts obj)
453     if (args.length) {
454       // Use shallowCopy so we don't pollute passed in opts obj with new vals
455       utils.shallowCopy(opts, args.pop());
456     }
457     // Special casing for Express (settings + opts-in-data)
458     else {
459       // Express 3 and 4
460       if (data.settings) {
461         // Pull a few things from known locations
462         if (data.settings.views) {
463           opts.views = data.settings.views;
464         }
465         if (data.settings['view cache']) {
466           opts.cache = true;
467         }
468         // Undocumented after Express 2, but still usable, esp. for
469         // items that are unsafe to be passed along with data, like `root`
470         viewOpts = data.settings['view options'];
471         if (viewOpts) {
472           utils.shallowCopy(opts, viewOpts);
473         }
474       }
475       // Express 2 and lower, values set in app.locals, or people who just
476       // want to pass options in their data. NOTE: These values will override
477       // anything previously set in settings  or settings['view options']
478       utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS);
479     }
480     opts.filename = filename;
481   }
482   else {
483     data = {};
484   }
485
486   return tryHandleCache(opts, data, cb);
487 };
488
489 /**
490  * Clear intermediate JavaScript cache. Calls {@link Cache#reset}.
491  * @public
492  */
493
494 /**
495  * EJS template class
496  * @public
497  */
498 exports.Template = Template;
499
500 exports.clearCache = function () {
501   exports.cache.reset();
502 };
503
504 function Template(text, opts) {
505   opts = opts || {};
506   var options = {};
507   this.templateText = text;
508   this.mode = null;
509   this.truncate = false;
510   this.currentLine = 1;
511   this.source = '';
512   this.dependencies = [];
513   options.client = opts.client || false;
514   options.escapeFunction = opts.escape || opts.escapeFunction || utils.escapeXML;
515   options.compileDebug = opts.compileDebug !== false;
516   options.debug = !!opts.debug;
517   options.filename = opts.filename;
518   options.openDelimiter = opts.openDelimiter || exports.openDelimiter || _DEFAULT_OPEN_DELIMITER;
519   options.closeDelimiter = opts.closeDelimiter || exports.closeDelimiter || _DEFAULT_CLOSE_DELIMITER;
520   options.delimiter = opts.delimiter || exports.delimiter || _DEFAULT_DELIMITER;
521   options.strict = opts.strict || false;
522   options.context = opts.context;
523   options.cache = opts.cache || false;
524   options.rmWhitespace = opts.rmWhitespace;
525   options.root = opts.root;
526   options.outputFunctionName = opts.outputFunctionName;
527   options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
528   options.views = opts.views;
529   options.async = opts.async;
530
531   if (options.strict) {
532     options._with = false;
533   }
534   else {
535     options._with = typeof opts._with != 'undefined' ? opts._with : true;
536   }
537
538   this.opts = options;
539
540   this.regex = this.createRegex();
541 }
542
543 Template.modes = {
544   EVAL: 'eval',
545   ESCAPED: 'escaped',
546   RAW: 'raw',
547   COMMENT: 'comment',
548   LITERAL: 'literal'
549 };
550
551 Template.prototype = {
552   createRegex: function () {
553     var str = _REGEX_STRING;
554     var delim = utils.escapeRegExpChars(this.opts.delimiter);
555     var open = utils.escapeRegExpChars(this.opts.openDelimiter);
556     var close = utils.escapeRegExpChars(this.opts.closeDelimiter);
557     str = str.replace(/%/g, delim)
558       .replace(/</g, open)
559       .replace(/>/g, close);
560     return new RegExp(str);
561   },
562
563   compile: function () {
564     var src;
565     var fn;
566     var opts = this.opts;
567     var prepended = '';
568     var appended = '';
569     var escapeFn = opts.escapeFunction;
570     var ctor;
571
572     if (!this.source) {
573       this.generateSource();
574       prepended += '  var __output = [], __append = __output.push.bind(__output);' + '\n';
575       if (opts.outputFunctionName) {
576         prepended += '  var ' + opts.outputFunctionName + ' = __append;' + '\n';
577       }
578       if (opts._with !== false) {
579         prepended +=  '  with (' + opts.localsName + ' || {}) {' + '\n';
580         appended += '  }' + '\n';
581       }
582       appended += '  return __output.join("");' + '\n';
583       this.source = prepended + this.source + appended;
584     }
585
586     if (opts.compileDebug) {
587       src = 'var __line = 1' + '\n'
588         + '  , __lines = ' + JSON.stringify(this.templateText) + '\n'
589         + '  , __filename = ' + (opts.filename ?
590         JSON.stringify(opts.filename) : 'undefined') + ';' + '\n'
591         + 'try {' + '\n'
592         + this.source
593         + '} catch (e) {' + '\n'
594         + '  rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
595         + '}' + '\n';
596     }
597     else {
598       src = this.source;
599     }
600
601     if (opts.client) {
602       src = 'escapeFn = escapeFn || ' + escapeFn.toString() + ';' + '\n' + src;
603       if (opts.compileDebug) {
604         src = 'rethrow = rethrow || ' + rethrow.toString() + ';' + '\n' + src;
605       }
606     }
607
608     if (opts.strict) {
609       src = '"use strict";\n' + src;
610     }
611     if (opts.debug) {
612       console.log(src);
613     }
614
615     try {
616       if (opts.async) {
617         // Have to use generated function for this, since in envs without support,
618         // it breaks in parsing
619         try {
620           ctor = (new Function('return (async function(){}).constructor;'))();
621         }
622         catch(e) {
623           if (e instanceof SyntaxError) {
624             throw new Error('This environment does not support async/await');
625           }
626           else {
627             throw e;
628           }
629         }
630       }
631       else {
632         ctor = Function;
633       }
634       fn = new ctor(opts.localsName + ', escapeFn, include, rethrow', src);
635     }
636     catch(e) {
637       // istanbul ignore else
638       if (e instanceof SyntaxError) {
639         if (opts.filename) {
640           e.message += ' in ' + opts.filename;
641         }
642         e.message += ' while compiling ejs\n\n';
643         e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
644         e.message += 'https://github.com/RyanZim/EJS-Lint';
645         if (!e.async) {
646           e.message += '\n';
647           e.message += 'Or, if you meant to create an async function, pass async: true as an option.';
648         }
649       }
650       throw e;
651     }
652
653     if (opts.client) {
654       fn.dependencies = this.dependencies;
655       return fn;
656     }
657
658     // Return a callable function which will execute the function
659     // created by the source-code, with the passed data as locals
660     // Adds a local `include` function which allows full recursive include
661     var returnedFn = function (data) {
662       var include = function (path, includeData) {
663         var d = utils.shallowCopy({}, data);
664         if (includeData) {
665           d = utils.shallowCopy(d, includeData);
666         }
667         return includeFile(path, opts)(d);
668       };
669       return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]);
670     };
671     returnedFn.dependencies = this.dependencies;
672     return returnedFn;
673   },
674
675   generateSource: function () {
676     var opts = this.opts;
677
678     if (opts.rmWhitespace) {
679       // Have to use two separate replace here as `^` and `$` operators don't
680       // work well with `\r` and empty lines don't work well with the `m` flag.
681       this.templateText =
682         this.templateText.replace(/[\r\n]+/g, '\n').replace(/^\s+|\s+$/gm, '');
683     }
684
685     // Slurp spaces and tabs before <%_ and after _%>
686     this.templateText =
687       this.templateText.replace(/[ \t]*<%_/gm, '<%_').replace(/_%>[ \t]*/gm, '_%>');
688
689     var self = this;
690     var matches = this.parseTemplateText();
691     var d = this.opts.delimiter;
692     var o = this.opts.openDelimiter;
693     var c = this.opts.closeDelimiter;
694
695     if (matches && matches.length) {
696       matches.forEach(function (line, index) {
697         var opening;
698         var closing;
699         var include;
700         var includeOpts;
701         var includeObj;
702         var includeSrc;
703         // If this is an opening tag, check for closing tags
704         // FIXME: May end up with some false positives here
705         // Better to store modes as k/v with openDelimiter + delimiter as key
706         // Then this can simply check against the map
707         if ( line.indexOf(o + d) === 0        // If it is a tag
708           && line.indexOf(o + d + d) !== 0) { // and is not escaped
709           closing = matches[index + 2];
710           if (!(closing == d + c || closing == '-' + d + c || closing == '_' + d + c)) {
711             throw new Error('Could not find matching close tag for "' + line + '".');
712           }
713         }
714         // HACK: backward-compat `include` preprocessor directives
715         if ((include = line.match(/^\s*include\s+(\S+)/))) {
716           opening = matches[index - 1];
717           // Must be in EVAL or RAW mode
718           if (opening && (opening == o + d || opening == o + d + '-' || opening == o + d + '_')) {
719             includeOpts = utils.shallowCopy({}, self.opts);
720             includeObj = includeSource(include[1], includeOpts);
721             if (self.opts.compileDebug) {
722               includeSrc =
723                   '    ; (function(){' + '\n'
724                   + '      var __line = 1' + '\n'
725                   + '      , __lines = ' + JSON.stringify(includeObj.template) + '\n'
726                   + '      , __filename = ' + JSON.stringify(includeObj.filename) + ';' + '\n'
727                   + '      try {' + '\n'
728                   + includeObj.source
729                   + '      } catch (e) {' + '\n'
730                   + '        rethrow(e, __lines, __filename, __line, escapeFn);' + '\n'
731                   + '      }' + '\n'
732                   + '    ; }).call(this)' + '\n';
733             }else{
734               includeSrc = '    ; (function(){' + '\n' + includeObj.source +
735                   '    ; }).call(this)' + '\n';
736             }
737             self.source += includeSrc;
738             self.dependencies.push(exports.resolveInclude(include[1],
739               includeOpts.filename));
740             return;
741           }
742         }
743         self.scanLine(line);
744       });
745     }
746
747   },
748
749   parseTemplateText: function () {
750     var str = this.templateText;
751     var pat = this.regex;
752     var result = pat.exec(str);
753     var arr = [];
754     var firstPos;
755
756     while (result) {
757       firstPos = result.index;
758
759       if (firstPos !== 0) {
760         arr.push(str.substring(0, firstPos));
761         str = str.slice(firstPos);
762       }
763
764       arr.push(result[0]);
765       str = str.slice(result[0].length);
766       result = pat.exec(str);
767     }
768
769     if (str) {
770       arr.push(str);
771     }
772
773     return arr;
774   },
775
776   _addOutput: function (line) {
777     if (this.truncate) {
778       // Only replace single leading linebreak in the line after
779       // -%> tag -- this is the single, trailing linebreak
780       // after the tag that the truncation mode replaces
781       // Handle Win / Unix / old Mac linebreaks -- do the \r\n
782       // combo first in the regex-or
783       line = line.replace(/^(?:\r\n|\r|\n)/, '');
784       this.truncate = false;
785     }
786     if (!line) {
787       return line;
788     }
789
790     // Preserve literal slashes
791     line = line.replace(/\\/g, '\\\\');
792
793     // Convert linebreaks
794     line = line.replace(/\n/g, '\\n');
795     line = line.replace(/\r/g, '\\r');
796
797     // Escape double-quotes
798     // - this will be the delimiter during execution
799     line = line.replace(/"/g, '\\"');
800     this.source += '    ; __append("' + line + '")' + '\n';
801   },
802
803   scanLine: function (line) {
804     var self = this;
805     var d = this.opts.delimiter;
806     var o = this.opts.openDelimiter;
807     var c = this.opts.closeDelimiter;
808     var newLineCount = 0;
809
810     newLineCount = (line.split('\n').length - 1);
811
812     switch (line) {
813     case o + d:
814     case o + d + '_':
815       this.mode = Template.modes.EVAL;
816       break;
817     case o + d + '=':
818       this.mode = Template.modes.ESCAPED;
819       break;
820     case o + d + '-':
821       this.mode = Template.modes.RAW;
822       break;
823     case o + d + '#':
824       this.mode = Template.modes.COMMENT;
825       break;
826     case o + d + d:
827       this.mode = Template.modes.LITERAL;
828       this.source += '    ; __append("' + line.replace(o + d + d, o + d) + '")' + '\n';
829       break;
830     case d + d + c:
831       this.mode = Template.modes.LITERAL;
832       this.source += '    ; __append("' + line.replace(d + d + c, d + c) + '")' + '\n';
833       break;
834     case d + c:
835     case '-' + d + c:
836     case '_' + d + c:
837       if (this.mode == Template.modes.LITERAL) {
838         this._addOutput(line);
839       }
840
841       this.mode = null;
842       this.truncate = line.indexOf('-') === 0 || line.indexOf('_') === 0;
843       break;
844     default:
845       // In script mode, depends on type of tag
846       if (this.mode) {
847         // If '//' is found without a line break, add a line break.
848         switch (this.mode) {
849         case Template.modes.EVAL:
850         case Template.modes.ESCAPED:
851         case Template.modes.RAW:
852           if (line.lastIndexOf('//') > line.lastIndexOf('\n')) {
853             line += '\n';
854           }
855         }
856         switch (this.mode) {
857         // Just executing code
858         case Template.modes.EVAL:
859           this.source += '    ; ' + line + '\n';
860           break;
861           // Exec, esc, and output
862         case Template.modes.ESCAPED:
863           this.source += '    ; __append(escapeFn(' + stripSemi(line) + '))' + '\n';
864           break;
865           // Exec and output
866         case Template.modes.RAW:
867           this.source += '    ; __append(' + stripSemi(line) + ')' + '\n';
868           break;
869         case Template.modes.COMMENT:
870           // Do nothing
871           break;
872           // Literal <%% mode, append as raw output
873         case Template.modes.LITERAL:
874           this._addOutput(line);
875           break;
876         }
877       }
878       // In string mode, just add the output
879       else {
880         this._addOutput(line);
881       }
882     }
883
884     if (self.opts.compileDebug && newLineCount) {
885       this.currentLine += newLineCount;
886       this.source += '    ; __line = ' + this.currentLine + '\n';
887     }
888   }
889 };
890
891 /**
892  * Escape characters reserved in XML.
893  *
894  * This is simply an export of {@link module:utils.escapeXML}.
895  *
896  * If `markup` is `undefined` or `null`, the empty string is returned.
897  *
898  * @param {String} markup Input string
899  * @return {String} Escaped string
900  * @public
901  * @func
902  * */
903 exports.escapeXML = utils.escapeXML;
904
905 /**
906  * Express.js support.
907  *
908  * This is an alias for {@link module:ejs.renderFile}, in order to support
909  * Express.js out-of-the-box.
910  *
911  * @func
912  */
913
914 exports.__express = exports.renderFile;
915
916 // Add require support
917 /* istanbul ignore else */
918 if (require.extensions) {
919   require.extensions['.ejs'] = function (module, flnm) {
920     var filename = flnm || /* istanbul ignore next */ module.filename;
921     var options = {
922       filename: filename,
923       client: true
924     };
925     var template = fileLoader(filename).toString();
926     var fn = exports.compile(template, options);
927     module._compile('module.exports = ' + fn.toString() + ';', filename);
928   };
929 }
930
931 /**
932  * Version of EJS.
933  *
934  * @readonly
935  * @type {String}
936  * @public
937  */
938
939 exports.VERSION = _VERSION_STRING;
940
941 /**
942  * Name for detection of EJS.
943  *
944  * @readonly
945  * @type {String}
946  * @public
947  */
948
949 exports.name = _NAME;
950
951 /* istanbul ignore if */
952 if (typeof window != 'undefined') {
953   window.ejs = exports;
954 }
955
956 },{"../package.json":6,"./utils":2,"fs":3,"path":4}],2:[function(require,module,exports){
957 /*
958  * EJS Embedded JavaScript templates
959  * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
960  *
961  * Licensed under the Apache License, Version 2.0 (the "License");
962  * you may not use this file except in compliance with the License.
963  * You may obtain a copy of the License at
964  *
965  *         http://www.apache.org/licenses/LICENSE-2.0
966  *
967  * Unless required by applicable law or agreed to in writing, software
968  * distributed under the License is distributed on an "AS IS" BASIS,
969  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
970  * See the License for the specific language governing permissions and
971  * limitations under the License.
972  *
973 */
974
975 /**
976  * Private utility functions
977  * @module utils
978  * @private
979  */
980
981 'use strict';
982
983 var regExpChars = /[|\\{}()[\]^$+*?.]/g;
984
985 /**
986  * Escape characters reserved in regular expressions.
987  *
988  * If `string` is `undefined` or `null`, the empty string is returned.
989  *
990  * @param {String} string Input string
991  * @return {String} Escaped string
992  * @static
993  * @private
994  */
995 exports.escapeRegExpChars = function (string) {
996   // istanbul ignore if
997   if (!string) {
998     return '';
999   }
1000   return String(string).replace(regExpChars, '\\$&');
1001 };
1002
1003 var _ENCODE_HTML_RULES = {
1004   '&': '&amp;',
1005   '<': '&lt;',
1006   '>': '&gt;',
1007   '"': '&#34;',
1008   "'": '&#39;'
1009 };
1010 var _MATCH_HTML = /[&<>'"]/g;
1011
1012 function encode_char(c) {
1013   return _ENCODE_HTML_RULES[c] || c;
1014 }
1015
1016 /**
1017  * Stringified version of constants used by {@link module:utils.escapeXML}.
1018  *
1019  * It is used in the process of generating {@link ClientFunction}s.
1020  *
1021  * @readonly
1022  * @type {String}
1023  */
1024
1025 var escapeFuncStr =
1026   'var _ENCODE_HTML_RULES = {\n'
1027 + '      "&": "&amp;"\n'
1028 + '    , "<": "&lt;"\n'
1029 + '    , ">": "&gt;"\n'
1030 + '    , \'"\': "&#34;"\n'
1031 + '    , "\'": "&#39;"\n'
1032 + '    }\n'
1033 + '  , _MATCH_HTML = /[&<>\'"]/g;\n'
1034 + 'function encode_char(c) {\n'
1035 + '  return _ENCODE_HTML_RULES[c] || c;\n'
1036 + '};\n';
1037
1038 /**
1039  * Escape characters reserved in XML.
1040  *
1041  * If `markup` is `undefined` or `null`, the empty string is returned.
1042  *
1043  * @implements {EscapeCallback}
1044  * @param {String} markup Input string
1045  * @return {String} Escaped string
1046  * @static
1047  * @private
1048  */
1049
1050 exports.escapeXML = function (markup) {
1051   return markup == undefined
1052     ? ''
1053     : String(markup)
1054       .replace(_MATCH_HTML, encode_char);
1055 };
1056 exports.escapeXML.toString = function () {
1057   return Function.prototype.toString.call(this) + ';\n' + escapeFuncStr;
1058 };
1059
1060 /**
1061  * Naive copy of properties from one object to another.
1062  * Does not recurse into non-scalar properties
1063  * Does not check to see if the property has a value before copying
1064  *
1065  * @param  {Object} to   Destination object
1066  * @param  {Object} from Source object
1067  * @return {Object}      Destination object
1068  * @static
1069  * @private
1070  */
1071 exports.shallowCopy = function (to, from) {
1072   from = from || {};
1073   for (var p in from) {
1074     to[p] = from[p];
1075   }
1076   return to;
1077 };
1078
1079 /**
1080  * Naive copy of a list of key names, from one object to another.
1081  * Only copies property if it is actually defined
1082  * Does not recurse into non-scalar properties
1083  *
1084  * @param  {Object} to   Destination object
1085  * @param  {Object} from Source object
1086  * @param  {Array} list List of properties to copy
1087  * @return {Object}      Destination object
1088  * @static
1089  * @private
1090  */
1091 exports.shallowCopyFromList = function (to, from, list) {
1092   for (var i = 0; i < list.length; i++) {
1093     var p = list[i];
1094     if (typeof from[p] != 'undefined') {
1095       to[p] = from[p];
1096     }
1097   }
1098   return to;
1099 };
1100
1101 /**
1102  * Simple in-process cache implementation. Does not implement limits of any
1103  * sort.
1104  *
1105  * @implements Cache
1106  * @static
1107  * @private
1108  */
1109 exports.cache = {
1110   _data: {},
1111   set: function (key, val) {
1112     this._data[key] = val;
1113   },
1114   get: function (key) {
1115     return this._data[key];
1116   },
1117   remove: function (key) {
1118     delete this._data[key];
1119   },
1120   reset: function () {
1121     this._data = {};
1122   }
1123 };
1124
1125 },{}],3:[function(require,module,exports){
1126
1127 },{}],4:[function(require,module,exports){
1128 (function (process){
1129 // Copyright Joyent, Inc. and other Node contributors.
1130 //
1131 // Permission is hereby granted, free of charge, to any person obtaining a
1132 // copy of this software and associated documentation files (the
1133 // "Software"), to deal in the Software without restriction, including
1134 // without limitation the rights to use, copy, modify, merge, publish,
1135 // distribute, sublicense, and/or sell copies of the Software, and to permit
1136 // persons to whom the Software is furnished to do so, subject to the
1137 // following conditions:
1138 //
1139 // The above copyright notice and this permission notice shall be included
1140 // in all copies or substantial portions of the Software.
1141 //
1142 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1143 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1144 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
1145 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
1146 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
1147 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
1148 // USE OR OTHER DEALINGS IN THE SOFTWARE.
1149
1150 // resolves . and .. elements in a path array with directory names there
1151 // must be no slashes, empty elements, or device names (c:\) in the array
1152 // (so also no leading and trailing slashes - it does not distinguish
1153 // relative and absolute paths)
1154 function normalizeArray(parts, allowAboveRoot) {
1155   // if the path tries to go above the root, `up` ends up > 0
1156   var up = 0;
1157   for (var i = parts.length - 1; i >= 0; i--) {
1158     var last = parts[i];
1159     if (last === '.') {
1160       parts.splice(i, 1);
1161     } else if (last === '..') {
1162       parts.splice(i, 1);
1163       up++;
1164     } else if (up) {
1165       parts.splice(i, 1);
1166       up--;
1167     }
1168   }
1169
1170   // if the path is allowed to go above the root, restore leading ..s
1171   if (allowAboveRoot) {
1172     for (; up--; up) {
1173       parts.unshift('..');
1174     }
1175   }
1176
1177   return parts;
1178 }
1179
1180 // Split a filename into [root, dir, basename, ext], unix version
1181 // 'root' is just a slash, or nothing.
1182 var splitPathRe =
1183     /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
1184 var splitPath = function(filename) {
1185   return splitPathRe.exec(filename).slice(1);
1186 };
1187
1188 // path.resolve([from ...], to)
1189 // posix version
1190 exports.resolve = function() {
1191   var resolvedPath = '',
1192       resolvedAbsolute = false;
1193
1194   for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1195     var path = (i >= 0) ? arguments[i] : process.cwd();
1196
1197     // Skip empty and invalid entries
1198     if (typeof path !== 'string') {
1199       throw new TypeError('Arguments to path.resolve must be strings');
1200     } else if (!path) {
1201       continue;
1202     }
1203
1204     resolvedPath = path + '/' + resolvedPath;
1205     resolvedAbsolute = path.charAt(0) === '/';
1206   }
1207
1208   // At this point the path should be resolved to a full absolute path, but
1209   // handle relative paths to be safe (might happen when process.cwd() fails)
1210
1211   // Normalize the path
1212   resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
1213     return !!p;
1214   }), !resolvedAbsolute).join('/');
1215
1216   return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
1217 };
1218
1219 // path.normalize(path)
1220 // posix version
1221 exports.normalize = function(path) {
1222   var isAbsolute = exports.isAbsolute(path),
1223       trailingSlash = substr(path, -1) === '/';
1224
1225   // Normalize the path
1226   path = normalizeArray(filter(path.split('/'), function(p) {
1227     return !!p;
1228   }), !isAbsolute).join('/');
1229
1230   if (!path && !isAbsolute) {
1231     path = '.';
1232   }
1233   if (path && trailingSlash) {
1234     path += '/';
1235   }
1236
1237   return (isAbsolute ? '/' : '') + path;
1238 };
1239
1240 // posix version
1241 exports.isAbsolute = function(path) {
1242   return path.charAt(0) === '/';
1243 };
1244
1245 // posix version
1246 exports.join = function() {
1247   var paths = Array.prototype.slice.call(arguments, 0);
1248   return exports.normalize(filter(paths, function(p, index) {
1249     if (typeof p !== 'string') {
1250       throw new TypeError('Arguments to path.join must be strings');
1251     }
1252     return p;
1253   }).join('/'));
1254 };
1255
1256
1257 // path.relative(from, to)
1258 // posix version
1259 exports.relative = function(from, to) {
1260   from = exports.resolve(from).substr(1);
1261   to = exports.resolve(to).substr(1);
1262
1263   function trim(arr) {
1264     var start = 0;
1265     for (; start < arr.length; start++) {
1266       if (arr[start] !== '') break;
1267     }
1268
1269     var end = arr.length - 1;
1270     for (; end >= 0; end--) {
1271       if (arr[end] !== '') break;
1272     }
1273
1274     if (start > end) return [];
1275     return arr.slice(start, end - start + 1);
1276   }
1277
1278   var fromParts = trim(from.split('/'));
1279   var toParts = trim(to.split('/'));
1280
1281   var length = Math.min(fromParts.length, toParts.length);
1282   var samePartsLength = length;
1283   for (var i = 0; i < length; i++) {
1284     if (fromParts[i] !== toParts[i]) {
1285       samePartsLength = i;
1286       break;
1287     }
1288   }
1289
1290   var outputParts = [];
1291   for (var i = samePartsLength; i < fromParts.length; i++) {
1292     outputParts.push('..');
1293   }
1294
1295   outputParts = outputParts.concat(toParts.slice(samePartsLength));
1296
1297   return outputParts.join('/');
1298 };
1299
1300 exports.sep = '/';
1301 exports.delimiter = ':';
1302
1303 exports.dirname = function(path) {
1304   var result = splitPath(path),
1305       root = result[0],
1306       dir = result[1];
1307
1308   if (!root && !dir) {
1309     // No dirname whatsoever
1310     return '.';
1311   }
1312
1313   if (dir) {
1314     // It has a dirname, strip trailing slash
1315     dir = dir.substr(0, dir.length - 1);
1316   }
1317
1318   return root + dir;
1319 };
1320
1321
1322 exports.basename = function(path, ext) {
1323   var f = splitPath(path)[2];
1324   // TODO: make this comparison case-insensitive on windows?
1325   if (ext && f.substr(-1 * ext.length) === ext) {
1326     f = f.substr(0, f.length - ext.length);
1327   }
1328   return f;
1329 };
1330
1331
1332 exports.extname = function(path) {
1333   return splitPath(path)[3];
1334 };
1335
1336 function filter (xs, f) {
1337     if (xs.filter) return xs.filter(f);
1338     var res = [];
1339     for (var i = 0; i < xs.length; i++) {
1340         if (f(xs[i], i, xs)) res.push(xs[i]);
1341     }
1342     return res;
1343 }
1344
1345 // String.prototype.substr - negative index don't work in IE8
1346 var substr = 'ab'.substr(-1) === 'b'
1347     ? function (str, start, len) { return str.substr(start, len) }
1348     : function (str, start, len) {
1349         if (start < 0) start = str.length + start;
1350         return str.substr(start, len);
1351     }
1352 ;
1353
1354 }).call(this,require('_process'))
1355 },{"_process":5}],5:[function(require,module,exports){
1356 // shim for using process in browser
1357 var process = module.exports = {};
1358
1359 // cached from whatever global is present so that test runners that stub it
1360 // don't break things.  But we need to wrap it in a try catch in case it is
1361 // wrapped in strict mode code which doesn't define any globals.  It's inside a
1362 // function because try/catches deoptimize in certain engines.
1363
1364 var cachedSetTimeout;
1365 var cachedClearTimeout;
1366
1367 function defaultSetTimout() {
1368     throw new Error('setTimeout has not been defined');
1369 }
1370 function defaultClearTimeout () {
1371     throw new Error('clearTimeout has not been defined');
1372 }
1373 (function () {
1374     try {
1375         if (typeof setTimeout === 'function') {
1376             cachedSetTimeout = setTimeout;
1377         } else {
1378             cachedSetTimeout = defaultSetTimout;
1379         }
1380     } catch (e) {
1381         cachedSetTimeout = defaultSetTimout;
1382     }
1383     try {
1384         if (typeof clearTimeout === 'function') {
1385             cachedClearTimeout = clearTimeout;
1386         } else {
1387             cachedClearTimeout = defaultClearTimeout;
1388         }
1389     } catch (e) {
1390         cachedClearTimeout = defaultClearTimeout;
1391     }
1392 } ())
1393 function runTimeout(fun) {
1394     if (cachedSetTimeout === setTimeout) {
1395         //normal enviroments in sane situations
1396         return setTimeout(fun, 0);
1397     }
1398     // if setTimeout wasn't available but was latter defined
1399     if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
1400         cachedSetTimeout = setTimeout;
1401         return setTimeout(fun, 0);
1402     }
1403     try {
1404         // when when somebody has screwed with setTimeout but no I.E. maddness
1405         return cachedSetTimeout(fun, 0);
1406     } catch(e){
1407         try {
1408             // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1409             return cachedSetTimeout.call(null, fun, 0);
1410         } catch(e){
1411             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
1412             return cachedSetTimeout.call(this, fun, 0);
1413         }
1414     }
1415
1416
1417 }
1418 function runClearTimeout(marker) {
1419     if (cachedClearTimeout === clearTimeout) {
1420         //normal enviroments in sane situations
1421         return clearTimeout(marker);
1422     }
1423     // if clearTimeout wasn't available but was latter defined
1424     if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
1425         cachedClearTimeout = clearTimeout;
1426         return clearTimeout(marker);
1427     }
1428     try {
1429         // when when somebody has screwed with setTimeout but no I.E. maddness
1430         return cachedClearTimeout(marker);
1431     } catch (e){
1432         try {
1433             // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
1434             return cachedClearTimeout.call(null, marker);
1435         } catch (e){
1436             // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
1437             // Some versions of I.E. have different rules for clearTimeout vs setTimeout
1438             return cachedClearTimeout.call(this, marker);
1439         }
1440     }
1441
1442
1443
1444 }
1445 var queue = [];
1446 var draining = false;
1447 var currentQueue;
1448 var queueIndex = -1;
1449
1450 function cleanUpNextTick() {
1451     if (!draining || !currentQueue) {
1452         return;
1453     }
1454     draining = false;
1455     if (currentQueue.length) {
1456         queue = currentQueue.concat(queue);
1457     } else {
1458         queueIndex = -1;
1459     }
1460     if (queue.length) {
1461         drainQueue();
1462     }
1463 }
1464
1465 function drainQueue() {
1466     if (draining) {
1467         return;
1468     }
1469     var timeout = runTimeout(cleanUpNextTick);
1470     draining = true;
1471
1472     var len = queue.length;
1473     while(len) {
1474         currentQueue = queue;
1475         queue = [];
1476         while (++queueIndex < len) {
1477             if (currentQueue) {
1478                 currentQueue[queueIndex].run();
1479             }
1480         }
1481         queueIndex = -1;
1482         len = queue.length;
1483     }
1484     currentQueue = null;
1485     draining = false;
1486     runClearTimeout(timeout);
1487 }
1488
1489 process.nextTick = function (fun) {
1490     var args = new Array(arguments.length - 1);
1491     if (arguments.length > 1) {
1492         for (var i = 1; i < arguments.length; i++) {
1493             args[i - 1] = arguments[i];
1494         }
1495     }
1496     queue.push(new Item(fun, args));
1497     if (queue.length === 1 && !draining) {
1498         runTimeout(drainQueue);
1499     }
1500 };
1501
1502 // v8 likes predictible objects
1503 function Item(fun, array) {
1504     this.fun = fun;
1505     this.array = array;
1506 }
1507 Item.prototype.run = function () {
1508     this.fun.apply(null, this.array);
1509 };
1510 process.title = 'browser';
1511 process.browser = true;
1512 process.env = {};
1513 process.argv = [];
1514 process.version = ''; // empty string to avoid regexp issues
1515 process.versions = {};
1516
1517 function noop() {}
1518
1519 process.on = noop;
1520 process.addListener = noop;
1521 process.once = noop;
1522 process.off = noop;
1523 process.removeListener = noop;
1524 process.removeAllListeners = noop;
1525 process.emit = noop;
1526 process.prependListener = noop;
1527 process.prependOnceListener = noop;
1528
1529 process.listeners = function (name) { return [] }
1530
1531 process.binding = function (name) {
1532     throw new Error('process.binding is not supported');
1533 };
1534
1535 process.cwd = function () { return '/' };
1536 process.chdir = function (dir) {
1537     throw new Error('process.chdir is not supported');
1538 };
1539 process.umask = function() { return 0; };
1540
1541 },{}],6:[function(require,module,exports){
1542 module.exports={
1543   "name": "ejs",
1544   "description": "Embedded JavaScript templates",
1545   "keywords": [
1546     "template",
1547     "engine",
1548     "ejs"
1549   ],
1550   "version": "2.6.1",
1551   "author": "Matthew Eernisse <mde@fleegix.org> (http://fleegix.org)",
1552   "contributors": [
1553     "Timothy Gu <timothygu99@gmail.com> (https://timothygu.github.io)"
1554   ],
1555   "license": "Apache-2.0",
1556   "main": "./lib/ejs.js",
1557   "repository": {
1558     "type": "git",
1559     "url": "git://github.com/mde/ejs.git"
1560   },
1561   "bugs": "https://github.com/mde/ejs/issues",
1562   "homepage": "https://github.com/mde/ejs",
1563   "dependencies": {},
1564   "devDependencies": {
1565     "browserify": "^13.1.1",
1566     "eslint": "^4.14.0",
1567     "git-directory-deploy": "^1.5.1",
1568     "istanbul": "~0.4.3",
1569     "jake": "^8.0.16",
1570     "jsdoc": "^3.4.0",
1571     "lru-cache": "^4.0.1",
1572     "mocha": "^5.0.5",
1573     "uglify-js": "^3.3.16"
1574   },
1575   "engines": {
1576     "node": ">=0.10.0"
1577   },
1578   "scripts": {
1579     "test": "jake test",
1580     "lint": "eslint \"**/*.js\" Jakefile",
1581     "coverage": "istanbul cover node_modules/mocha/bin/_mocha",
1582     "doc": "jake doc",
1583     "devdoc": "jake doc[dev]"
1584   }
1585 }
1586
1587 },{}]},{},[1])(1)
1588 });