How can I properly add jquery to Eclipse? - javascript

I'm importing jquery 1.8.17 js files to Eclipse Indigo, and I have been experiencing some problems. There's several errors in js files, like "missing semicolon", etc.
The problem is that I have to meet up deadlines, and I have to solve this issues ASAP. I suspect that I'm doing something wrong like not just copying the files to WebContent folder and referencing it in the jsp page.
As an example, I'm showing the firs line of the js file where several "missing semicolon" and "syntax error" is occouring:
*/(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map")return!1;h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.17",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b)return g["inner"+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){if(typeof b!="number")return g["outer"+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&&!!a.element[0].parentNode)for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;if(b[d]>0)return!0;b[d]=1,e=b[d]>0,b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery);/*!

Try using the non-minified version of jQuery. At least then the locations of the errors will be legible.
It's available from here.

Related

Define local file

This project has to rely on older version of a SAP system. As a result some of the latest features do not work. I would like to have the "minutesStep" property of the latest "TimePicker" version, so I went to the source code and copied the latest TimePicker controls code to our old project.
I am having issues as "TimePicker" relies on the new version of "TimePickersliders" as well. I need to copy its source code as well. However I fail to make the "TimePicker" use the new "TimePickerslider" source code which I copied to the project as well.
sap.ui.define(['jquery.sap.global',
'sap/m/InputBase',
'sap/m/MaskInput',
'sap/m/MaskInputRule',
'sap/m/ResponsivePopover',
'sap/ui/core/EnabledPropagator',
'sap/ui/core/IconPool',
'sap/ui/model/type/Time',
'./TimePickerSliders'], // Here is the problem.
function(jQuery, InputBase, MaskInput, MaskInputRule, ResponsivePopover, EnabledPropagator, IconPool, TimeModel, TimePickerSliders) {
What should be the './TimePickerSliders' path, so that it includes the file in my project? Its in the same folder, but it just fails to pick it up.
Here is the Error I get:
Uncaught (in promise) Error: failed to load 'PROJECT_NAME/controls/MyTimePicker.js' from ./controls/MyTimePicker.js: Error: failed to load 'PROJECT_NAME/controls/Slider.js' from ./controls/Sliders.js: Error: failed to load 'PROJECT_NAME/controls/VisibleItem.js' from ./controls/VisibleItem.js: Error: failed to load 'PROJECT_NAME/controls/library.js' from ./controls/library.js: 404 - NOT FOUND
Is this even possible, reasonable or legal? I seem to be missing some other files as well.
If TimePickerSliders is a .js file located in your controls folder (I assume its on the same level as view and controller folders), try to call it like follows:
sap.ui.define([
...
'<project-namespace>/controls/TimePickerSliders'],
function(jQuery, InputBase, MaskInput, MaskInputRule, ResponsivePopover, EnabledPropagator, IconPool, TimeModel, TimePickerSliders) {

Eclipse: Create new JavaScript file error

To start of, i made a project in GitHub, imported it into Eclipse (kepler) with Egit, and made it a JavaScript project (with the standard javascript plugin). I worked in this project no problem. I pushed the complete project (including .project files etc. ) into GitHub.
Now, when i import this project on another computer, things go weird. I Imported it with from the GitHub repository with Egit. Then i used the import as existing project, as i uploaded all the project files with it. Now this works great and all, until i want to create a new JavaScript file.
When i do, the new Create a new JavaScript file. window apears, but when i enter a name, the Finish button remains disabled. Also, when i click one of the parent folders i get an nullpointer exception:
Can anyone tell me what i'm doing wrong here? is it a bug? can't i just import other projects on different pc's? Or is something going wrong with git?
Here is the error log:
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.NullPointerException
at org.eclipse.wst.jsdt.internal.ui.wizards.NewJSFileWizardPage.validatePage(NewJSFileWizardPage.java:122)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.handleEvent(WizardNewFileCreationPage.java:676)
at org.eclipse.ui.internal.ide.misc.ResourceAndContainerGroup.handleEvent(ResourceAndContainerGroup.java:367)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2974)
at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4752)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4614)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2443)
at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:260)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4706)
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2597)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
at org.eclipse.swt.internal.win32.OS.SetWindowTextW(Native Method)
at org.eclipse.swt.internal.win32.OS.SetWindowText(OS.java:3473)
at org.eclipse.swt.widgets.Text.setText(Text.java:2252)
at org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup.containerSelectionChanged(ContainerSelectionGroup.java:190)
at org.eclipse.ui.internal.ide.misc.ContainerSelectionGroup$1.selectionChanged(ContainerSelectionGroup.java:276)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188)
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241)
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
The problem doesn't occur when i take the next steps:
import the project with Git (projects files excluded)
add the project as a general project
convert it to a JavaScript project.
This has solved my issue, but still i would like to have an answer about what i'm doing wrong with my other method.
Greets, David

Using Crypto.js in meteor

I am trying to include some crypto.js libraries in a meteor js app (meteor version 0.6.4.1).
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/hmac-sha256.js
http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js
When I copy and paste the contents into the server/main.js file it works fine, but this makes it very un-readable.
When I put the libraries in separate files in the server directory (I also tried placing them in the lib directory) I get the error ReferenceError: CryptoJS is not defined.
gist of server/main.js:
Meteor.methods({
encrypt:function(bundleID){
return CryptoJS.HmacSHA256(string, 'something');
}
});
I also tried changing the first line of the hmac-sha256.js file from
var CryptoJS=CryptoJS||function(h,s){...
to:
CryptoJS=CryptoJS||function(h,s){...
to make it global, but this also did not work. How do I include this library properly?
In your application dir create folder 'packages/cryptojs' and put there files:
hmac-sha256.js
enc-base64-min.js
package.js
packages / cryptojs / package.js:
Package.describe({
summary: "CryptoJS"
});
Package.on_use(function (api, where) {
api.add_files(['hmac-sha256.js'], ['client','server']);
api.add_files(['enc-base64-min.js'], ['client','server']);
});
You need to modify hmac-sha256.js by changing beginning of line 7 from:
var CryptoJS=CryptoJS||function(h,s){
to:
CryptoJS=function(h,s){
After that, you can use it:
var hash = CryptoJS.HmacSHA256("Message", "secret");
var hashInBase64 = CryptoJS.enc.Base64.stringify(hash);
console.log(hashInBase64)
Example source
I followed as parhelium's guide, but still not work, then I found new way to fix this issue:
Just replace line 7 in hmac-sha512.js to this one to globalize CryptoJS object:
this.CryptoJS=this.CryptoJS
Fix the same for other cryptojs. To use with Base64, you must make sure the base64.js is loaded after other libraries.
The reason this is happening is due to the variable scoping in meteor. Try putting the cryptojs library files in /server/compatibility. This way the cryptojs library can be accessed in other files.
You could also get it working without putting it in /compatibility by removing the var used in the cryptojs source files. The thing is if you do this its harder to keep the files up to date.

Grails ui-performance plugin not working with CKEditor

I installed Grails ui-performance plugin and made the necessary changes in the code. It didn't seem to work for development, I was getting files which name was ending with "_vnull" so I disabled it for development and tried to test with a WAR file. However, when generating the WAR file I get the following error and exception:
[ERROR] 1:0:Compilation produced 55 syntax errors. in lineSource: null sourceName: null
ERROR: problem minifying /Users/maricel/.grails/1.3.5/projects/community-services/stage/plugins/ckeditor-3.4.1.1-SNAPSHOT/js/ofm/scripts/languages/ca.js: Compilation produced 55 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.
at com.studentsonly.grails.plugins.uiperformance.JsErrorReporter.runtimeError(JsErrorReporter.groovy:35)
at org.mozilla.javascript.Parser.parse(Parser.java:410)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionAndMinifyJs(ResourceVersionHelper.groovy:230)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionAndMinifyJs(ResourceVersionHelper.groovy)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionAndMinifyJs.callCurrent(Unknown Source)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.applyVersion(ResourceVersionHelper.groovy:158)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$applyVersion(ResourceVersionHelper.groovy)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$_versionResources_closure1.doCall(ResourceVersionHelper.groovy:101)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.versionResources(ResourceVersionHelper.groovy:91)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.this$2$versionResources(ResourceVersionHelper.groovy)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$this$2$versionResources.callCurrent(Unknown Source)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper.version(ResourceVersionHelper.groovy:44)
at com.studentsonly.grails.plugins.uiperformance.ResourceVersionHelper$version.call(Unknown Source)
at _Events.versionResources(_Events.groovy:36)
at _Events$_run_closure2.doCall(_Events.groovy:16)
at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:58)
at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy)
at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:327)
at War$_run_closure1.doCall(War.groovy:38)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Error executing script War: org.mozilla.javascript.EvaluatorException: Compilation produced 55 syntax errors.
Is this some conflict with the CKEditor plugin? Any idea how to fix it?
Thanks for your help!
I fixed this issue by adding an exclusion for the plugins directory:
uiperformance.exclusions = [
"**/plugins/**"
]
As suggested in this nabble post

Problem using Dojo build tool, 'could not load' error now occuring when trying to use compiled scripts

I was following along to this post by Rebecca Murphey: http://blog.rebeccamurphey.com/scaffolding-a-buildable-dojo-application
I was substituting her file structure with my own.
Running the normal version of the scripts works fine, but the moment I compile them using the build tool, the script errors.
It's very likely a small problem with how the files are referenced via my Profile.js script but maybe someone here can help me get the settings correct before running the build tool so the compiled files will work as they should.
My file structure is as follows...
/www
/Assets
/Scripts
/Classes
build.sh
Init.js
Load.js
Profile.js
/Dojo
Dojo.js
/dojo-sdk
index.html
My index.html file has the following code...
<script>
var djConfig = {
modulePaths : {
'Integralist' : '../Classes'
}
};
</script>
<script src="Assets/Scripts/Dojo/Dojo.js"></script>
<script>
dojo.require('Integralist.Init');
</script>
...and the Init.js file has the following code...
dojo.provide('Integralist.Init');
dojo.require('Integralist.Load');
dojo.declare('MyApp', null, {
constructor: function(config) {
this.version = config.version || '1.0';
this.author = config.author || 'Unknown';
}
});
var myapp = new MyApp({
author: 'Mark McDonnell'
});
alert(myapp.author);
alert(myapp.version);
...lastly, the Load.js file has nothing in it but this...
dojo.provide('Integralist.Load');
alert('I\'m the Load.js file');
...and this all runs fine. When I load index.html I get 3 alert messages, brilliant.
The problem occurs when I try to run the build tool.
Via Mac OSX i locate the /Classes/ directory and run 'sh build.sh' and the build.sh file within the /Classes/ directory consists of the following code...
cd ../../../dojo-sdk/util/buildscripts
./build.sh profileFile=../../../Assets/Scripts/Classes/Profile.js releaseDir=../../../Assets/Scripts/Release
...now, after running the build tool I have a new /Release/ directory created within my /Scripts/ directory, this /Release/ directory consists of...
/www
/Assets
/Scripts
/Release
/Integralist
/Classes
Init.js
Init.js.uncompressed.js
/dojo
--loads of dojo related files--
...I then created a separate index file called index-release-version.html and changed the script code as suggested by the article, so it looks like this...
<script src="Assets/Scripts/Release/Integralist/dojo/dojo.js"></script>
<script>
dojo.require('Integralist.Init');
</script>
...from here I get the following error...
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught Error: Could not load 'Integralist.Init'; last tried '../Integralist/Init.js'
...and just for reference my Profile.js file that is used by the build tool consists of the following (and it's here I think the problem may be)...
dependencies = {
stripConsole : 'all',
action : 'clean,release',
optimize : 'shrinksafe',
releaseName : 'Integralist',
localeList : 'en-gb',
layers: [
{
name: "../Classes/Init.js",
resourceName : "Integralist.Init",
dependencies: [
"Integralist.Init"
]
}
],
prefixes: [
[ "Integralist", "../Classes" ]
]
}
Any help really appreciated as I desperately want to get my head around how Dojo works :-)
Thanks!
M.
I'd suggest working from the repo I linked to from my blog post (http://github.com/rmurphey/dojo-scaffold) -- I double-checked that it's definitely working :) -- and make changes to it until your changes break something, rather than trying to create your own structure right off the bat.
At a glance, I'm not 100% clear why you've got a Dojo.js file inside your directory structure, (is this the base Dojo lib or something else?), but the rest of Dojo is located elsewhere. If you use the structure I proposed, you can safely remove the djConfig declaration when using the built files, but as Dan mentioned, you may need to keep it if you're using a different configuration.
Do you have that djConfig variable in your index-release-version.html? It looks like Dojo is trying to find init.js at ../Integralist/Init.js, but you somehow need to tell it to look in ../Classes/Init.js
This is what your modulePaths : {'Integralist' : '../Classes'} was doing in your Index.html

Categories

Resources