ibm-js / dworklight

Dojo - Worklight Libraries
Other
5 stars 2 forks source link

Adding in a "/src" directory? #11

Closed kfbishop closed 11 years ago

kfbishop commented 11 years ago

I am adding in support various build tools like Grunt, and npm and all their various children. I would like to move all the actual source modules into a "/src" tree to clean up the entire structure. What are your thoughts on this good or bad?

I'm close to having a new generic grunt task that will scan the code base (and all dependents) and automatically generate a build profile, and then build the project(s). But not sure where the resulting files be located (if at all) in the project tree. For the most part, the end result will not be a single JS file (dworklight will have a minimum of 2 files). We can create a single zip, but I also think we need the full optimized tree available for extraction as well.

Thoughts?

cjolif commented 11 years ago

Having "src" will make harder to consume the package when you don't rely on the built version? Instead of just laying it out next to dojo, dcordova and others and just do

require(["dworklight/..", function(...){
});

You would have to configure things to point to "src".

I think a lot of packages that are using src are packages people never consumes as source code (like jquery) but only as built-minified-files. In our case we still want the source code option to be easy.

What about doing like dojox/app and put any build related things into a "build" subdirectory instead?

kfbishop commented 11 years ago

Yeah, that makes sense. I'll give the build dir a try and see how far that takes me.

kfbishop commented 11 years ago

Using build tree for builds, and all src will remain at top level.