Closed dawee closed 10 years ago
naw if you want postinstall
scripts use npm or something. we're trying to get away from compilation steps with component!
what is best practice to provide components which are written in coffeescript or something else which needed to build before another component can use it. maybe include both the source and build into the repo?
Best practice is "don't". Lol
Haha, and the alternative?
You can use compilation steps in local components, the app I work on heavily uses LESS and Handlebars, so that's not a problem.
However, anything that's meant to be consumed publicly should be only JS/CSS/HTML, which means if you're using CoffeeScript, TypeScript or whatever in your public components, you'll need to store those output JS/CSS files in your repos.
Okay
And can I use npm as component repo? So if I do the build via npm prepublish script?
what i would do is build them only for tags, but not for dev commits. it's a little annoying to do that though. not sure if you could use releases for this because component doesn't specifically support them.
yeah, sounds good with the tags.
but what's about my question with npm?
And can I use the npm registry as a component repo? So if I do the build via npm prepublish script?
In other words: can I add npmjs.org as a remote?
Today, the component that build the site (the main if I can say), choose to use transpilers or not.
I think it should be defined by the interrested component itself. Example, I have a mysite-component and a myview-component.
mysite-component depends on myview-component. myview-component written its styles files in stylus format.
It would be great to define something like this in myview-component's component.json :