npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mariotacke/parcel-plugin-static-files-copy

v2.0.0

Published

ParcelJS plugin to copy static files from static dir to bundle directory.

Downloads

4

Readme

parcel-plugin-static-files-copy Build Status

ParcelJS plugin to copy static files from some dir to directory with bundle.

Install

yarn add parcel-plugin-static-files-copy --dev

Usage

  1. Create static dir in you project root.
  2. Fill it with your static files
  3. Run build - and that's all!

Customization

Beyond the default settings, you can:

  1. Name of the folder to be copied.
  2. Copy multiple folders.
  3. Watch for changes during development (rebuilding when necessary).

Example

The following configures the plugin to copy all files in public to the build folder and watch for changes in all source files (** is a deep wildcard).

// package.json
{
	...
    "staticFiles": {
        "staticPath": "public",
        "watcherGlob": "**"
    }
}

Multiple Static Directories

To copy more than one directory to the build folder, specify staticPath as an array. The following copies public and vendor/public:

// package.json
{
	...
    "staticFiles": {
        "staticPath": ["public", "vendor/public"]
    }
}

Watching for Changes

Parcel can rebuild your bundle(s) whenever changes occur in the static directory. This is disabled by default, but it can be enabled by specifying a glob pattern for files that shoudl be watched.

Note the relative file path is used in matching (not just the file name). To match filenames in deep directories, start with a "globstar" (double star). The plugin uses Node's built-in Minimatch Library for glob matching.

The following watches all XML files in the static directory:

// package.json
{
	...
    "staticFiles": {
        "staticPath": "public",
        "watcherGlob": "**/*.xml"
    }
}

To disable watching, either remove the "watcherGlob" key (disabled is the default) or set it to false/null/undefined:

// package.json
{
	...
    "staticFiles": {
        "staticPath": "public",
        "watcherGlob": false
    }
}

Contribute

You're interested in contributing? Awesome! Fork, make change, commit and create pull request. I'll do my best to merge changes!

License

MIT