Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 08 18:30
    rscheuer starred lasso-js/lasso
  • Oct 03 23:23
    mikevel starred lasso-js/lasso
  • Sep 18 14:16
    okmttdhr starred lasso-js/lasso
  • Aug 25 18:32
    emmiep starred lasso-js/lasso
  • Aug 19 18:13

    DylanPiercey on master

    3.4.3 (compare)

  • Aug 19 18:13

    DylanPiercey on v3.4.3

    (compare)

  • Aug 19 18:11

    DylanPiercey on master

    fix: re-enable read/transform c… refactor: html slot building op… (compare)

  • Aug 10 18:29
    dependabot[bot] labeled #315
  • Aug 10 18:29
    dependabot[bot] opened #315
  • Aug 10 18:29

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.5 to 1… (compare)

  • Jul 31 05:25
    NeroBlackstone starred lasso-js/lasso
  • Jul 29 16:02
    DylanPiercey commented #314
  • Jul 29 16:01
    DylanPiercey closed #314
  • Jul 29 16:01
    DylanPiercey commented #314
  • Jul 28 05:08
    pedramphp edited #314
  • Jul 28 05:08
    pedramphp opened #314
  • Jul 23 13:57
    gurdev-r starred lasso-js/lasso
  • Jun 14 20:12
    speedupmate starred lasso-js/lasso
  • May 31 20:52
    giovannipds starred lasso-js/lasso
  • May 23 04:34
    p-raj starred lasso-js/lasso
Yoni Medoff
@yomed
@kdevan on your first question, the less plugin has an import syntax for globals, but the sass plugin might not have it implemented: https://github.com/lasso-js/lasso-less#less-imports
kdevan
@kdevan
@yomed thank you for pointing me in the right direction
Scott Davis
@scttdavs
is there a way to tell lasso to NOT bundle up certain dependencies it finds in files? Let's say a file has require("foo") and we call tell lasso to just skip over that and don't bundle up "foo" with everything else?
Yoni Medoff
@yomed
@scttdavs You can map it, similarly to handling browser-specific deps -- https://github.com/defunctzombie/package-browser-field-spec#ignore-a-module
THAC0
@gunjam
hi
lasso 3.0.0 doesn't seem to work for me, I get a Error: Render async fragment error where all my static assets timed out after 10000ms
works fine in lasso 2, and reading the stack trace the file paths all seem correct, so any idea what's going wrong?
(running node 8.9.1)
THAC0
@gunjam
specifically, it only seems to be assets loaded through the use of the <lasso-resource/> tag
those in my browser.json aren't in the list
Austin Kelleher
@austinkelleher
@gunjam Are you importing the @lasso/marko-taglib taglib?
The Lasso taglib has been removed from the Lasso project in v3
THAC0
@gunjam
yeah I am
previously I was getting an error about a lasso tag not being defined, but I fixed that by installing @lasso/marko-taglib. The problem I have now, as described above, is that the <lasso-resource/> tag is timing out when tried to load the assets
and I have no idea how to fix it :(
thanks for replying though, @austinkelleher
Charles Read
@charlesread
@austinkelleher , should https://www.npmjs.com/package/lasso still be showing v2.11.23? It was showing v3.x yesterday.
Charles Read
@charlesread
(at least I think it was, I could be completely wrong)
Max Milton
@MaxMilton
@charlesread npmjs just shows the latest release not the highest version.
Charles Read
@charlesread
Thanks
Charles Read
@charlesread
Hi folks, I have an issue where I have Lasso bundling resources when I think that it shouldn't. I am using Marko and Lasso, I have a few Marko components, working just fine, each with its own browser.json and dependencies that work just fine and are bundled up and delivered to the browser just fine. The issue is that when I want to preferentially show one of these components, like with the <if()></if> Marko tags, Lasso will still bundle up the resources of a component if the conditions of the <if()></if> evaluate to false, and deliver them to the browser, even though that which is in <if()></if> does not get rendered. Am I doing something wrong? My desire would be to have resources of components be bundled and delivered to the browser if and only if that component is to actually be rendered according to <if()></if>. (cross post from the Marko gitter)
Sandeep Vattapparambil
@SandeepVattapparambil
Hi folks I am getting a Render error. Exception: Error: Async fragment timed out after 10000ms
I am using Marko 4.7.0 and lasso 2.11.1,
the error is thrown from a component
THAC0
@gunjam
that's the error I get, but only with lasso 3.0.0
and the path it spits out in the error is definitely correct, just times out reading the file from disk?
Ian Von Holt
@ianvonholt
@SandeepVattapparambil can you post your component and lasso config?
@charlesread Lasso should still bundle the alternative to the if and else statements, especially if the statement is a browser runtime statement. If you want alternative builds, you need to use Lasso configuration bundles and conditionals to accomplish that.
Ian Von Holt
@ianvonholt
@austinkelleher @patrick-steele-idem @mlrawlings I’ve updated lasso-stylus for v3, and re-worked the tests into the current format y’all have for most of the lasso-js projects.
Austin Kelleher
@austinkelleher
@ianvonholt Awesome! Thanks for doing that. I see your PR. I will get to reviewing it tomorrow morning
Ian Von Holt
@ianvonholt
Cool. Any others that need updating?
Max Milton
@MaxMilton
Anyone got a working config to automatically split out a vendor bundle (put everything from node_modules into a seperate bundle)?
Ian Von Holt
@ianvonholt
@MaxMilton Have you setup the bundle in the Lasso config for the specific vendor scripts you want?
Max Milton
@MaxMilton
@ianvonholt no I haven't, I was just looking for a generic solution. Something equivalent to webpack's webpack.optimize.CommonsChunkPlugin, e.g. https://github.com/vuejs-templates/webpack/blob/develop/template/build/webpack.prod.conf.js#L86,L98
Max Milton
@MaxMilton
A decent starting point would for at least the marko runtime code to be in its own bundle. The marko-starter boilerplate loads a completely different bundle for each route even though there's a lot of shared code.
THAC0
@gunjam
does Lasso now also include <script>$_mod.ready();</script> and bundle some of it's own js ?
started a new marko/lasso project and getting that on all my pages, wasn't there before
THAC0
@gunjam
*now always, not now also
Csaba Kiss
@csakis
I have tried using lasso for my hapi site. After modifying the css and js files for 20 minutes, my static folder is flooded with intermediate css and js files processed by lasso. Is there any clever way, perhaps a lasso option to clean these files up?
Max Milton
@MaxMilton

So I've been playing with lasso transform plugins... for example, a while ago I made a generic PostCSS runner; https://github.com/WeAreGenki/lasso-postcss, plus some others.

I've run into an issue. Lasso runs transforms per component. Or am I mistaken? Is there any way to run a plugin on the final compiled file just before it's output?

Main reasoning being static code analysis on the whole file (e.g. a bundled JS/CSS file), plus doing minification is much more optimal when processing the entire source at once.

Max Milton
@MaxMilton
Even the core minification plugins lasso-minify-js and lasso-minify-css run per component which is a bit strange to me. I havn't had a deep dive into the lasso source yet so forgive my ignorance if there's some reasoning for this. Are you perhaps caching the output of each individual component or something?
Eldar
@Eldar-X
Hi! how can i reconfigure created lasso instance ?
Eldar
@Eldar-X
https://github.com/lasso-js/lasso/blob/master/docs/bundling.md#page-level-bundles in documents it say we have "bundles" property on <lasso-page> component but it's not working :(
Yoni Medoff
@yomed
@Eldar-X I'm not sure if the docs are outdated, but I don't see bundles in the tag attribute definitions https://github.com/lasso-js/lasso-marko-taglib/blob/7a6342733f93e4c82ba072af6e1c1fa685a3e864/marko.json#L3-L48
Eldar
@Eldar-X
@yomed :( yes me too. I think it's great feature or maybe even better if we can define bundles in browser.json
Yoni Medoff
@yomed
FWIW you should be able to set it in the .configure() command (which also takes JSON), like https://github.com/yomed/lasso-configure/blob/bf9f27de6f6a37ed6986289017a6df2168cf1dfd/index.js#L66
Jarvis Prestidge
@JarvisPrestidge
hey guys, quick question - i'm looking to use marko / lasso in an electron app. Any foreseeable gotcha's or expected issues i'd run into? I can't see any examples of anyone trying this before :grimacing:
Jarvis Prestidge
@JarvisPrestidge
Hi guys i'm trying to use lasso-cli with the watch flag (everything work as expected without it) and i'm getting some cache errors:
lasso --main src/pages/home/main.js --inject-into index.html --config lasso-config.json --watch
Config:
{
    "outputDir": "/home/jarvis/Projects/marko-path-router-demo/static",
    "minify": false,
    "bundlingEnabled": false,
    "fingerprintsEnabled": false,
    "plugins": [
        "lasso-marko"
    ],
    "urlPrefix": "%STATIC_PATH%"
}
[lasso-cli] Watching: /home/jarvis/Projects/marko-path-router-demo
[lasso-cli] Ignore rule: node_modules
[lasso-cli] Ignore rule: static
[lasso-cli] Ignore rule: .cache
[lasso-cli] Ignore rule: *.marko.js
[lasso-cli] Ignore rule: /static/
[lasso-cli] Ignore rule: /build/
[lasso-cli] Ignore rule: /index.html

Optimizing page "index"...
/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso-require/src/util/resolve.js:96
        var cache = lassoContext.cache.getSyncCache('resolveRequire');
                                       ^

TypeError: Cannot read property 'getSyncCache' of undefined
    at Object.resolveRequireCached (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso-require/src/util/resolve.js:96:40)
    at Ctor.init [as doInit] (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso-require/src/dep-require.js:240:46)
    at Ctor.init (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependencies/Dependency.js:177:32)
    at walkDependency (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependency-walker.js:91:20)
    at /home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependency-walker.js:40:17
    at series (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/raptor-async/series.js:40:13)
    at walkDependencies (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependency-walker.js:50:9)
    at /home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/dependency-walker.js:84:17
    at AsyncValue.<anonymous> (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/lasso/lib/LassoManifest.js:145:13)
    at AsyncValue.done (/home/jarvis/.nvm/versions/node/v8.9.3/lib/node_modules/lasso-cli/node_modules/raptor-async/AsyncValue.js:200:29)
works as expected without the --watch flag, any clues?
Jarvis Prestidge
@JarvisPrestidge
ooo interesting revelation: removing the --config option and bringing all the options onto the command line with the --production flag makes it all play nicely
i.e. - lasso --main src/pages/home/main.js --inject-into index.html --plugins "lasso-marko" --production --watch
however using the --development flag causes it to fail in the same way as above