Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying a folder for module exclusion #27

Closed
nazjunaid opened this issue Aug 4, 2011 · 2 comments
Closed

Specifying a folder for module exclusion #27

nazjunaid opened this issue Aug 4, 2011 · 2 comments

Comments

@nazjunaid
Copy link
Contributor

By default every path you add cassette will combine all JavaScript files in the folders into modules.

On certain folders I would like to be able to specify to cassette to ignore combining the JavaScript on that folder and it's sub folders.

I would still like to have cassette manage (minification, visioning etc.) but as individual resources.

Maybe this could be done in the configuration like

<add path="resources/scripts/controllers" module="Off" />
@tommck
Copy link

tommck commented Aug 16, 2011

I'd like to have it so that we can define different modules out of the same folders.
For instance, you've got a legacy app you're grafting Cassette into... Instead of having to refactor to move every script in the system to get clean modules, why not be able to define the modules as XML instead?

<modules>
    <module name="foo">
        <script file="fooUtil.js"/>
        <script regex="foo*.js" />
        <script file="lalala.js" />
    </module> 
    <module name="bar">
        <script file="impromptu.js"/>
        <script regex="hello.js" />
    </module> 
</modules>

That would be highly flexible

@andrewdavey
Copy link
Owner

Cassette's new IModuleSource<T> interface should make this possible. Currently there are two file-system based module sources (PerSubDirectorySource and DirectorySource).

A module source has a method GetModules that should return a collection of modules. So creating an implementation of this that accepts a fixed set of asset paths should be quite easy. I'll have a go at adding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants