VikramN / Re-Tag

Reactjs Tag Component
MIT License
21 stars 2 forks source link

publish on npm. #2

Closed jessy1092 closed 9 years ago

jessy1092 commented 9 years ago

This is a simple and useful component. Would you publish on npm for reuse easily?

VikramN commented 9 years ago

Ok let me give it a shot, never done this before, so it may take time

bebraw commented 9 years ago

@VikramN FYI, I wrote a little guide on the topic. That might clear some things up. You'll need to set up a package.json with basic info. If you want I can do a PR to help you get started.

VikramN commented 9 years ago

Thanks. I went thru it. I wanna give this a shot, so I can learn the process. Have a question though.. what about the CSS file that's needed to render the tags? Will users have to manually copy them over?

bebraw commented 9 years ago

what about the CSS file that's needed to render the tags? Will users have to manually copy them over?

In case of Webpack you would do require('Re-Tag/style.css') provided there's style.css at project root. I think that's a good starting point.

As people use the library you might get better ideas but this is what I've stuck with personally.

jessy1092 commented 9 years ago

or use inline-style. You can use react-style to write css-like js with component.

If you don't like to write inline-style, It can place on github release for download traditionally or use bower.

VikramN commented 9 years ago

@jessy1092 What about :hover and :before? They docs says they aren't supported?

bebraw commented 9 years ago

@VikramN Radium, a newer approach, supports :hover.

jessy1092 commented 9 years ago

@bebraw :+1: good news

VikramN commented 9 years ago

Hey guys.

I've updated the code base and samples. I've moved everything to ReTag namespace of sorts.

I went thru a lot of react components. I didn't like the complicated packaging and maintenance involved. Check out addDefaultStyles to add css. I took this idea from another react component - felt it was simplest with least issues.

You will need to refresh the demo page (add a ? if it doesn't). No css file involved in that!

So I have an npm package https://www.npmjs.com/package/re-tag. You can - npm install re-tag It also adds tag.css in case you want it. Let me know if something is left-out / not-working.

Thanks for all the help & ideas :+1: