Added requirejs-plugins

- translation.json is now loaded using require-json plugin
- preparation for UI plugins

Change-Id: Ie9acbdf14471d7ceb034047cae1f41336fb4d43e
This commit is contained in:
Vitaly Kramskikh 2014-09-25 14:35:26 -07:00
parent e0913fd011
commit f3b8d801ca
4 changed files with 65 additions and 63 deletions

View File

@ -4,7 +4,8 @@
"jquery": "1.9.1",
"react": "0.11.2",
"react.backbone": "0.4.0",
"requirejs": "2.1.9",
"requirejs": "2.1.15",
"requirejs-plugins": "1.0.2",
"requirejs-text": "2.0.10",
"require-css": "0.1.0",
"lodash": "1.3.1",

118
npm-shrinkwrap.json generated
View File

@ -148,7 +148,7 @@
},
"exit": {
"version": "0.1.2",
"from": "exit@~0.1.1"
"from": "exit@~0.1.2"
},
"getobject": {
"version": "0.1.0",
@ -605,9 +605,13 @@
}
},
"inquirer": {
"version": "0.7.2",
"version": "0.7.3",
"from": "inquirer@~0.7.1",
"dependencies": {
"ansi-regex": {
"version": "1.1.0",
"from": "ansi-regex@^1.1.0"
},
"cli-color": {
"version": "0.3.2",
"from": "cli-color@~0.3.2",
@ -697,7 +701,7 @@
}
},
"rx": {
"version": "2.3.9",
"version": "2.3.11",
"from": "rx@^2.2.27"
},
"through": {
@ -747,7 +751,7 @@
"from": "object-assign@~0.3.1"
},
"uuid": {
"version": "1.4.1",
"version": "1.4.2",
"from": "uuid@~1.4.1"
}
}
@ -841,7 +845,7 @@
}
},
"rx": {
"version": "2.3.9",
"version": "2.3.11",
"from": "rx@^2.2.27"
},
"through": {
@ -924,7 +928,7 @@
},
"lru-cache": {
"version": "2.5.0",
"from": "lru-cache@~2.5.0"
"from": "lru-cache@2"
},
"mkdirp": {
"version": "0.5.0",
@ -991,7 +995,7 @@
"from": "bl@^0.9.0",
"dependencies": {
"readable-stream": {
"version": "1.0.31",
"version": "1.0.32",
"from": "readable-stream@~1.0.26",
"dependencies": {
"core-util-is": {
@ -1179,12 +1183,38 @@
"from": "stringify-object@~1.0.0"
},
"tar-fs": {
"version": "0.5.0",
"version": "0.5.2",
"from": "tar-fs@~0.5.0",
"dependencies": {
"pump": {
"version": "0.3.5",
"from": "pump@^0.3.5",
"dependencies": {
"once": {
"version": "1.2.0",
"from": "once@~1.2.0"
},
"end-of-stream": {
"version": "1.0.0",
"from": "end-of-stream@~1.0.0",
"dependencies": {
"once": {
"version": "1.3.1",
"from": "once@~1.3.0",
"dependencies": {
"wrappy": {
"version": "1.0.1",
"from": "wrappy@1"
}
}
}
}
}
}
},
"tar-stream": {
"version": "0.4.5",
"from": "tar-stream@~0.4.1",
"version": "0.4.7",
"from": "tar-stream@^0.4.6",
"dependencies": {
"bl": {
"version": "0.9.3",
@ -1207,7 +1237,7 @@
}
},
"readable-stream": {
"version": "1.0.31",
"version": "1.0.32",
"from": "readable-stream@^1.0.27-1",
"dependencies": {
"core-util-is": {
@ -1233,36 +1263,6 @@
"from": "xtend@^4.0.0"
}
}
},
"pump": {
"version": "0.3.5",
"from": "pump@~0.3.0",
"dependencies": {
"once": {
"version": "1.2.0",
"from": "once@~1.2.0"
},
"end-of-stream": {
"version": "1.0.0",
"from": "end-of-stream@~1.0.0",
"dependencies": {
"once": {
"version": "1.3.1",
"from": "once@~1.3.0",
"dependencies": {
"wrappy": {
"version": "1.0.1",
"from": "wrappy@1"
}
}
}
}
}
}
},
"mkdirp": {
"version": "0.3.5",
"from": "mkdirp@~0.3.5"
}
}
},
@ -1307,7 +1307,7 @@
"from": "object-assign@~0.3.1"
},
"uuid": {
"version": "1.4.1",
"version": "1.4.2",
"from": "uuid@~1.4.1"
}
}
@ -1321,7 +1321,7 @@
"from": "package-json@^1.0.0",
"dependencies": {
"got": {
"version": "1.2.0",
"version": "1.2.1",
"from": "got@^1.0.1",
"dependencies": {
"object-assign": {
@ -1350,7 +1350,7 @@
},
"inherits": {
"version": "2.0.1",
"from": "inherits@~2.0.0"
"from": "inherits@~2.0.1"
},
"ini": {
"version": "1.3.0",
@ -1398,7 +1398,7 @@
"dependencies": {
"ansi-regex": {
"version": "1.1.0",
"from": "ansi-regex@^1.0.0"
"from": "ansi-regex@^1.1.0"
}
}
}
@ -1432,7 +1432,7 @@
},
"colors": {
"version": "0.6.2",
"from": "colors@~0.6.0-1"
"from": "colors@~0.6.2"
},
"async": {
"version": "0.1.22",
@ -1463,7 +1463,7 @@
"from": "grunt-contrib-jshint@~0.10.0",
"dependencies": {
"jshint": {
"version": "2.5.5",
"version": "2.5.6",
"from": "jshint@~2.5.0",
"dependencies": {
"shelljs": {
@ -1505,8 +1505,8 @@
}
},
"minimatch": {
"version": "0.4.0",
"from": "minimatch@0.x.x",
"version": "1.0.0",
"from": "minimatch@1.0.x",
"dependencies": {
"lru-cache": {
"version": "2.5.0",
@ -1577,8 +1577,8 @@
"from": "exit@0.1.x"
},
"strip-json-comments": {
"version": "0.1.3",
"from": "strip-json-comments@0.1.x"
"version": "1.0.1",
"from": "strip-json-comments@1.0.x"
}
}
},
@ -1606,7 +1606,7 @@
},
"grunt-contrib-requirejs": {
"version": "0.4.4",
"from": "grunt-contrib-requirejs@~0.4.1"
"from": "grunt-contrib-requirejs@~0.4.4"
},
"grunt-debug-task": {
"version": "0.1.5",
@ -1698,7 +1698,7 @@
},
"qs": {
"version": "0.6.6",
"from": "qs@0.6.6"
"from": "qs@~0.6.0"
},
"bytes": {
"version": "0.2.1",
@ -1910,7 +1910,7 @@
},
"glob": {
"version": "4.0.6",
"from": "glob@~4.0.2",
"from": "glob@~4.0.0",
"dependencies": {
"graceful-fs": {
"version": "3.0.2",
@ -2191,7 +2191,7 @@
"from": "esprima-fb@^6001.1.0-dev-harmony-fb"
},
"jstransform": {
"version": "6.3.0",
"version": "6.3.2",
"from": "jstransform@^6.2.0",
"dependencies": {
"base62": {
@ -2328,7 +2328,7 @@
"dependencies": {
"ansi-regex": {
"version": "0.2.1",
"from": "ansi-regex@^0.2.1"
"from": "ansi-regex@^0.2.0"
}
}
},
@ -2338,7 +2338,7 @@
"dependencies": {
"ansi-regex": {
"version": "0.2.1",
"from": "ansi-regex@^0.2.1"
"from": "ansi-regex@^0.2.0"
}
}
},
@ -2349,7 +2349,7 @@
}
},
"log-symbols": {
"version": "1.0.0",
"version": "1.0.1",
"from": "log-symbols@^1.0.0"
},
"text-table": {
@ -2375,7 +2375,7 @@
"from": "bl@~0.9.0",
"dependencies": {
"readable-stream": {
"version": "1.0.31",
"version": "1.0.32",
"from": "readable-stream@~1.0.26",
"dependencies": {
"core-util-is": {

View File

@ -13,7 +13,7 @@
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-less": "~0.8.2",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-requirejs": "~0.4.4",
"grunt-debug-task": "~0.1.3",
"grunt-git-revision": "~0.0.1",
"grunt-jison": "~1.2.1",

View File

@ -37,6 +37,7 @@ requirejs.config({
cocktail: 'js/libs/bower/cocktail/Cocktail',
bootstrap: 'js/libs/custom/bootstrap.min',
text: 'js/libs/bower/requirejs-text/js/text',
json: 'js/libs/bower/requirejs-plugins/json',
i18next: 'js/libs/bower/i18next/js/i18next-1.7.1',
underscore: 'js/libs/bower/lodash/js/lodash',
deepModel: 'js/libs/bower/backbone-deep-model/js/deep-model',
@ -80,10 +81,10 @@ requirejs.config({
deps: ['jquery']
},
i18next: {
deps: ['text!i18n/translation.json', 'jquery'],
deps: ['json!i18n/translation.json', 'jquery'],
init: function(translation, $) {
'use strict';
$.i18n.init({resStore: JSON.parse(translation), fallbackLng: 'en-US'});
$.i18n.init({resStore: translation, fallbackLng: 'en-US'});
}
},
'jquery-checkbox': {