diff --git a/Makefile b/Makefile index ae0538b..c764127 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ test-cov: cov @$(MAKE) -C .cov test REPORTER=html-cov > coverage.html build: - @./bin/combo views . + @./node_modules/loader/bin/build views . start: @nohup ./node_modules/.bin/forever `pwd`/app.js >> cnode.log 2>&1 & diff --git a/bin/combo b/bin/combo deleted file mode 100755 index e930e85..0000000 --- a/bin/combo +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env node -"use strict"; -var path = require('path'); -var fs = require('fs'); -var Loader = require('loader'); - -// app/views -var viewsDir = path.join(process.cwd(), process.argv[2]); -// app/ -var baseDir = path.join(process.cwd(), process.argv[3]); - -// scan views folder, get the assets map -var scaned = Loader.scanDir(viewsDir); -console.log("Scaned:"); -console.log(scaned); - -// need minify? -var justCombo = process.argv[4]; -// combo?md5 hash -var minified = Loader.minify(baseDir, scaned, justCombo); -console.log(minified); -console.log("Compile static assets done."); - -// write the assets mapping into assets.json -fs.writeFileSync(path.join(baseDir, 'assets.json'), JSON.stringify(Loader.map(minified))); -console.log("write assets.json done. assets.json: "); -console.log(fs.readFileSync(path.join(baseDir, 'assets.json'), 'utf-8')); diff --git a/package.json b/package.json index 8c3d712..f1c688f 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "utility": "0.0.x", "marked-prettyprint": "0.2.8", "xss": "~0.0.9", - "loader": "0.0.5", + "loader": "0.0.12", "passport": "~0.1.17", "passport-github": "~0.1.5", "forever": "~0.10.11"