Giter Site home page Giter Site logo

documentation about bundler HOT 9 CLOSED

timreichen avatar timreichen commented on May 24, 2024
documentation

from bundler.

Comments (9)

itays123 avatar itays123 commented on May 24, 2024 1

I think I can do this, forking your repo...

from bundler.

timreichen avatar timreichen commented on May 24, 2024 1

Goal

Making a deno lightweight alternative bundler to webpack, rollup, parcel etc. that does not require node and package.json

Structure

I am trying to make two things:

  • Bundler API that bundles deno syntax (url imports, .ts extensions) for the web
  • CLI that uses Bundler API with default settings and plugins to make life as easy as possible (defaults still have to be determined, #5)

React

Bundler API does not include React. But since it uses ts compiler API, I think it can be set up to be used for React. We need a proper react example app instead of example_5.

Features

  • transpiles ts or js modules to esm modules using ts compiler API (resolves url imports, .ts extensions)

  • transpiles and bundles modules to system like Deno.bundle and include system_loader, but splits code for dynamically imported modules.
    Example:

    // a.ts
    import { b } from "./b.ts" // static import
    console.log(b)
    import("./c.ts") // dynamic import
    // b.ts
    export const b = "b"
    // c.ts
    console.log("c")

    output:

    • dist
      • deps
        • 79e2adc1-f4a8-4c1f-986d-6ca38d777f8f.js (contains transpiled c.ts and system_loader)
      • a.js (contains transpiled a.ts, b.ts and system_loader, imports deps/79e2adc1-f4a8-4c1f-986d-6ca38d777f8f.js dynamically)
  • supports css imports
    transpiles import styles from "./styles.css" to module with string content as default export.

    • in discussion: support css features from stage 3 and css nesting.

Real world examples

example_3 is a real world example app that uses lit-element.
Though I agree: The Examples need to be better and labeled properly.

from bundler.

timreichen avatar timreichen commented on May 24, 2024 1

Thank you for your work. I merged it.
I think the requirements section is not necessary because it describes more what we do not need, namely node and package.json.
I updated the examples and restructured the readme to CLI and API sections.

from bundler.

timreichen avatar timreichen commented on May 24, 2024 1

We could use a You can use bundler if… subsection under Why Use Bundler to list some use cases.

from bundler.

itays123 avatar itays123 commented on May 24, 2024

I'm gonna need to understand a few things:

  1. In your documentation the purpose wasn't very clear to me... you are trying to make another version of deno bundle, that includes css bundling and React.js as I see in your 5th example, am I right?

  2. provide real-world examples. not just console.logs and imports.

from bundler.

itays123 avatar itays123 commented on May 24, 2024

Got it, I'm going to make some improvements now. Please approve my pull request

from bundler.

itays123 avatar itays123 commented on May 24, 2024

just pushed an update to the documentation.

changes:

  • I changed the example
  • provided some more info in the beggining
  • added a requirements section.

gonna play around with it so I can provide a big, heavy example.
I would suggest changing the example folder names.

from bundler.

itays123 avatar itays123 commented on May 24, 2024

We could use a You can use bundler if… subsection under Why Use Bundler to list some use cases.

Sounds cool, I will keep working on the documentation tomorrow

from bundler.

itays123 avatar itays123 commented on May 24, 2024

@timreichen what do you think of my last pull?

from bundler.

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.