Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:45
    greenkeeper[bot] labeled #5387
  • 12:45
    greenkeeper[bot] opened #5387
  • 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

    fix(package): update can-stache… (compare)

  • 09:49
    chasenlehara edited #5384
  • 09:47
    chasenlehara edited #3864
  • 09:46
    chasenlehara edited #5383
  • Oct 17 20:12

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:12

    matthewp on v6.1.2

    Update dist for release 6.1.2 (compare)

  • Oct 17 20:04

    matthewp on master

    Update dist for release (compare)

  • Oct 17 20:04

    matthewp on v6.1.2-0

    Update dist for release 6.1.2-0 (compare)

  • Oct 17 19:17
    akbaruddin starred canjs/canjs
  • Oct 17 17:25
    matthewp edited #5384
  • Oct 17 17:00

    matthewp on can-dom-mutate-2.0.7

    (compare)

  • Oct 17 17:00

    matthewp on master

    fix(package): update can-dom-mu… Merge pull request #5386 from c… (compare)

  • Oct 17 17:00
    matthewp closed #5386
  • Oct 17 16:27
    greenkeeper[bot] labeled #5386
  • Oct 17 16:27
    greenkeeper[bot] opened #5386
  • Oct 17 16:27

    greenkeeper[bot] on can-dom-mutate-2.0.7

    fix(package): update can-dom-mu… (compare)

  • Oct 17 16:25

    matthewp on can-dom-mutate-2.0.6

    (compare)

  • Oct 17 16:24
    matthewp closed #5379
Thomas Sieverding
@Bajix
Where {name} is package.json name
Ideally though, your main file would be a stache file using done-autorender
@justinbmeyer So essentially the trick would be to use the behavior to prevent any race conditions on findAll
Christopher Oliphant
@RALifeCoach
I don’t have one of those. My html to show the component looks like this:
<!DOCTYPE html>
<html>
<head>
    <title>PGAT</title>
</head>
<body>
<script type="text/javascript" src="/js/vendor/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/js/pgatour.base.js"></script>
<script type="text/javascript" src="/js/pgatour.eventEmitter.js"></script>
<script type="text/javascript" src="/js/pgatour.baseModule.js"></script>
<script type="text/javascript" src="/js/pgatour.asyncScriptLoader.js"></script>
<script type="text/javascript" src="/js/pgatour.adTimer.js"></script>
<script type="text/javascript" src="/js/pgatour.adGroup.js"></script>
<script type="text/javascript" src="/js/pgatour.ad.js"></script>
<script type="text/javascript" src="/js/pgatour.browserActivityWatcher.js"></script>
<script src="../../../node_modules/steal/steal.js"
        main="modules/page.players-redesign/player-bio/components/player-bio"></script>
</body>
</html>
That runs okay
Thomas Sieverding
@Bajix
You should convert that into a stache file, and make it your main instead
Christopher Oliphant
@RALifeCoach
My package.json now includes this:
  "system": {
    "directories": {
      "lib": "modules"
    },
    "main": "pga-tour/page.players-redesign/player-bio/components/player-bio.js"
  },
But you want me to convert to stache.
Thomas Sieverding
@Bajix
<!DOCTYPE html>
<html>
<head>
    <title>PGAT</title>
</head>
<body>
  <can-import from="./vendor/jquery-1.10.2.min"></can-import>
  <can-import from="./pgatour.base"></can-import>
  <can-import from="./pgatour.eventEmitter"></can-import>
  <can-import from="./pgatour.baseModule"></can-import>
  <can-import from="./pgatour.asyncScriptLoader"></can-import>
  <can-import from="./pgatour.adTimer"></can-import>
  <can-import from="./pgatour.adGroup"></can-import>
  <can-import from="./pgatour.ad"></can-import>
  <can-import from="./pgatour.browserActivityWatcher"></can-import>

  {{#switch env.NODE_ENV}}
    {{#case "production"}}
      <script src="{{joinBase 'node_modules/steal/steal.production.js'}}"  main="acme/index.stache!done-autorender"></script>
    {{/case}}
    {{#default}}
      <script src="/node_modules/steal/steal.js"></script>
    {{/default}}
  {{/switch}}
</body>
</html>
Something like that
You can use can-import to load stylesheets too
This part should refer to itself main="acme/index.stache!done-autorender”
Leath Cooper
@IcculusC
is that better than using steal-css
Thomas Sieverding
@Bajix
@IcculusC steal-css is a plugin
can-import uses plugins ;)
Justin Meyer
@justinbmeyer
@Bajix yes, prevent race conditions, but also do anything else you need. From the outside world, it should look like calling getList like normal
Leath Cooper
@IcculusC
ah
would the behavior of can-import not be different though since you're importing everything at once rather than bundling it with each individual component where i twouldonly be used when that component is active
Thomas Sieverding
@Bajix
@justinbmeyer How does this work if no data matches some of the sets?
Would it try to load from the server regardless?
@IcculusC can-import behaves like require
Leath Cooper
@IcculusC
true
Thomas Sieverding
@Bajix
You’d essentially use can-import to load in all components/helpers being immediately used, as well as things like your main stylesheet that you wouldn’t want as a direct dependency of any components
Leath Cooper
@IcculusC
that makes more sense
Christopher Oliphant
@RALifeCoach
I am still getting the same crash. I have created the file index.stache. I placed it inside the modules folder. I have directories.lib = modules
Thomas Sieverding
@Bajix
My index.stache loads in app using export-as to set it up as my can.route.data instance, my main stylesheet, can/route/pushstate/, and any components immediately being used
Christopher Oliphant
@RALifeCoach
  "system": {
    "directories": {
      "lib": "modules"
    },
    "main": "pga-tour/index.stache"
  },
Thomas Sieverding
@Bajix
You need the done-autorender plugin
  "system": {
    "directories": {
      "lib": "modules"
    },
    "main": "pga-tour/index.stache!done-autorender"
  },
Christopher Oliphant
@RALifeCoach
I think there is some other problem. It still can’t find cfg.main

/git/pgatour-cq-v2/front-end/node_modules/steal-tools/lib/graph/make_graph_with_bundles.js:83
if( Array.isArray(cfg.main) ) {
^

TypeError: Cannot read property 'main' of undefined
at module.exports (/git/pgatour-cq-v2/front-end/node_modules/steal-tools/lib/graph/make_graph_with_bundles.js:83:23)

We haven’t found the magic syntax yet.
Leath Cooper
@IcculusC
looks like it cant' find your package.json at all?
Christopher Oliphant
@RALifeCoach
that’s a possibility
the package json is in the same folder that I’m running the node build.js from
Help??!??
Leath Cooper
@IcculusC
I'm at a loss lol
I haven't tried building naything in production so I hve no idea
Christopher Oliphant
@RALifeCoach
@IcculusC I appreciate your attempts to help.
Leath Cooper
@IcculusC
hey it's a collaborative industry it's how we all learn
is that supposed to say "sausage of loose coupling"
definitely never heard that term
Thomas Sieverding
@Bajix
Yea; that should say something more akin to "This is where we Monkey Patch."
Leath Cooper
@IcculusC
lol
Matthew Phillips
@matthewp
All true, but no better way that I can think of
if you want more than one map type, for example
Appreciate the feedback everyone :) Thanks for beta testing canjs 3.0
Leath Cooper
@IcculusC
I just want to know what "sausage of loose coupling" means
sounds yummy