Code Monkey home page Code Monkey logo

Comments (4)

nazjunaid avatar nazjunaid commented on July 23, 2024

I couldn't agree with you more

from cassette.

ChrisMH avatar ChrisMH commented on July 23, 2024

Perhaps a better explanation of why Cassette is including all files in a module is all that is needed.

It's fairly clear why when you consider Cassette's behavior in release mode.

from cassette.

nazjunaid avatar nazjunaid commented on July 23, 2024

I don't know how people are using cassette but with the default setting of taking every JavaScript in the project file and merging them into one is not how we use is as we have around 20-30 js files in a fairly large application. In my opinion I think the default setting makes a massive assumption and modifies the behaviour of your application too much which can be confusing and slightly scary.

I much prefer the idea of the ModulePerFile implementation so then a developer is encouraged to use cassete with minimal change to begin (no modules but dependency management) and then eventually as they discover an learn more about cassette's they can start using the modules feature correctly with a properly thought out plan.

from cassette.

andrewdavey avatar andrewdavey commented on July 23, 2024

Recent code in master now has PerFileModuleSource<T>.

moduleConfiguration.Add(
    new PerFileModuleSource<ScriptModule>("") // parameter is directory path - empty means app root.
    {
        FilePattern = "*.js;*.coffee"
    }
);

Also, the defaults for an application with no configured module sources are as follows:

IModuleSource<ScriptModule> DefaultScriptModuleSource()
{
    return new PerFileModuleSource<ScriptModule>("")
    {
        FilePattern = "*.js;*.coffee",
        Exclude = new Regex("-vsdoc\\.js$")
    };
}

IModuleSource<StylesheetModule> DefaultStylesheetModuleSource()
{
    return new PerFileModuleSource<StylesheetModule>("")
    {
        FilePattern = "*.css;*.less"
    };
}

IModuleSource<HtmlTemplateModule> DefaultHtmlTemplateModuleSource()
{
    return new PerFileModuleSource<HtmlTemplateModule>("")
    {
        FilePattern = "*.htm;*.html"
    };
}

from cassette.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.