remove scripts dir, build to js dir

This commit is contained in:
oleg 2015-07-28 20:25:08 +03:00
parent 6e11c4b23b
commit 0bdd062ada
6 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,8 @@
"buildJs": "r.js -o static/js/requirejs/buid.js",
"buildClean": "rm static/index.html",
"buildHtml": "jade views/index.jade --obj '{\"env\": \"production\"}' -o static/",
"build": "npm run buildJs && npm run buildHtml && git checkout static/scripts/app.js"
"build": "npm run buildJs && npm run buildHtml && git checkout static/js/app.build.js",
"prepublish": "npm run build"
},
"repository": {
"type": "git",

2
static/js/app.build.js Normal file
View File

@ -0,0 +1,2 @@
// client build for production replaces this file, this file exists only
// for jade include - file must exists even if include is conditional

View File

@ -13,5 +13,5 @@
preserveLicenseComments: false,
optimize: 'uglify2',
useStrict: true,
out: '../../scripts/app.js'
out: '../../js/app.build.js'
});

View File

@ -1,4 +1,3 @@
require.config({
baseUrl: '/scripts'
});

View File

View File

@ -18,7 +18,7 @@ html
script
include ../static/js/requirejs/production.js
script
include ../static/scripts/app.js
include ../static/js/app.build.js
script(type="text/javascript").
require(['app/app']);