Commit 3f6bd111 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Rename MID to libarsnova, fix Dojo build

parent d60f8b30
......@@ -37,7 +37,7 @@ module.exports = function (grunt) {
location: "vendor/sitepen.com/dstore"
},
{
name: "arsnova-api",
name: "libarsnova",
location: "src"
}
]
......@@ -59,12 +59,12 @@ module.exports = function (grunt) {
"dojo/request/xhr",
"dojo/selector/_loader",
"arsnova-api/audienceQuestion",
"arsnova-api/auth",
"arsnova-api/feedback",
"arsnova-api/lecturerQuestion",
"arsnova-api/session",
"arsnova-api/socket"
"libarsnova/audienceQuestion",
"libarsnova/auth",
"libarsnova/feedback",
"libarsnova/lecturerQuestion",
"libarsnova/session",
"libarsnova/socket"
],
includeShallow: [
// Only the modules listed here (ie. NOT their dependencies) will be added to the layer.
......@@ -85,7 +85,7 @@ module.exports = function (grunt) {
dojo: {
dist: {
options: {
dojo: "build/tmp/dojo/dojo.js",
dojo: "build/dojo/dojo.js",
profile: "build.profile.js",
package: ".",
releaseDir: "build/tmp"
......@@ -107,6 +107,13 @@ module.exports = function (grunt) {
src: "<%= " + outprop + ".plugins.rel %>",
dest: outdir,
dot: true
},
dojo: {
expand: true,
flatten: true,
cwd: tmpdir,
src: ["libarsnova/libarsnova.{js,js.map}", "build-report.txt"],
dest: outdir
}
},
......@@ -115,11 +122,11 @@ module.exports = function (grunt) {
files: [
{
src: "bower_components/dojo",
dest: "build/tmp/dojo"
dest: "build/dojo"
},
{
src: "node_modules/dojo-util",
dest: "build/tmp/util"
dest: "build/util"
}
]
}
......@@ -182,6 +189,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-shell");
grunt.registerTask("build-requirejs", ["clean", "jshint", "shell:bowerdeps", "amdbuild:amdloader", "amdreportjson:amdbuild", "clean:tmp"]);
grunt.registerTask("build-dojo", ["clean", "jshint", "shell:bowerdeps", "symlink:dojo", "dojo:dist", "clean:tmp"]);
grunt.registerTask("build-dojo", ["clean", "jshint", "shell:bowerdeps", "symlink:dojo", "dojo:dist", "copy:dojo"]);
grunt.registerTask("default", ["build-requirejs"]);
};
/* Dojo application profile for production */
var profile = (function () {
"use strict";
var dojoPath = "vendor/dojotoolkit.org/";
var versionFilePath = "target/tmp/dojo/version/";
return {
basePath: "../../..",
basePath: "./",
action: "release",
mini: true,
layerOptimize: "closure",
......@@ -16,11 +12,7 @@ var profile = (function () {
defaultConfig: {
async: true,
baseUrl: "app/",
paths: {
"dojo": "../lib/dojotoolkit.org/dojo",
"dstore": "../lib/sitepen.com/dstore"
},
baseUrl: "src",
hasCache: {
"config-selectorEngine": "lite"
}
......@@ -29,38 +21,31 @@ var profile = (function () {
packages: [
{
name: "dojo",
location: dojoPath + "dojo"
location: "vendor/dojotoolkit.org/dojo"
},
{
name: "dstore",
location: "vendor/sitepen.com/dstore"
},
{
name: "arsnova-api",
location: "src/main/websources/lib/thm.de/arsnova/api"
},
{
name: "arsnova-api-version",
location: versionFilePath,
main: "version"
}
],
layers: {
"dojo/dojo": {
"dojo/dojo":{
customBase: true,
include: []
},
"libarsnova/libarsnova": {
customBase: true, // do not add dojo/main automatically
boot: true,
include: [
"dojo/request/xhr",
"arsnova-api/audienceQuestion",
"arsnova-api/auth",
"arsnova-api/feedback",
"arsnova-api/lecturerQuestion",
"arsnova-api/session",
"arsnova-api/socket",
"arsnova-api-version"
"libarsnova/audienceQuestion",
"libarsnova/auth",
"libarsnova/feedback",
"libarsnova/lecturerQuestion",
"libarsnova/session",
"libarsnova/socket"
]
}
},
......
......@@ -20,12 +20,10 @@ var dojoConfig = {
<script>
require(
[
"arsnova-api-version",
"arsnova-api/globalConfig",
"arsnova-api/auth"
"libarsnova/globalConfig",
"libarsnova/auth"
],
function (version, globalConfig, auth) {
console.log("version", version);
function (globalConfig, auth) {
console.log("globalConfig", globalConfig.get());
console.log("services", auth.getServices());
}
......
......@@ -18,12 +18,12 @@
define(
[
"dojo/_base/declare",
"arsnova-api/store/RestQueryCache",
"arsnova-api/globalConfig",
"arsnova-api/session",
"arsnova-api/socket",
"arsnova-api/model/AudienceQuestion",
"arsnova-api/model/audienceQuestionPropertyMap"
"libarsnova/store/RestQueryCache",
"libarsnova/globalConfig",
"libarsnova/session",
"libarsnova/socket",
"libarsnova/model/AudienceQuestion",
"libarsnova/model/audienceQuestionPropertyMap"
],
function (declare, RestQueryCache, globalConfig, sessionModel, socket, AudienceQuestion, audienceQuestionPropertyMap) {
"use strict";
......
......@@ -20,7 +20,7 @@ define(
"dojo/string",
"dojo/request",
"dojo/Deferred",
"arsnova-api/globalConfig"
"libarsnova/globalConfig"
],
function (string, request, Deferred, globalConfig) {
"use strict";
......
......@@ -17,7 +17,7 @@
*/
define(
[
"arsnova-api/socket"
"libarsnova/socket"
],
function (socket) {
"use strict";
......
......@@ -22,16 +22,16 @@ define(
"dojo/Deferred",
"dojo/when",
"dojo/Stateful",
"arsnova-api/store/RestQueryCache",
"arsnova-api/globalConfig",
"arsnova-api/session",
"arsnova-api/socket",
"arsnova-api/model/LecturerQuestion",
"arsnova-api/model/lecturerQuestionPropertyMap",
"arsnova-api/model/AnswerChoiceSummary",
"arsnova-api/model/answerChoiceSummaryPropertyMap",
"arsnova-api/model/AnswerText",
"arsnova-api/model/answerTextPropertyMap"
"libarsnova/store/RestQueryCache",
"libarsnova/globalConfig",
"libarsnova/session",
"libarsnova/socket",
"libarsnova/model/LecturerQuestion",
"libarsnova/model/lecturerQuestionPropertyMap",
"libarsnova/model/AnswerChoiceSummary",
"libarsnova/model/answerChoiceSummaryPropertyMap",
"libarsnova/model/AnswerText",
"libarsnova/model/answerTextPropertyMap"
],
function (declare, string, Deferred, when, Stateful, RestQueryCache, globalConfig, sessionModel, socket, LecturerQuestion, lecturerQuestionPropertyMap, AnswerChoiceSummary, answerChoiceSummaryPropertyMap, AnswerText, answerTextPropertyMap) {
"use strict";
......
......@@ -21,11 +21,11 @@ define(
"dojo/_base/declare",
"dojo/Deferred",
"dojo/Stateful",
"arsnova-api/store/RestQueryCache",
"arsnova-api/globalConfig",
"arsnova-api/socket",
"arsnova-api/model/Session",
"arsnova-api/model/sessionPropertyMap"
"libarsnova/store/RestQueryCache",
"libarsnova/globalConfig",
"libarsnova/socket",
"libarsnova/model/Session",
"libarsnova/model/sessionPropertyMap"
],
function (config, declare, Deferred, Stateful, RestQueryCache, globalConfig, socket, Session, sessionPropertyMap) {
"use strict";
......
......@@ -19,7 +19,7 @@ define(
[
"dojo/when",
"dojo/request",
"arsnova-api/globalConfig"
"libarsnova/globalConfig"
],
function (when, request, globalConfig) {
"use strict";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment