Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Cannot build !

$
0
0
I cannot build my app... Lost 3 days searching :(, so any help is welcome !

Something must be wrong with steal.build code or doc (or more probably with my code)

If I do not use packages, with something like :
  1. steal('jquery', 'app/ctrl/main', 'app/ctrl/login', 'model/server',
  2. function($, Main, Login, Server) {
  3.   $(document).ready(function() {
  4.     Server.ping(function(usr) {
  5.       new Main('#container', {user: usr});
  6.     },
  7.     function(jqXHR, textStatus, errorThrown) {
  8.       new Login('#container', {});
  9.     });
  10. });
No package is created.
Production.js contains only:
  1. steal.packages({});

If I use packages (following the way the doc tells, I think) with something like :
  1. steal.packages('app/ctrl/main', 'app/ctrl/login');

    steal('jquery', 'model/server',
    function($, Server) {

      // =====================

      $(document).ready(function() {
        Server.ping(function(usr) {
          steal('app/ctrl/main', function(Main) {
            new Main('#container', {user: usr});
          });

        },
        function(jqXHR, textStatus, errorThrown) {
          steal('app/ctrl/login', function(Login) {
            new Login('#container', {});
          });

        });
      });

    });
The packages are created, but only the production.js is loaded. Nothing appends id prod mode.

==> In both cases, dev mode runs ok.

Can you tell me what can generate this behavior ? How can I go further in looking for my mistakes ?

Thanks for help.


Viewing all articles
Browse latest Browse all 3491

Trending Articles