globby
User-friendly glob matching (by sindresorhus)
fs-extra
Node.js: extra methods for the fs object like copy(), remove(), mkdirs() (by jprichardson)
globby | fs-extra | |
---|---|---|
7 | 18 | |
2,538 | 9,475 | |
- | - | |
5.3 | 5.6 | |
5 months ago | 9 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
globby
Posts with mentions or reviews of globby.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-22.
-
Add Spellchecker to Your Node.js Project
Files to be scanned/excluded are defined via globby which is based on node-glob
-
How to create a sitemap with Next.js app directory
The snippet above uses globby to find each page.tsx in the app directory (collectPaths). After the file paths are collected, each path is transformed to the url path (createPath). The last step is to create the sitemap (createSitemap) and write to the public directory.
-
How I Made My Portfolio with Next.js
First install globby and prettier.
-
[AskJS] Looking for an OS agnostic search module for node.
If you mean node module, try https://www.npmjs.com/package/qnm If you need to search fs by pattern try https://github.com/sindresorhus/globby
-
Simplying Targetables in PWA Studio
We need to do a few things in our local-intercept.js file to identify and load these files. So we are going to use globby again to find our targetables files.
-
Sitemap: What is and how to generate it for a Next.js App
Because of this, we need to get all our page routes or at least the ones that are public. This is an easy task with globby, this lib allows us to get the name of the files based on regex URL on our folder structure.
-
Simplifying styling in PWA Studio
Identifying local styling globby is a great tool for recursively scanning directories to find files or folders matching specific criteria, so we need to add that to our project.
fs-extra
Posts with mentions or reviews of fs-extra.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2024-06-24.
-
shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.7
To check if a project uses TypeScript, you could do the same thing that shadcn-ui/ui CLI package does. That is, check if tsconfig.json path exists in the given cwd using pathExists function provided by fs-extra.
-
shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 1.0
fs.readJSONSync reads a JSON file and then parses it into an object. In this case, it is an object of type PackageJson.
-
What are some of the best libraries you cannot work without?
I haven't seen fs-extra mentioned yet. For my work it involves a fair bit of reading/writing to the filesystem, so this makes it quite nice to deal with everything in an async way.
-
mkdirp module problem
There are a number of these modules, https://github.com/jprichardson/node-fs-extra being probably the most famous / popular. It does a better job of explaining the why.
-
Re-release fs-extra to properly support esm/cjs usage
Since updating nodejs@18 and switching to esm only, many libraries have been replaced to support esm import, but fs-extra has not been The use of esm is correctly supported, and no suitable replacement has been found. After the a PR proposed by us was rejected, I decided to re-release a [fs-extra-unified] that correctly supports the use of esm (https://www.npmjs.com/package/fs-extra-unified) module.
- Создаем React-компоненты иконок с помощью Figma API и SVGR. Часть 1.
-
Is it just me or after updating Foundry sucks?
Are you seriously suggesting the creators of the software can't write a "save elsewhere" function using Electron and JavaScript? The system has versioning so it would be easy to ask the user to create a backup on first loading with a new version of the software, and the copySync function to make a backup. Foundry uses Node.js already.
-
Node.js for GIS: from google locations to GeoJSON using Streams
We are dealing with a file that is far too large to be loaded into memory at once. Node cannot buffer the file for us because of the size of it.
-
Implement cool features for my static site generator
Implementing those 3 features was quite simple. For metadata and markdown file, I mainly used an external library: showdown to convert from markdown files to html files as well as parsing metadata from markdown files. However, implementing the support for static assets such as images is a bit more interesting. I had to use another external library called fs-extra to copy assets folder from user to the dist folder. I also had to create another new class called CopyFolder where I used fs.copy method to copy assets folder
-
Writing JS-based Bash scripts with zx
The zx project implements a shell script executor similar to Bash but using JavaScript modules. It provides an inbuilt asynchronous JavaScript API to call other commands similar to Bash. Besides that, it provides wrapper functions for several Node.js-based command-line helpers such as chalk, minimist, fs-extra, OS, and Readline.
What are some alternatives?
When comparing globby and fs-extra you can also consider the following projects:
chokidar - Minimal and efficient cross-platform file watching library
graceful-fs - fs with incremental backoff on EMFILE
Filehound - Flexible and fluent interface for searching the file system
rimraf - A `rm -rf` util for nodejs
find-up - Find a file or directory by walking up parent directories
fs-jetpack - Better file system API for Node.js
mkdirp - Recursively mkdir, like `mkdir -p`, but in node.js
Watch-fn
write-json-file - Stringify and write JSON to a file atomically