[Dojo-interest] Prevent Build Wrapping a File

Fergus Hadley ferg at voidstate.com
Sun Jun 29 23:33:54 EDT 2014


Thanks Jared.

I tried to use CopyOnly but it doesn’t have any effect. My config.js is still getting wrapped in a define.

Here’s the function:

copyOnly: function( filename, mid )
{
	console.log( '[copyOnly]', filename, mid );

	if( /config\.js$/.test( filename ) )
	{
		return true;
	}
	return false;
},

Also, the console.log doesn’t show up on the command line so it’s hard to see if there’s an error in my regex. Is it possible to log messages from these resourceTags  functions?

Fergus 

e: ferg at voidstate.com
b: travelswithtriplets.com

On 30 Jun 2014, at 08:33, Jared Jurkiewicz <jared.jurkiewicz at gmail.com> wrote:

> The amd function only identifies legacy versus old files.  There is also a copyOnly function you can define which will tell the builder to just copy the file and perform no other processing.
> 
> Sincerely,
> -- Jared Jurkiewicz
> 
> 
> On Sun, Jun 29, 2014 at 9:54 AM, Fergus Hadley <ferg at voidstate.com> wrote:
> Dojo Build is wrapping my config.js file (containing dojoConfig) in a define call.
> 
> // wrapped by build app
> define("squad_builder/config", ["dojo","dijit","dojox"], function(dojo,dijit,dojos){
> 
> In my build profile I have:
> 
> resourceTags: {
> 	amd: function( filename )
> 	{
> 		if( /^config\.js$/.test( filename ) )
> 		{
> 			return false;
> 		}
> 
> 		return /\.js$/.test( filename );
> 	}
> },
> 
> Shouldn’t that stop it being seen as an AMD file?
> 
> Is there another way of having the build leave this file alone?
> 
> Cheers
> 
> Fergus 
> 
> e: ferg at voidstate.com
> b: travelswithtriplets.com
> 
> 
> --
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
> 
> Dojo-interest at mail.dojotoolkit.org
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> 
> 
> -- 
> Dojo Toolkit: http://dojotoolkit.org/
> Tutorials: http://dojotoolkit.org/documentation/
> 
> Dojo-interest at mail.dojotoolkit.org
> To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20140630/e3805fa5/attachment.htm 


More information about the Dojo-interest mailing list