mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-10 21:15:08 +00:00
use almond at production; include socketio and dataio clients to the build
This commit is contained in:
parent
4366105cf8
commit
4d07e3c71e
@ -13,7 +13,8 @@
|
||||
"bootstrap": "3.3.4",
|
||||
"font-awesome": "4.3.0",
|
||||
"react-router": "0.13.3",
|
||||
"ansi_up": "1.2.1"
|
||||
"ansi_up": "1.2.1",
|
||||
"almond": "0.3.1"
|
||||
},
|
||||
"moduleType": [
|
||||
"amd"
|
||||
|
@ -11,8 +11,9 @@
|
||||
"dev": "gulp",
|
||||
"sync": "npm install && npm prune && bower install && bower prune",
|
||||
"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"
|
||||
"build": "npm run buildJs && npm run buildHtml && git checkout static/scripts/app.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -3,8 +3,11 @@
|
||||
mainConfigFile: 'development.js',
|
||||
baseUrl: '../',
|
||||
paths: {
|
||||
socketio: 'empty:',
|
||||
_dataio: 'empty:'
|
||||
socketio: (
|
||||
'../../node_modules/socket.io/node_modules/' +
|
||||
'socket.io-client/socket.io'
|
||||
),
|
||||
_dataio: '../../node_modules/data.io/data.io',
|
||||
},
|
||||
name: 'app/app',
|
||||
preserveLicenseComments: false,
|
||||
|
@ -1,8 +1,4 @@
|
||||
|
||||
require.config({
|
||||
baseUrl: '/scripts',
|
||||
paths: {
|
||||
socketio: '/socket.io/socket.io',
|
||||
_dataio: '/data.io',
|
||||
}
|
||||
baseUrl: '/scripts'
|
||||
});
|
||||
|
@ -5,8 +5,11 @@ html
|
||||
|
||||
link(href="/css/index.css", rel="stylesheet", type="text/css")
|
||||
|
||||
script
|
||||
include ../static/js/libs/requirejs/require.js
|
||||
if env === 'development'
|
||||
script(type="text/javascript", src="/js/libs/requirejs/require.js")
|
||||
else
|
||||
script
|
||||
include ../static/js/libs/almond/almond.js
|
||||
|
||||
if env === 'development'
|
||||
script
|
||||
|
Loading…
Reference in New Issue
Block a user