componentjs / component

frontend package manager and build tool for modular web applications
https://github.com/componentjs/guide
MIT License
4.55k stars 305 forks source link

Using a Standalone Component in a Project that doesn't use Component, Include Release in Install #562

Closed netpoetica closed 10 years ago

netpoetica commented 10 years ago

Is there a known strategy for doing something like this:

mkdir my-cool-app
cd my-cool-app
touch index.html
touch app.js
component install someones-standalone-component

And then in index.html, I have a script tag that loads the standalone component as well as my app.js?

Right now, when I run component install, I only get back the files that component needs (component.json, index.js, etc) in order to generate a global component requiring my component.

It seems to me like maybe there should be a way to include the released when you build a standalone component and that when you run "component install", you should get the built release as well

Currently, I have solved this by running component install and then navigating to my component (in the components/ dir) and running a standalone build

netpoetica commented 10 years ago

Another example

mkdir my-cool-app
cd my-cool-app
component install someones-component
component build --standalone someones-component

Fails to generate a component ("no point of entry"). In this case, I do not want my overall project to be a component (no component.json, no use of require), I just want to generate a standalone component which can be used in my next JS file.

Not sure if I am explaining this well - does this make sense to anyone else?