Giter VIP home page Giter VIP logo

Comments (7)

medikoo avatar medikoo commented on June 13, 2024

@raffomania will support for source maps in transforms solve your issue?

e.g. instead of returning just code from transform you may return { code: code, sourceMap: sourceMap }. I can open support for passing source maps that way.

Let me know

from modules-webmake.

raffomania avatar raffomania commented on June 13, 2024

@medikoo That would solve my problem, yes!
One question though: Conceptually, extensions seem to be for non-js files only. Why is there a js type for extensions?

from modules-webmake.

raffomania avatar raffomania commented on June 13, 2024

Sorry for the close, it was a misclick ^^

from modules-webmake.

medikoo avatar medikoo commented on June 13, 2024

One question though: Conceptually, extensions seem to be for non-js files only. Why is there a js type for extensions?

Extensions are for some other formats that can be compiled to one of the natively supported types (which is .js, .json, .css, .html).
So best use cases are e.g. CoffeeScript (compiles to JS), Less (compiles to CSS), YAML (compiles to JSON)

from modules-webmake.

raffomania avatar raffomania commented on June 13, 2024

Ah, this clarifies a lot. Am I right that

  • filename extension is for the input file
  • extension type is for the output file?

If so, it would be cool if this was explained in the docs.

from modules-webmake.

medikoo avatar medikoo commented on June 13, 2024

I've improved documentation, so at least in extensions examples it's clear that one is about extension of compiled format, and other one is about extension of native type. If you have any other suggestions how documentation should be improved PR's are welcome.

I've also added source map support to transforms. So now you should be able to achieve what you need via transform option. See end sentence in transform documentation -> https://github.com/medikoo/modules-webmake#transform-function-programmatical-usage-only

It's published as v0.3.38

from modules-webmake.

raffomania avatar raffomania commented on June 13, 2024

thanks a lot!

from modules-webmake.

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.