2
votes

Because I want to be flexible, I want to create 3 SEPARATE small JavaScript RequireJS AMD projects (utils, mvc, widgets). I do not want them to be in one large project. They should not be executable standalone, just for later integration into other projects.

After this I want to create a web application, the frontend should be a JavaScript RequireJS AMD project. I want to use these 3 litte separate AMD projects AS EXTERNAL DEPENDENCIES in my web app project.

Until now, the only external AMD dependencies that I used in my requirejs amd projects (for instance the AMD version of Backbone.js) were single, concatenated files, not projects with many little files.

Can somebody show me how to get started in this situation?

Maybe it is the same, just making aliases for the external dependencies, exactly in the same way how I did with those external single-file, concatenated amd dependencies.

But I'm doubtful which is the best practice in the special situation.

Maybe somebody can give me advice.

Thanks alot in advance.

Wolfgang

1

1 Answers

-1
votes

Although this doesn't really answer your question, I suggest treating your 3 separate projects like you would any other external library: when they change, re-build them in a higher version and adjust the dependencies of your web project accordingly.

Your web project is separated from the other 3 projects for a reason: they are separate things. Your web project shouldn't be in charge of building it's dependencies, they should do that.