Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider CLI JS -> CSS converter #23

Open
nwmcsween opened this issue Mar 18, 2016 · 6 comments
Open

Consider CLI JS -> CSS converter #23

nwmcsween opened this issue Mar 18, 2016 · 6 comments

Comments

@nwmcsween
Copy link

It's quite cumbersome cping a runner to convert js to css for every project.

@pygy
Copy link
Member

pygy commented Mar 18, 2016

Could you provide more details on your current workflow?

Do you want a utility that takes in JSON and outputs CSS?

@nwmcsween
Copy link
Author

something like j2c es6-export-file-with-computed-properties.js -o
somefile.css

On 2016-03-18 3:02 PM, Pierre-Yves Gérardy wrote:

Could you provide more details on your current workflow?

Do you want a utility that takes in JSON and outputs CSS?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#23 (comment)

@pygy
Copy link
Member

pygy commented Mar 18, 2016

Now that's tricky because ES6 module bindings are static, and they are obviously not supported natively, so there are more than one way to consume them... I'll have to think about it.

In the mean time, you could, programmatically, generate files with something like:

#! /usr/bin/env node
/* 
j2cgen.js
usage: 
    j2cgen.js filename > destination
*/
console.log(`
import sheet from '${process.argv[2]}';
import j2c from 'j2c';
console.log(j2c.sheet(sheet));
`)

Or is it what you meant by "cping a runner"?

@nwmcsween
Copy link
Author

You could use a System.import shim. That example is what i meant by the
"cping a runner" as i have to do that with every project.

On Fri, Mar 18, 2016, 3:49 PM Pierre-Yves Gérardy [email protected]
wrote:

Now that's tricky because ES6 module bindings are static, and they are
obviously not supported natively, so there are more than one way to consume
them... I'll have to think about it.

In the mean time, you could, programmatically, generate files with
something like:

#! /usr/bin/env node/* j2cgen.jsusage: j2cgen.js filename > destination*/console.log(import sheet from '${process.argv[2]}';import j2c from 'j2c';console.log(j2c.sheet(sheet));)

Or is it what you meant by "cping a runner"?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#23 (comment)

@pygy
Copy link
Member

pygy commented Mar 18, 2016

Ah, yes, SystemJS... good call. I've never used it, though...

I'll look into this later on, but my current priority is getting v1.0 out (mostly docs now).

@nwmcsween
Copy link
Author

It's not just SystemJS, it's in ES6, any shim for System.import will work.

On 2016-03-18 4:26 PM, Pierre-Yves Gérardy wrote:

Ah, yes, SystemJS... good call. I've never used it, though...

I'll look into this later on, but my current priority is getting v1.0
out (mostly docs now).


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#23 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants