Hi,
stealJS is running itself, but I have some problems with jquery and canJS.
I tried out the StealJS quickstart and it works using a few workarounds form here
Then I downloaded CanJS from here whoch I expected to be the right one working with new steal.
Now I try:
main.js
where myapp/core/init.js is
and stealconfig.js is
I have two issues with this.
First is that the app tries to load init.mustache.js instead of init.mustache.
Second is, that it throws
when I comment out the paths value
I have no clou...
stealJS is running itself, but I have some problems with jquery and canJS.
I tried out the StealJS quickstart and it works using a few workarounds form here
Then I downloaded CanJS from here whoch I expected to be the right one working with new steal.
Now I try:
main.js
- import $ from "jquery";
- steal(
- 'myapp/core/init',
- function(Init){
- new Init($('body'));
- })
where myapp/core/init.js is
- steal('can', './init.mustache', function(can, Initview){
- return can.Control(
- {
- defaults : {}
- },
- {
- init : function(){
- this.element.html(initView({}))
- }
- }
and stealconfig.js is
- System.config({
- paths: {
- jquery: "bower_components/jquery/dist/jquery.js",
- 'jquery/*': "bower_components/jquery/dist/*.js",
- 'can/*' : 'bower_components/CanJS/*.js'
- },
- ext: {
- mustache: "can/view/mustache/system.js"
- },
- meta: {jquery: { exports: "jQuery" } }
- });
I have two issues with this.
First is that the app tries to load init.mustache.js instead of init.mustache.
Second is, that it throws
- Potentially unhandled rejection [2] @https://1.test2/bower_components/steal/steal.js line 4666 > eval:738:3 steal/stealInstantiateResult.execute@https://1.test2/bower_components/steal/steal.js:5299:15 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3159:1 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 link@https://1.test2/bower_components/steal/steal.js:3035:11 register/loader.instantiate/</<.execute@https://1.test2/bower_components/steal/steal.js:3326:11 link@https://1.test2/bower_components/steal/steal.js:2001:17 doLink@https://1.test2/bower_components/steal/steal.js:1799:9 updateLinkSetOnLoad@https://1.test2/bower_components/steal/steal.js:1843:11 proceedToTranslate/<@https://1.test2/bower_components/steal/steal.js:1681:11 tryCatchReject@https://1.test2/bower_components/steal/steal.js:1083:5 makePromise/FulfilledHandler.prototype.when@https://1.test2/bower_components/steal/steal.js:879:5 makePromise/DeferredHandler.prototype.run@https://1.test2/bower_components/steal/steal.js:729:5 [7]</</</Scheduler.prototype._drain@https://1.test2/bower_components/steal/steal.js:1181:4 Scheduler/this.drain@https://1.test2/bower_components/steal/steal.js:1146:4 run@https://1.test2/bower_components/steal/steal.js:144:5
- //import $ from "jquery";
error
TypeError: steal.type is not a function
|
|
-
@https://1.test2/bower_components/steal/steal.js line 4666 > eval:738:3 steal/stealInstantiateResult.execute@https://1.test2/bower_components/steal/steal.js:5299:15 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3159:1 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 linkDynamicModule@https://1.test2/bower_components/steal/steal.js:3138:11 link@https://1.test2/bower_components/steal/steal.js:3035:11 register/loader.instantiate/</<.execute@https://1.test2/bower_components/steal/steal.js:3326:11 link@https://1.test2/bower_components/steal/steal.js:2001:17 doLink@https://1.test2/bower_components/steal/steal.js:1799:9 updateLinkSetOnLoad@https://1.test2/bower_components/steal/steal.js:1843:11 proceedToTranslate/<@https://1.test2/bower_components/steal/steal.js:1681:11 tryCatchReject@https://1.test2/bower_components/steal/steal.js:1083:5 makePromise/FulfilledHandler.prototype.when@https://1.test2/bower_components/steal/steal.js:879:5 makePromise/DeferredHandler.prototype.run@https://1.test2/bower_components/steal/steal.js:729:5 [7]</</</Scheduler.prototype._drain@https://1.test2/bower_components/steal/steal.js:1181:4 Scheduler/this.drain@https://1.test2/bower_components/steal/steal.js:1146:4 run@https://1.test2/bower_components/steal/steal.js:144:5
when I comment out the paths value
- // 'jquery/*': "bower_components/jquery/dist/*.js",
I have no clou...