by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 14 17:12
    cherifGsoul closed #5494
  • Aug 14 17:07
    cherifGsoul labeled #5490
  • Aug 14 17:05
    cherifGsoul labeled #5492
  • Aug 14 17:04
    cherifGsoul closed #5495
  • Aug 14 17:04
    cherifGsoul closed #5498
  • Aug 13 07:25
    kitoki starred canjs/canjs
  • Aug 11 17:41

    cherifGsoul on can3-youtube-terms-of-service

    (compare)

  • Aug 11 17:41

    cherifGsoul on 3.x-legacy

    Update playlist editor and add … (compare)

  • Aug 11 17:41
    cherifGsoul closed #5506
  • Aug 11 17:39
    cherifGsoul opened #5506
  • Aug 11 17:37

    cherifGsoul on can3-youtube-terms-of-service

    Update playlist editor and add … (compare)

  • Aug 10 18:09

    cherifGsoul on can4-youtube-terms-services

    (compare)

  • Aug 10 18:09

    cherifGsoul on 4.x-legacy

    Can4 youtube terms services (#5… (compare)

  • Aug 10 18:09
    cherifGsoul closed #5505
  • Aug 10 18:07
    cherifGsoul opened #5505
  • Aug 10 18:07

    cherifGsoul on can4-youtube-terms-services

    Change youtube icon in v4.canjs… (compare)

  • Aug 10 17:07

    cherifGsoul on use_new_youtube_icon

    (compare)

  • Aug 10 17:07

    cherifGsoul on 5.x-legacy

    Replace YouTube icon (#5504) (compare)

  • Aug 10 17:07
    cherifGsoul closed #5504
  • Aug 10 17:06
    cherifGsoul opened #5504
Mohamed Cherif Bouchelaghem
@cherifGsoul
nothing more
just instead of import use require
like in the docs
Christopher Oliphant
@RALifeCoach
I switched my code from es6 using imports to be standard js with require. It is still not executing the code. The load works when I specify "system": { "ext": { "stache": "can-stache" } }, in package.json
But the code doesn’t run.
If I do not have the ext in package then it generates the state.js file not found
stache.js
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach I did just this
var stache = require('can-stache');
console.log(stache);
I can see the stache object in the console
even with ES6 it work fine
Christopher Oliphant
@RALifeCoach
please show all of what you did.
Mohamed Cherif Bouchelaghem
@cherifGsoul
I will put it on a branch
Christopher Oliphant
@RALifeCoach
I need to see the invoking html and the module that you had you code in, the package json file, etc. Thanks
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok we will go step by step is the first time with can 3 for me too :)
Mohamed Cherif Bouchelaghem
@cherifGsoul
sorry I didnt ignore node_modules
Christopher Oliphant
@RALifeCoach
np
I am working along side you
I commented out everything except one console.log
Now I am adding lines back in one at a time
Mohamed Cherif Bouchelaghem
@cherifGsoul
package.json has nothing complicated
Christopher Oliphant
@RALifeCoach
yes
now require a stache template
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok
Christopher Oliphant
@RALifeCoach
I have everything back in except for the template
Mohamed Cherif Bouchelaghem
@cherifGsoul
what you mean?
Christopher Oliphant
@RALifeCoach
var Component = require('can-component');
var Map = require('can-map');
var $ = require('jquery');
var stache = require('can-stache');
// var template = require('./player-bio.stache!');
//
var PlayerBioViewModel = Map.extend({

});

console.log('ajhgjasgjahsgjhagshjgas');
Component.extend({
    tag: 'pgat-player-bio',
    template: stache('<div>Hello World</div>'),
    viewModel: PlayerBioViewModel,
    events: {
        inserted: function () {
            console.log('here and here');
        }
    }
});

$(document.body).append(stache('<pgat-player-bio></pgat-player-bio>'));
when I uncomment the template line - the code no longer runs
with the template line commented out the component loads and the cone.log values are shown
Mohamed Cherif Bouchelaghem
@cherifGsoul
just // var template = require('./player-bio.stache');
Christopher Oliphant
@RALifeCoach
yes - commented out everything works - uncommented nothing works
Mohamed Cherif Bouchelaghem
@cherifGsoul
I mean var template = require('./player-bio.stache');
without the "!"
Christopher Oliphant
@RALifeCoach
the ! prevents steal from adding .js
Mohamed Cherif Bouchelaghem
@cherifGsoul
yes I have the same error now
Christopher Oliphant
@RALifeCoach
now add that section to the package.json
  "system": {
    "ext": {
      "stache": "can-stache"
    }
  },
and put the ! back in
then you will no errors and no output
not even the console.log output
Mohamed Cherif Bouchelaghem
@cherifGsoul
yes
Christopher Oliphant
@RALifeCoach
do I need to revert to 2.3? or can this be diagnosed fairly quickly?
Mohamed Cherif Bouchelaghem
@cherifGsoul
I told you is not ready for production :)
for production use 2.3 for now
Christopher Oliphant
@RALifeCoach
okay - we will go back to 2.3
thanks for your help
Mohamed Cherif Bouchelaghem
@cherifGsoul
you are welcome
Christopher Oliphant
@RALifeCoach
can you please let me know when this is resolved
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok n