by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 20 2019 16:13
    ndelangen closed #242
  • Jul 10 2018 20:33

    operatino on master

    project on hold (compare)

  • Dec 07 2017 19:53
    Nazanin1369 opened #251
  • Oct 20 2017 16:46
    piretrus opened #250
  • Sep 11 2017 22:07
    ndelangen closed #225
  • Sep 11 2017 22:07
    ndelangen closed #228
  • Jul 24 2017 14:56
    slavko23 opened #249
  • Jun 22 2017 11:52
    operatino closed #248
  • Jun 19 2017 11:20
    8man-Jennifer edited #248
  • Jun 19 2017 11:20
    8man-Jennifer edited #248
  • Jun 19 2017 11:19
    8man-Jennifer opened #248
  • Feb 11 2017 17:42

    operatino on master

    CHANGE link to DSS project Merge pull request #4 from ndel… (compare)

  • Feb 11 2017 17:42
    operatino closed #246
  • Feb 11 2017 17:40
    operatino closed #247
  • Jan 21 2017 23:16
    webmarkelov edited #246
  • Jan 21 2017 23:11
    webmarkelov edited #246
  • Jan 21 2017 23:11
    webmarkelov edited #246
  • Jan 21 2017 23:08
    webmarkelov edited #246
  • Jan 21 2017 23:08
    webmarkelov edited #246
  • Jan 21 2017 23:06
    webmarkelov edited #246
Mark
@custa1200
Hey @operatino I have been a little unwell over the past couple of days. will try to do some more looking at my issues over the weekend
Mark
@custa1200
After playing in SourceJS a bit I've really grown to dislike EJS over Handlebars :) @operatino you mentioned somewhere I can't find now about it is possible to swap out the tempting system from EJS to Handlebars if I did some work for it. Not sure I am up to the challenge but can you point me in the right direction again?
Norbert de Langen
@ndelangen
@custa1200 Perhaps the jade-plugin can help you get started?
https://github.com/sourcejs/sourcejs-jade
Writing a middleware is much easier then I first thought, just have a look at: https://github.com/sourcejs/sourcejs-jade/blob/master/core/middleware/index.js
Arturo Aguilera
@aguilera51284
hi guys, i have a question, gulp can be used instead of grunt?
Robert Haritonov
@operatino
@aguilera51284 hi, grunt is used only for intervals development, since sourcejs is not a generator but a runtime style guide engine. For your own use, and own assets building, you can use gulp. In future versions SourceJS will be shipped without any build tools, I save use space.
Natasha Zhu
@alexenl
Привет! Подскажите, пожалуйста, есть ли возможность использовать готовые компоненты без указания их внутренней разметки? Типа %блок комментариев% ?
Robert Haritonov
@operatino
@alexenl Hi, please translate the question to english, since this is an international chat. If you feel any difficulties with that, you can ask me in PM.
@alexenl If I understoon your question right, you can use EJS imports to include other components into spec pages. That’s what availalbe out of the box, but it’s easy to implement such functionality with your own templating language using middleware plugins.
Natasha Zhu
@alexenl
@operatino Yes, you understood correctly. On english my question was: is it real to include a ready element into another without inner markup? like %comments block%? Thank you for answer, I`ll go deeper into this possibility with middlewares plugins :)
Robert Haritonov
@operatino
@alexenl heres’a jade middleware plugin for example - https://github.com/sourcejs/sourcejs-jade, it’s really straightforward. Same could be achieved with any custom rendering systems.
SimoneIrato
@SimoneIrato
Hello everybody, i'm quite a noob n trying to setup a living styleguide with sourcejs, i managed to install browsersync contrib module but i couldn't figure out the best solution to work with sass inside the environment, if i'll need to write a middleware for that or maybe there's an easier solution that i'm not aware of!
Thanks in advance!
Robert Haritonov
@operatino
@SimoneIrato Hi. Browsersync middleware will only help spying on Spec source changes (eg index.src or the output css. If you do any additonal processing, like with SASS, you’ll need to care of it separately, using Gulp or Grunt for example. The end set-up will look like this - you run SASS build with watcher, then you run SourceJS with browsersync plugin pointing to resulting the CSS.
Writing a middleware for SourceJS for compiling SASS and others is also an option, if you want to keep everything within one process, but the recommended way is to have independant build system for your project styles.
SimoneIrato
@SimoneIrato
@operatino Thanks so much for the advice, I'm compiling the sass partials with no problems at all.
Unfortunately I'll have to ask you another advice, it's getting clearer to me that I still've got a whole lot of things to learn.
I'm not getting the right workflow to include external libraries with requireJS, can't seem to make them work due to anonymous defines. Tryng to get the sense of how include libraries with requireJS the right way.
Realetive
@Realetive
Hello there. Just a noob question: what is it right way to use SCSS/LESS/Stylus sources from spec directory for live example? I need to create custom middleware for it?
Robert Haritonov
@operatino
Hi @Realetive, please check the answered question above, been answering to exaclty the same thing few days back.
Realetive
@Realetive

Many thanks, @operatino. Will try to replay. I got other question — how I can rewrite path to component with custome route?
I have my components in

<sourcejs>/user/projects/<project>/markup/components/<component>

but wanna to show it with path as

/projects/<project>/<component>

I was try to use

global.app.use( '/projects/myproject/button/', express.static( path.join( pathToApp, global.opts.core.common.pathToUser, 'projects/myproject/markup/components/button/' ) ) );

but haven't effect =(

Robert Haritonov
@operatino
This kind of redirect is possible by adding your custom routes in user/core/routes/index.js. You got the idea right, but what are you trying to do is creating a new static endpoint, when you actually need to reverse proxy from new path to real one, or you can do a redirect.
Realetive
@Realetive
Robert Haritonov
@operatino
Cool! Glad to help.
Philip Kelly
@pkelly
@operatino: I've been playing with sourcejs and really like some of the features :smile: I'm curious if there are any examples out in the wild you could point me to. I'd like to see if / how other companies are using sourcejs to create styleguides.
Robert Haritonov
@operatino
@pkelly Hey Philip, I know quite some teams/companies using SourceJS internally, but nobody tends to share their style guides publicly. Our setup with 100+ components in big social network project was really simillar to example you can see on Sourcejs.com website - https://sourcejs.com/specs/example-bootstrap-bundle/
Philip Kelly
@pkelly
Ok, cool. Thx @operatino
JustDoItSascha
@JustDoItSascha
Hey Guys, I try to use the API, but when I run http://localhost:8080/api/specs/html?id=my/spec I get this error:
  "message": "id and requested sections not found"
}
JustDoItSascha
@JustDoItSascha
It seems, that the html.json in core/api/data which is used to get the data is never updated
i tried to restart the server and run npm run build, but it never gets my custom generated specs
just docs/starting-md and docs/api/rest-api is part of the html.json
Robert Haritonov
@operatino
@justdoitSascha HTML API requires to have a PhantomJS runner, that parses the rendered sections examples and saves them to html.json. By default it’s disabled in 0.5.6 https://github.com/sourcejs/Source/blob/master/options.js#L176, enable it and restart the app to run the process.
In 0.6.0 though, we removed it from the core, with the idea of moving in it into separate plugin completely. The removal was done, but plugin wasn’t prepared yet.
Alternative options is just to use Clarify URL’s to get sections HTML https://sourcejs.com/specs/example-specs-showcase/default/?clarify=true&tpl=clear&sections=1
davido
@davicho_twitter
Hi... I am a little confused as to how sourcejs works with an existing website. I have all my styles in my scss "src" folder. How do I add those styles to sourcejs? Via webpack? Just copy them over? Seems like there would be a more out of the box configuration... I can't find anything online. Pls advise and thanks!
Robert Haritonov
@operatino
Hi @davido,
SourceJS is not processing project assets. It’s up to you to define how would you like to compile your SASS/SCSS/LESS files, which could be webpack/grunt/gulp or even a preprocessor cli.
There’s just too much build configurations to support, and we stand for extensibility and deep level of configuration.
aurel kurtula
@aurelkurtula
What is the api used for in SourceJS. Is there any tutorial or git repo example
Robert Haritonov
@operatino
@aurelkurtula Hi, all the docs are available online https://sourcejs.com/docs/api/. Public API in SourceJS is really small, and only provides spec tree info and HTML of the examples, if they are filled with PhantomJS plugin. Internal API’s for plugins are available by examples via existing plugins + here’s the doc on how to start with plugins https://sourcejs.com/docs/api/plugins/
Markus Török
@MarkusToe
hello everyone - are there any best practices for integrating angular 2 apps in sourcejs?
Ted
@fedorbirjukov
That is a good question.
Robert Haritonov
@operatino
@MarkusToe We’ll definetly need to look at this, since as far as I’m concerned, there are no good tools for Angular 2 components documentation at the moment. Please share your insights if you find some tips.
MohannadKhasawneh
@MohannadKhasawneh
Hi, I use Jade with sourcejs using "sourcejs-jade" I was wondering if there are any plans to support .pug extension?
Robert Haritonov
@operatino

Hi @MohannadKhasawneh ,

sourcejs-jade plugin code is very simple, you can draft a PR for it. Here you can see the check https://github.com/sourcejs/sourcejs-jade/blob/master/core/middleware/index.js#L14, and in SourceJS core we have req.specData["is" + capitalizedExtension] = true;, meaning that adding a check for req.specData.isPug should be enough.

neogucky
@neogucky
Hi Robert, thanks for your awesome project! One question though: I want to create a styleguide which involves bootstrap plugins (i.e. the daterangepicker) For this I need to import a js script. When I do so I get an error from require.bundle.js. Looks like you are not allowed to import scripts manually when using require.js, do you know a way around this?
Bill Pairaktaridis
@billpairaktaridis
Hey, guys! First of all, thanks for this awesome project. My team and I are really happy using it. Recently, however, I've run into a bit of an issue. I'm trying to include the source HTML (in Jade) for my widgets but the code I'm getting is after it's been altered by Javascript. Ideally, I'd like the raw HTML, pre-Javascript, as a different team will be using that code to integrate elsewhere. Any ideas?
Jennifer Simonds
@JenniSimonds_twitter
Hi there Robert. I just built a styleguide for our software company Webapp. I want to put it up on Github so It can be shared with the frontend developers (currently just local). There is a .gitignore for /user - should I delete this or how do I get around this?
Robert Haritonov
@operatino
@JenniSimonds_twitter Hi Jennifer, we suggest using the npm dependency option, as the nested folder structure you've mentioned will become obsolete with next release since it's harder to manage. Please follow this instructions to set up the project correctly https://sourcejs.com/docs/base/#from-npm, the transition should be simple, as all the rest of configuration is compatible.
John Hummel
@storfarmand

Hello,

Trying to install sourcejs and when I run the "yo sourcejs" command and answer the following questions as such,

? Which action would you like to perform? Init SourceJS in this folder
? Run SourceJS server after install? (y/N) y

I receive the following error when the server attempts to start.

/sourcejs/node_modules/bindings/bindings.js:91
throw err
^

Error: Could not locate the bindings file. Tried: ...

Any ideas on what the issue is ?

cpick-IMIS
@cpick-IMIS
Hello there, we are using sourcejs in our university team for creating a stylguide. Thank you for the great platform! We want to add new plugins to support our requirements, already added a CSS-display for spec elements and now we want to integrate user management. I would like to keep the design modular, so inside of a plugin, but so far i haven't been able to find a away to make the frontend asset files being loaded directly when entering the navigation page, but only when i open a spec. Is there a way to configure this without touching sourceJS itself?
Robert Haritonov
@operatino

The project been stale for a while and currently is in the [ON HOLD] state until we find new maintainer or original author get's back to the design systems field. SourceJS been brought to the public ahead of it's time, and turned out to be too ambitious to handle by a small team of people.

Today, the ideas SourceJS surfaced are evolving in other open source projects, like styleguidist and storybook. Email r@rhr.me if you're interested in taking over the ownership.

Negin Basiri
@neginbasiri
Hi all, just a quick question. Is it possible to use SourceJs in a webpack project?