mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-23 17:50:19 +01:00
Bump node engine version & fix asset compression on start
This commit is contained in:
parent
2ee93a7409
commit
c5b859ec98
2 changed files with 3 additions and 3 deletions
|
@ -31,8 +31,8 @@
|
||||||
},
|
},
|
||||||
"bundledDependencies": [],
|
"bundledDependencies": [],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "0.10.35",
|
"node": "8.1.4",
|
||||||
"npm": "1.1.49"
|
"npm": "5.2.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"haste-server": "./server.js"
|
"haste-server": "./server.js"
|
||||||
|
|
|
@ -58,7 +58,7 @@ if (config.recompressStaticAssets) {
|
||||||
var pro = require('uglify-js').uglify;
|
var pro = require('uglify-js').uglify;
|
||||||
var list = fs.readdirSync('./static');
|
var list = fs.readdirSync('./static');
|
||||||
for (var j = 0; j < list.length; j++) {
|
for (var j = 0; j < list.length; j++) {
|
||||||
var item = list[i];
|
var item = list[j];
|
||||||
var orig_code, ast;
|
var orig_code, ast;
|
||||||
if ((item.indexOf('.js') === item.length - 3) && (item.indexOf('.min.js') === -1)) {
|
if ((item.indexOf('.js') === item.length - 3) && (item.indexOf('.min.js') === -1)) {
|
||||||
var dest = item.substring(0, item.length - 3) + '.min' + item.substring(item.length - 3);
|
var dest = item.substring(0, item.length - 3) + '.min' + item.substring(item.length - 3);
|
||||||
|
|
Loading…
Reference in a new issue