mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 02:49:16 +00:00
remove scripts dir, build to js dir
This commit is contained in:
parent
6e11c4b23b
commit
0bdd062ada
@ -13,7 +13,8 @@
|
|||||||
"buildJs": "r.js -o static/js/requirejs/buid.js",
|
"buildJs": "r.js -o static/js/requirejs/buid.js",
|
||||||
"buildClean": "rm static/index.html",
|
"buildClean": "rm static/index.html",
|
||||||
"buildHtml": "jade views/index.jade --obj '{\"env\": \"production\"}' -o static/",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
2
static/js/app.build.js
Normal file
2
static/js/app.build.js
Normal 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
|
@ -13,5 +13,5 @@
|
|||||||
preserveLicenseComments: false,
|
preserveLicenseComments: false,
|
||||||
optimize: 'uglify2',
|
optimize: 'uglify2',
|
||||||
useStrict: true,
|
useStrict: true,
|
||||||
out: '../../scripts/app.js'
|
out: '../../js/app.build.js'
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
require.config({
|
require.config({
|
||||||
baseUrl: '/scripts'
|
|
||||||
});
|
});
|
||||||
|
@ -18,7 +18,7 @@ html
|
|||||||
script
|
script
|
||||||
include ../static/js/requirejs/production.js
|
include ../static/js/requirejs/production.js
|
||||||
script
|
script
|
||||||
include ../static/scripts/app.js
|
include ../static/js/app.build.js
|
||||||
|
|
||||||
script(type="text/javascript").
|
script(type="text/javascript").
|
||||||
require(['app/app']);
|
require(['app/app']);
|
||||||
|
Loading…
Reference in New Issue
Block a user