These are chat archives for stealjs/steal

2nd
Feb 2016
bgraves21
@bgraves21
Feb 02 2016 20:55
When trying to run the production js via index.html the page comes up but the code is not being executed. I have set some break points, even a javascript alert but get nothing . I do not get any errors in the console. I see the production.js is being loaded but it does not look like steal is kicking off my app. I am using canjs 2.3.13 , steal-tools 0.13.2, steal 0.13.2. App runs fine in development mode.
Kevin Phillips
@phillipskevin
Feb 02 2016 20:56
@bgraves21 do you have a main set on your script tag?
there’s a note about it at the bottom of this page: http://stealjs.com/docs/System.main.html
bgraves21
@bgraves21
Feb 02 2016 21:01
I have it set <script src="../steal/steal.production.js" config="../../stealconfig.js" data-main="checker/checker">
Kevin Phillips
@phillipskevin
Feb 02 2016 21:09
and it doesn’t load that file at all in the browser?
bgraves21
@bgraves21
Feb 02 2016 21:10
it load the file in the browser
but does not execute the main function
Kevin Phillips
@phillipskevin
Feb 02 2016 21:15
what are you using to do your build?
bgraves21
@bgraves21
Feb 02 2016 21:15
I use steal-tools kicked off by grunt

using steal.config file
steal.config({

map: {

    //    uncomment can/util/util to do a build,
        "can/util/util" : "can/util/domless/domless",
        "jquerypp": "jquerypp",
        "funcunit": "/templates/components/libraries/1.2/funcunit/3.2.3/funcunit"

},
paths: {
    "can/*" : "../can/steal/can/*.js",
    "jquery/*": "../jquery/dist/*.js"

},
shim : {
    jquery: {
        exports: "jQuery"
    },
    "/templates/components/libraries/1.2/dateinput/1.3.0/jquery.dateinput.js" :{
        deps: ["jquery/jquery.js"]
    }
},
ext: {
    stache: "can/view/stache/system",
    mustache: "can/view/mustache/system"
}

});

Kevin Phillips
@phillipskevin
Feb 02 2016 21:18
can you show the grunt task?
bgraves21
@bgraves21
Feb 02 2016 21:20
    'steal-build': {
        main:{
          options: {
            system: {
              config:  "stealconfig.js",
// baseURL: "checker",
main: "checker/checker"
// config: "package.json!npm"
},
buildOptions: {
minify: false,
debug: true
}
}
}
},
Kevin Phillips
@phillipskevin
Feb 02 2016 21:22
ok, so do you see the define block for checker/checker in the built code?
bgraves21
@bgraves21
Feb 02 2016 21:22
/checker/checker/
define('checker/checker', ['checker/components/header/views/headerInit.stache'], function (template) {
$(document).ready(function () {
alert('In checker.js');
console.log('WE ARE HERE');
});
});
Kevin Phillips
@phillipskevin
Feb 02 2016 21:23
you might need to import jquery
but if you set a breakpoint at $(document) it never gets hit?
bgraves21
@bgraves21
Feb 02 2016 21:24
correct
Kevin Phillips
@phillipskevin
Feb 02 2016 21:36
have you tried removing the document.ready stuff?
I don’t know why that would be a problem
but it’s worth a try
bgraves21
@bgraves21
Feb 02 2016 21:38
just tried it with the same results.
Justin Meyer
@justinbmeyer
Feb 02 2016 21:39
That example works
bgraves21
@bgraves21
Feb 02 2016 21:39
is there a spot in steal where it is supposed to kick the app off that I can set a breakpoint on or is there any flag or setting that will show some logs or errors or something
Justin Meyer
@justinbmeyer
Feb 02 2016 21:39
it's pointing to a proto release version of steal, but nothing should be different than the 0.13 versions
there's the site running in prod
in this example, I'm pre-loading the css and bundled steal.js with the production bundle
this is the main module where everything gets kicked off: https://github.com/bithubapp/taylored-wines/blob/master/index.js#L41
hopefully that might help
bgraves21
@bgraves21
Feb 02 2016 21:45
I have the app working in an older version of can and steal (javascriptMVC) with production js , I am working on how to upgrade. Is there anywhere in stealjs that I can set a breakpoint that may help me figure out why this is not working?