Giter Club home page Giter Club logo

Comments (16)

 avatar commented on August 20, 2024 1

@Pomax only if you are running npm install in the fontkit folder. If you are installing something that has fontkit as a dependency (e.g. npm install pdfkit), devDependencies won't be installed.

@devongovett Is this statement strictly true? I thought it depended upon the value of NODE_ENV. Please see my previous comment

from fontkit.

devongovett avatar devongovett commented on August 20, 2024

The problem is that it's required for browserify builds. Moving it to devDependencies would require the user to know to install brfs along with fontkit, or whatever required fontkit.

from fontkit.

jahewson avatar jahewson commented on August 20, 2024

Perhaps it could be moved topeerDependencies? That way npm will print a message.

from fontkit.

Pomax avatar Pomax commented on August 20, 2024

note that if it's in devDependencies, it will still get automatically installed during an npm install run, unless the user explicitly runs npm install --production, which most people never do (but heroku etc. do)

from fontkit.

devongovett avatar devongovett commented on August 20, 2024

@Pomax only if you are running npm install in the fontkit folder. If you are installing something that has fontkit as a dependency (e.g. npm install pdfkit), devDependencies won't be installed.

from fontkit.

Pomax avatar Pomax commented on August 20, 2024

ah, right.

from fontkit.

devongovett avatar devongovett commented on August 20, 2024

For brotli.js I managed to get rid of brfs by writing a base64 JS string version of the binary file and using require instead of fs.readFileSync. e.g. module.exports="base64";. Maybe we can do something similar here. Currently the only file we need to read is the Unicode trie for the arabic shaper.

from fontkit.

awerlang avatar awerlang commented on August 20, 2024

Currently, not only brfs but also browserify-optional, from this module and also in restructure, unicode-properties. It would chop away 40% of node_modules.

from fontkit.

mclark-newvistas avatar mclark-newvistas commented on August 20, 2024

It would also help fix the npm audit warnings about security vulnerabilities for pdfmake. See also bpampuch/pdfmake#1639.

from fontkit.

RoelN avatar RoelN commented on August 20, 2024

All this talk about chopping off large chunks of depedencies makes me happy. It'd speed up Wakamai Fondue considerably. E.g. I'd only need Brotli to decompress fonts, not to compress them.

In other words, +1

from fontkit.

devongovett avatar devongovett commented on August 20, 2024

Unfortunately, all of those dependencies are still required. They are used for builds using browserify.

from fontkit.

Pomax avatar Pomax commented on August 20, 2024

@RoelN what part would it speed up, though? The runtime should not be noticably affected by the dependency.

from fontkit.

 avatar commented on August 20, 2024

Having real touble with this, npm install pdfkit --only=prod is kicking this back as a vulnerbility. From what I understand this shouldn't even be installed. Am I doing something wrong? Same issue on linebreak too.

from fontkit.

awerlang avatar awerlang commented on August 20, 2024

@GBayliss https://docs.npmjs.com/cli/install

from fontkit.

 avatar commented on August 20, 2024

@awerlang thanks, I read that and tried several permutations but I am still seeing this included when installing the downstream package (pdfkit). This fails npm audit with a vulnerability due to brfs being a primary dependency of the fontkit package as has previously been debated.

from fontkit.

RoelN avatar RoelN commented on August 20, 2024

@Pomax I meant in package size, reducing download time. I don't expect any real difference in runtime.

from fontkit.

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.