Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parcel-plugin-glob-ordered

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-plugin-glob-ordered

ParcelJS plugin to load glob assets in breadth-first sorted order

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ParcelJS plugin to force load order for glob assets.

Parcel uses "fastglob" to handle glob assets. fastglob results are returned in arbitrary order.

This plugin forces alphabetical sort order of resolved glob assets using a custom deep sort function in a breadth-first manner, so that all files in a directory are parsed (in alphabetical order) first, then the sub-directories (again in alaphabetical order).

:warning: This works with parcel-bundler 1.x (npm i parcel-bundler and not npm i parcel).

Why

For use in legacy applications that rely on a folder-structure load order.

Install

npm install --D parcel-plugin-glob-ordered

Parcel will automatically load all such plugins in your package.json.

Running

PARCEL_WORKERS=1 parcel entry.html

It's important to keep worker farm to a single instance so that dependencies are kept in sync.

Caveats

The plugin monkey patches Parcel internals It might just break in an upcoming version.

Tested with parcel-bundler 1.12.4.

Change Log

  • 0.2.0 - fixed sort order bug in deep nested objects.
  • 0.1.0 - initial version

License

MIT

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc