Quantcast

dojo build - Module not tagged as pure AMD yet it contains AMD API applications

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dojo build - Module not tagged as pure AMD yet it contains AMD API applications

npatel
I am able to build my application using dojo 1.7.2. I am using AMD style module definition in my application. In the build I am keep getting this warning message "warn(205) Module not tagged as pure AMD yet it contains AMD API applications".

My application is building fine but I am just curious why I am getting this warning for all my custom modules.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojo build - Module not tagged as pure AMD yet it contains AMD API applications

kitsonk
Because you build profile is not properly tagging the modules as AMD, but it appears to be an AMD module.

The 1.7 builder "wraps" non AMD modules, so anything that isn't tagged as AMD it tries to wrap, but then it looks and discovers what appears to be an AMD module so it does nothing with them.  The fact that things still work is why it a "warning" instead of an "error".

On 26 March 2012 20:12, npatel <[hidden email]> wrote:
I am able to build my application using dojo 1.7.2. I am using AMD style
module definition in my application. In the build I am keep getting this
warning message "warn(205) Module not tagged as pure AMD yet it contains AMD
API applications".

My application is building fine but I am just curious why I am getting this
warning for all my custom modules.


--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojo-build-Module-not-tagged-as-pure-AMD-yet-it-contains-AMD-API-applications-tp3859086p3859086.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojo build - Module not tagged as pure AMD yet it contains AMD API applications

npatel
In reply to this post by npatel
Thanks for the quick reply.

I am confused about tagging my custom modules as AMD modules.

I have these lines of code in my profile and I am not sure what else I need to do to tag my modules as AMD
    profile --->
   
     resourceTags: {
            amd: function(filename, mid) {
                return /\.js$/.test(filename);
            }
        }
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojo build - Module not tagged as pure AMD yet it contains AMD API applications

Greg Kubisa
Are you sure the build system processes this file? It works for me with the following setup:

In the root of the package I have 2 files:
"package.json"

{
    "main":"main", 
    "dojoBuild": "myPackage.profile.js",
    ...
}

"myPackage.profile.js"

var profile = {
    resourceTags : {
        amd : function(filename, mid) {
            return /\.js$/.test(filename);
        },
        ...
    },
    ...
};

Additionally I have a main profile file which I include as a param to the build script: ../src/util/buildscripts/build.sh --profile ./sample.profile.js --release

"./sample.profile.js"

dependencies = { ...,
    layers: [ ...,
    {
        name: '../myPackage/main.js',
        dependencies: [ 'myPackage.main' ], ...
    } ],
    prefixes : [
    [ "myPackage", "../myPackage" ], ...
    ], ...   
};





On 27 March 2012 14:28, npatel <[hidden email]> wrote:
Thanks for the quick reply.

I am confused about tagging my custom modules as AMD modules.

I have these lines of code in my profile and I am not sure what else I need
to do to tag my modules as AMD
   profile --->

    resourceTags: {
           amd: function(filename, mid) {
               return /\.js$/.test(filename);
           }
       }

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/dojo-build-Module-not-tagged-as-pure-AMD-yet-it-contains-AMD-API-applications-tp3859086p3861371.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojo build - Module not tagged as pure AMD yet it contains AMD API applications

npatel

Thanks Greg, that solved my problem.

I was missing the profile file for my custom module directory.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dojo build - Module not tagged as pure AMD yet it contains AMD API applications

allnamesrtaken
Hi,

I havent gotten a really good build script up and running yet but you seem to do, and maybe others too.
Could you maybe share your build scripts and how the process is set up. I am missing this part from my github project, MyProject, which is supposed to become a boilerplate for dojo projects.
https://github.com/AllNamesRTaken/MyProject

Anyone that feel they have a good understanding of creating build scripts are more than welcome to pitch in.

Cheers,
J
Loading...