HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/www/french-american.org/current/node_modules/nunjucks/samples/express/pre.js
#!/usr/bin/env node

'use strict';

var precompileString = require('../..').precompileString;
var fs = require('fs');
var path = require('path');


var out = 'window.baseTmpl = ' +
precompileString(
  fs.readFileSync(path.join(__dirname, 'views/base.html'), 'utf-8'), {
    name: 'base.html',
    asFunction: true
  });

out += 'window.aboutTmpl = ' +
precompileString(
  fs.readFileSync(path.join(__dirname, 'views/about.html'), 'utf-8'), {
    name: 'about.html',
    asFunction: true
  });

fs.writeFileSync(path.join(__dirname, 'js/templates.js'), out, 'utf-8');

fs.writeFileSync(path.join(__dirname, 'js/nunjucks.js'),
  fs.readFileSync(path.join(__dirname, '../../browser/nunjucks.js'), 'utf-8'),
  'utf-8');