Coder Social home page Coder Social logo

Comments (4)

FredKSchott avatar FredKSchott commented on July 20, 2024 1

At this early stage in the project, I value the time saved by using well-maintained deps (I can trust that rimraf is built correctly) over a small number of extra dependencies added (in the case of rimraf, 12).

Closing this issue until we hit v1.0, after which we will have more time to optimize deps & can revisit.

from snowpack.

FredKSchott avatar FredKSchott commented on July 20, 2024

I agree with your point that 130 deps seems excessive for what this library does. Most are coming from Rollup. See more here: https://npm.anvaka.com/#/view/2d/%2540pika%252Fweb

The importance of size for a CLI application (installed once, desktop only, run locally) is not the same as the importance of size for a web application (installed for each user, low powered device/connections). I fear you may be missing the point of this library / the problem it is trying to solve: web app size & complexity, not all library/tooling size.

Adding @pika/plugin-bundle-node to the build pipeline would take us from 130 deps to 0, which would be worth considering.

from snowpack.

thiagojedi avatar thiagojedi commented on July 20, 2024

Even in the context of the server / node, don't think the size of a devDependency should matter that much as it doesn't get installed in a production env.

(BTW, @pika/web doen't even have a API for use in other scripts. Why would you transform it in a "web_module"?)

from snowpack.

niutech avatar niutech commented on July 20, 2024

First, have a look at the dependency graph you linked. For instance, rimraf is used only once in your code. You can easily replace it with a small function:

// requires: fs, path
function rmdir(dir_path) {
    if (fs.existsSync(dir_path)) {
        fs.readdirSync(dir_path).forEach(function(entry) {
            var entry_path = path.join(dir_path, entry);
            if (fs.lstatSync(entry_path).isDirectory()) {
                rmdir(entry_path);
            } else {
                fs.unlinkSync(entry_path);
            }
        });
        fs.rmdirSync(dir_path);
    }
}

And so on.
I proposed to transform @pika/web through @pika/web just to make it a single script to run with node.js, so that it would stick to your main idea of minimizing dependencies, but @pika/plugin-bundle-node seems a good option for that.

from snowpack.

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.