/Setting up an Eclipse static web project with JS-Class-Loader

Setting up an Eclipse static web project with JS-Class-Loader

Video: Setting up an Eclipse static web project with JS-Class-Loader


this is a run-through of setting up an Eclipse project with JS-Class-Loader bundling so, first of all, we download the jar file on the github page in releases, download the latest release jar I'm going to save this to my home slash devtools folder now in Eclipse I'm going to create a new project a static web project, but any project type would be fine and in here I need to create a config file for JS-Class-Loader so I'll create a new folder called conf and call it js-class-loader.properties I need to tell it where to look for source trees, I'm going to set this to modules/* so that each folder inside modules can be the root of a source tree The bundle file, I'll set to gen (for generated) slash bundle.js and the script tags file for development, I'll set to be gen slash script-tags.

html and for now I'll set it to bundle all classes, ok. so next we need to set up a builder for JSCL. so inside the project properties, inside builders click on new program we'll call this JS-Class-Loader and the location is the java executable, so for me that's /usr/bin/java and the working directory, we want this to be the root of our web content project slash WebContent folder add the project location variable slash WebContent arguments needs to be -jar and the location of the jar file, so and then specify the config file with -c= and I'll use another variable here, project location slash conf slash js-class-loader.properties okay see if it builds "unable to access jarfile" ok that means the jar has been misnamed it should be js-class-loader-1.2.6.jar then build this again, "unknown argument" that seems to be the second half my config file name space must be confusing it, okay so I'll wrap this in quotes and build again okay "the source paths you've provided don't match anything" now we need to create the modules folder inside modules I'll create my first new module called core and I'll build again now inside WebContent the gen folder has been created with bundle and script tags the bundle only has a unique hash and script tags is empty so, so that you don't have to refresh every time lets edit this and set the refresh to specific resources JSCL Example WebContent/gen now every time we build the bundle will be regenerated now if I drop some content in there modules/core/Base.

READ  Call of Duty Strike Team Android Review Galaxy S4 - Androidizen

js build that and my bundle file now has content in place. If I drop in a larger tree of code into a different module build that bundle will now have all sorts of things inside it so I can add, remove and edit files and the bundle will always be there, built, and the correct order.