Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Konstantin Tarkus
@koistya
@/all Welcome! :)
Konstantin Tarkus
@koistya
@/all Published generator-javascript v0.0.9 (changelog)
fergusg
@fergusg
This message was deleted

I'm brand new to ES7 async/await. Can the compile.js css (for example) be written as

const css = async (source, options)  => {
    options = options || {};
    return (await postcss.process(source, {
            from: 'docs/css/main.css',
            to: 'docs/css/main.min.css',
            map: !!options.map
        })).css;
};

i.e, without the extra Promise. It certainly seems to work but I expect I've missed something.

Konstantin Tarkus
@koistya
@fergusg, using ES7 async/await with Promise like objects (e.g. postcss.process(..) returns a LazyResult object) works fine in Babel. Not sure what the official implementations will bring, but most likely they will also work with then-able objects.
Konstantin Tarkus
@koistya
@fergusg I have changed this piece of code in tools/utils/compile.js to use ES7 async/await
Dominik
@dezet
Yea, used some of ES7 async/await at my side project, runned like week or so like a charm ;)
chetanism
@chetanism
Hi, I have a quick question. When I build my library it also outputs the original source as *.babel.js files. Just wondering what's the use for this?
Andrey Mikhaylov (lolmaus)
@lolmaus
@koistya, how do I run tests in browser? I want to make use of dev tools for debugging.
Andrey Mikhaylov (lolmaus)
@lolmaus
@koistya, ping?
Konstantin Tarkus
@koistya
@lolmaus did you check WebdriverIO? It might be a good option for testing your components in real browsers
@/all just published Babel Starter Kit v1.1.0 with unit test code coverage support via Coveralls and Istanbul
Andrey Mikhaylov (lolmaus)
@lolmaus
@koistya Not yet. Did you try plugging it into Babel Starter Kit?
Konstantin Tarkus
@koistya
@lolmaus nope, not sure yet if it's applicable to the majority of use cases
Andrey Mikhaylov (lolmaus)
@lolmaus

@koistya There's another node boilerplate that does allow running tests in the browser: https://github.com/babel/generator-babel-boilerplate

Can you implement it in Babel Starter Kit accordingly?

Konstantin Tarkus
@koistya
@lolmaus ok, will do
Konstantin Tarkus
@koistya
Just have updated README.md; added CHANGELOG.md and CONTRIBUTING.md files.
Konstantin Tarkus
@koistya
@lolmaus do you need to run unit or e2e tests in the browser?
Konstantin Tarkus
@koistya
@lolmaus here is an example, how you can run unit test in a browser environment via jsdom: https://github.com/koistya/babel-starter-kit/blob/master/docs/recipes/testing-with-mocha-and-jsdom.md
Andrey Mikhaylov (lolmaus)
@lolmaus
@koistya That's a completely different task.
@koistya JSDOM is for testing browser UI components in Node. I want the opposite -- testing a Node module in a browser, so that I can leverage Developer Tools for debugging.
Konstantin Tarkus
@koistya
@lolmaus that's why I asked you previously whether you need that for unit tests or e2e tests
@lolmaus as a rule of thumb, it's better to run unit tests with jsdom because it works much faster and easier to work with
Andrey Mikhaylov (lolmaus)
@lolmaus
@koistya JSDom is super limited. If you develop a browser package, the change of facing JSDom restrictions is too high.
@koistya And I totally would develop a standalone browser component in Babel Starter Kit, because it's so convenient.
Konstantin Tarkus
@koistya
@lolmaus as far as I understand, you just want being able to see how your UI component looks like in a browser during development and being able to debug it with Chrome Dev Tools, right?
Andrey Mikhaylov (lolmaus)
@lolmaus

@koistya Yes. But the "being able to debug it with Chrome Dev Tools" part also stands true for developing Node modules.

I just wish I had a universal starter kit, capable of building both browser and Node modules.