Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ovidiu Cherecheș
    @skidding
    how would you capture all those component outputs?
    Sergey Lapin
    @sergey-lapin
    With some worker process I guess and store it outside of repo
    Ovidiu Cherecheș
    @skidding
    you could take a screenshot of each and store them on the drive to open later
    Sergey Lapin
    @sergey-lapin
    manually?
    Ovidiu Cherecheș
    @skidding
    no no
    we use this at work for example: https://github.com/Huddle/PhantomCSS
    but I'm sure there are more ways to take a screenshot of a webpack programatically
    s/webpack/webpage
    :)
    Sergey Lapin
    @sergey-lapin
    s/webpack/webpage ?
    Ovidiu Cherecheș
    @skidding
    I meant webpack and wrote webpack :))
    webpage, dammit
    it's like I have autocomplete. wrote webpack a lot these days
    Sergey Lapin
    @sergey-lapin
    https://github.com/Huddle/PhantomCSS - it is post analize stuff first you need to grab all needed data - snapshots and their meta
    what is webpage?
    Ovidiu Cherecheș
    @skidding
    a web page, just a URL you can open in a browser
    Sergey Lapin
    @sergey-lapin
    hah
    Ovidiu Cherecheș
    @skidding
    anyway, this is why ComponentPlayground has a "full screen" button, so you can take a screenshot programmatically of a component in a given state/snapshot
    Sergey Lapin
    @sergey-lapin
    in js u never know whenever new fancy framework appears)
    webpage.js
    Ovidiu Cherecheș
    @skidding
    heh
    Sergey Lapin
    @sergey-lapin
    I mean it just would be interesting and useful to have whole history of playground. My idea is just clone original repo and traverse all commits, simple and dirty
    Only tricky thing is to find playground in repo maybe some meta or strict format required
    Sergey Lapin
    @sergey-lapin
    Commits are immutable thing so no need to traverse another time, cache saves as all
    Ovidiu Cherecheș
    @skidding
    you mean for the playground to read git commit meta data?
    Sergey Lapin
    @sergey-lapin
    No to find playground in repo - its location. Identify that it is a playground and render all components preferably to stream and with some info about initial fixtures, name, etc..
    If there no playground founded fall out
    You can label some folder with some special config file (playground.conf.js) or proc will check folder with some other criteria
    Ovidiu Cherecheș
    @skidding
    ok, I think I understood. pretty wild, yeah :)
    Sergey Lapin
    @sergey-lapin
    I can do git traverse thing, but it would be cool if you prepare cosmos in that way, if you like an idea
    Ovidiu Cherecheș
    @skidding
    well you need the components and fixtures folders, other than that node_modules/.bin/component-playgroundwill work on any given commit
    Sergey Lapin
    @sergey-lapin
    Are you sure that every user of cosmos will keep component-playground in path root/component-playground? it should be some strict criteria, maybe "component-playground" name of folder, or some meta config file with special name. It is up to you to decide
    This message was deleted
    var rootPath = path.join(__dirname, '..'), playgroundPath = path.join(rootPath, 'component-playground'); hardcode =(
    Ovidiu Cherecheș
    @skidding
    those paths are inside the cosmos package, not the project using it
    also, you can put the components and the fixtures in different places and specify their path like node_modules/.bin/component-playground --components-path src/components --fixtures-path tests/fixtures
    Sergey Lapin
    @sergey-lapin
    Again in that case I can’t if I dump robo recognize where user fixtures and components located
    Ovidiu Cherecheș
    @skidding
    I think it's a bit confusing because before you had the playground in your project, now it's just an executable from the cosmos package. so it has no more boilerplate
    well you should know where components/fixtures are are located per project, otherwise you're kinda blindfolded...
    Sergey Lapin
    @sergey-lapin
    This is exactlly what I am talking about
    If there is no meta in repo I can’t know
    Ovidiu Cherecheș
    @skidding
    yeah.. component-playground.config.js seems like the future to replace the --components-path src/components --fixtures-path tests/fixtures cli args
    Sergey Lapin
    @sergey-lapin
    That would be great=)
    Ovidiu Cherecheș
    @skidding
    :dancers:
    Dan Weaver
    @dan-weaver
    hey what happened to the site with all the documentation
    does it still exist?
    Ovidiu Cherecheș
    @skidding
    well it got split in more pieces
    and the philosophical stuff in the wiki :) https://github.com/skidding/cosmos/wiki