-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
43 lines (34 loc) · 1.03 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var path = require('path');
var isProduction = (process.env.NODE_ENV === 'production');
/*
Allow requiring *.marko files
*/
require('marko/node-require').install();
require('marko/compiler/config').meta = true;
/*
Enable res.marko
*/
require('marko/express');
/*
Browser Refresh
*/
require('marko/browser-refresh').enable();
require('lasso/browser-refresh').enable('*.marko *.css *.less *.styl *.scss *.sass *.png *.jpeg *.jpg *.gif *.webp *.svg');
/*
Lasso
*/
require('lasso').configure({
plugins: [
require('lasso-marko') // Auto compile Marko template files
],
// Directory where generated JS and CSS bundles are written
outputDir: path.join(process.cwd(), './static'),
// URL prefix for static assets
urlPrefix: '/static',
// Only bundle up JS and CSS files in production builds
bundlingEnabled: isProduction,
// Only minify JS and CSS files in production builds
minify: isProduction,
// Only fingerprint JS and CSS files in production builds
fingerprintsEnabled: isProduction
});