Giter Club home page Giter Club logo

Comments (5)

adams85 avatar adams85 commented on July 23, 2024 1

I don't like to have Javascript in my dev/build tool chain, either. :)

I put together another code sample for you: https://github.com/adams85/bundling/tree/master/samples/VueDemo

This one uses Vue with plain Javascript without ES6 modules or other fancy stuff. Because of this, it should work fine with 1.x versions of the library.

Regarding your questions:

  1. My library doesn't include a native transpiler for TS currently (and probably it never will). Transpiling TS to JS is done by the .NET build system automatically, but nothing stops you from bundling the outputted js files. The method is demonstrated in the TypeScriptDemo sample.

  2. You cannot minify TS files directly, but you can the output of the transpilation process just like any ordinary JS files.

from bundling.

adams85 avatar adams85 commented on July 23, 2024 1

Thanks for the info, I'll definitely take a look at it.

For that matter, file providers are supported in my lib from the beginning:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    // ...

    app.UseBundling(
        new BundlingOptions
        {
            SourceFileProvider = env.ContentRootFileProvider
        },
        bundles =>
        {
            // ...
        });

    // ...
}

You can use a file provider of your choice (so the input files don't have to necessarily come from physical file system, but also from embedded resources, etc).

In fact, you can even define bundles of multiple sources with different file providers. However, I don't think this is required too often.

from bundling.

adams85 avatar adams85 commented on July 23, 2024

Hi!

Unfortunately, I'm not familiar with Vuex but odds are that you cannot make it work with the current release as it has only basic Javascript bundling features (in fact, it does just a basic concatenation + minification).

However, I'm working hard on v2.0 right now which is going to be able to bundle ES6 modules. As far as I know, Angular makes heavy use of modules and utilize TypeScript nowadays. There is already a working a sample in the repo which uses these features. You may check out the master branch and play with the demo to get a better idea what the new version will be capable of.

I'm putting the finishing touches, the new release is due in a week or so. I'm going to investigate how it plays with the SPA frameworks and I try to build in support for them if it doesn't involves much work.

So check back soon by all means! :)

from bundling.

Diaskhan avatar Diaskhan commented on July 23, 2024

I am to dont like spa applications bundling in one js!
Not familiar with node js enviroment!

Just like connect vuejs a simple jquery lib!
https://jsfiddle.net/chrisvfritz/50wL7mdz/

1.How do work TS bundling ?
Is there native C# transpiler from TS to JS ?

  1. Could u describe ts to js minification ?

from bundling.

Diaskhan avatar Diaskhan commented on July 23, 2024

Thanks!

By the way look at
https://github.com/ligershark/WebOptimizer/blob/master/README.md#content-root-vs-web-root
U could borrow some ideas!
This idea with IFileProvider looks interesting !

from bundling.

Related Issues (16)

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.