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

mimosa-import-source

v0.5.2

Published

Mimosa module for copying files into the project before building starts

Downloads

14

Readme

mimosa-import-source

Overview

This is a Mimosa module for copying files from somewhere on the file system into your project as the first step of a build/watch. This allows, among other things, files from other projects to merge with files from the project using this module, giving the function of a single codebase.

For more information regarding Mimosa, see http://mimosa.io

Usage

Add 'import-source' to your list of modules. That's all! Mimosa will install the module for you when you start up.

Functionality

When Mimosa starts up, and before it begins handling your code during the initial startup build, this module will copy files from other places on the file system into your codebase.

After Mimosa is started, this module will continue watching the files at their original locations and copy them in as they change.

If you attempt to modify a file that has been copied, rather than update the original file, the module will warn you that you may lose your edits.

Default Config

importSource:
  usePolling: true
  interval: 500
  binaryInterval: 1000
  copy:[]
  • usePolling: Whether to use file system polling. Leave this true on *nix systems, Windows users may want to turn this off for large codebases if CPU usage is high
  • interval: Interval of file system polling (if using polling). Use this if your CPU starts churning to slow down the file watching for import-source.
  • binaryInterval: Interval of file system polling for binary files (if using polling)
  • copy: Detailed below

Example Config

If this module had a default config placeholder like other Mimosa modules, it would look something like this:

  importSource:
    copy:[
      {
        from:""
        to:""
        exclude:[/(^[.#]|(?:__|~)$)/]
      }
    ]
  • copy: an array of source importing configurations
  • from: a string, path of the files you'd like to import into your project. Can be a file, or a folder. If a folder, all the contents of the folder (recursive) will be copied. Path can be relative to the root of the project or absolute.
  • to: a string, location in your project where the folder or file will be copied. Path can be relative to the root of the project or absolute. The path need not exist.
  • exclude: an array of strings and/or regexs. Files from the from location to exclude from moving to the to location. Strings are paths and can be relative to the from, or be absolute. The path need not exist. If you do not provide an exclude, this is used: [/(^[.#]|(?:__|~)$)/] which excludes things like dot files and emacs temp files.