axept / prejss

Get the power of PostCSS with plugins in your JSS styles. 🎨 Just put CSS into JS and get it as JSS object.
MIT License
248 stars 13 forks source link

Error while trying start example #13

Closed budarin closed 7 years ago

budarin commented 7 years ago

I try to run example project from package and get an error: ReferenceError: Unknown plugin "transform-prejss" specified in "\prejss\examples\basic\.babelrc"

DenisIzmaylov commented 7 years ago

Thanks for your feedback!

Have you tried to run npm install in "basic" directory?

budarin commented 7 years ago

Shure, of couse! )14:20, 14 марта 2017 г., Denis Izmaylov notifications@github.com:Thanks for your feedback! Have you tried to run npm install in "basic" directory?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

С уважением Бударин Вадим

DenisIzmaylov commented 7 years ago

Very interesting. So we'll try to fix it in next 2 days.

BrRenat commented 7 years ago

Another problem. In example project and in my project on start: Module not found: Error: Cannot resolve module 'prejss-postcss-parser' in projectroot\node_modules\prejss\lib @ ./~/prejss/lib/index.js 16:27-59

DenisIzmaylov commented 7 years ago

Thanks for details. I'll try to review it in next two days. But feel free to make a PR. It's simple and fun!

DenisIzmaylov commented 7 years ago

Another problem. In example project and in my project on start: Module not found: Error: Cannot resolve module 'prejss-postcss-parser' in

@BrRenat Sorry for a bit delay. Just fixed it. Could you please try again?

DenisIzmaylov commented 7 years ago

@budarin, just checked for your issue. It seems everything is working correctly now. Could you please check up?

DenisIzmaylov commented 7 years ago

Also I've just published example React.js application with PreJSS, have a joy:

budarin commented 7 years ago

default

There are some problems:

DenisIzmaylov commented 7 years ago

That's truth. Thank you for your feedback. I've removed basic example:

It's not a good practice to keep large example in the same repo since we have to keep traction on each project separately.

Please try it:

This example already contains a mention about nodemon and uses cross-env.

Please give any feedback once you have success with that.

BrRenat commented 7 years ago

@DenisIzmaylov well done! Everything works fine. But I did not check the postcss plugins yet. I think with it no problem. In JetBrains IDEA we can add //language=PostCSS for postcss highlighting and autocomplete. Example styles.js

import preJSS from 'prejss'
import theme from 'theme'

//language=PostCSS
const styles = preJSS`
  button {
    background: ${theme.color.main};
  }
`

export default styles
DenisIzmaylov commented 7 years ago

@BrRenat Omg. Really? Will it work? Could you please provide a screenshot from JetBrains IDEA?

import preJSS from 'prejss'
import theme from 'theme'

// language=PostCSS
const styles = preJSS`
  button {
    background: ${theme.color.main};
  }
`
BrRenat commented 7 years ago

@DenisIzmaylov yea))). Don't forget install postcss plugin in idea. PHPStorm WebStorm 2016, 2017 image

DenisIzmaylov commented 7 years ago

Wow! Really awesome. Could I use this screenshot for my talk on MoscowJS today?

BrRenat commented 7 years ago

@DenisIzmaylov Looks like I'm late, of course

BrRenat commented 7 years ago

node 6 not supported

Object.entries is not a function

DenisIzmaylov commented 7 years ago

Anyway thanks :) BTW Should we support Node.js 6?

DenisIzmaylov commented 7 years ago

Is there any problems on this issue still exists which we have to fix/to do?

budarin commented 7 years ago

standalone demo project works fine. Thanks

DenisIzmaylov commented 7 years ago

@budarin Thank you for your effort. Looking forward for your pull requests! 🎉