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

unbaffled-js

v0.0.17

Published

Automate distribution of multiple production versions alongside a bleeding edge development version with optimized cache busting while programmatically generating a versions manifest file.

Downloads

7

Readme

The Noble Scaffold

By ProjectAMPLE & Nobalai

Automate distribution of multiple production versions alongside a bleeding edge development version with optimized cache busting while programmatically generating a versions manifest file.

Features include:

  • Versioning
    • development and automatic multiple frozen production versions
      • optimized client side caching since only newly modified modules are created in new version build directory
      • (See external repositories in django and JS for one implementation on how to use them)
      • Keep x past versions, and delete older versions which have no dependencies to the current build.
    • random name generator for new versions
    • automatically increment version name based on patch/minor/major flags
    • pull branch name
    • compare file hashes to find newly modified modules/files
  • Webpack
    • module bundling with optional split by name (webpack)
    • live reload with webpack-dev-server
    • 2 webpack config files with proper inheritance of arrays, loaders and plugins
  • Transpilation
    • es6 with babel
    • scss
  • Bundling
    • minification (js & css)

Example

In the example version-manifest.json below, a minor update was released (gulp release) which only modified example/src/moduleA.js.

Version manifest array:

[
  {
    "name": "vicarious-thrill",
    "id": "0.1.1",
    "type": "minor",
    "branch": "master",
    "production": true,
    "created": "3/2/2016, 10:42",
    "timestamp": "2016-03-02T15:42:52.287Z",
    "notes": "N/A",
    "schemaChange": false,
    "modules": {
      "js": {
        "app": "nondescript-nation",
        "lib": "nondescript-nation",
        "moduleA": "vicarious-thrill",
        "moduleB": "nondescript-nation",
        "moduleC": "nondescript-nation"
      },
      "css": {
        "app": "nondescript-nation"
      },
      "vendor": {}
    }
  },
  {
    "name": "nondescript-nation",
    "id": "0.0.1",
    "type": "patch",
    "branch": "master",
    "production": false,
    "created": "3/2/2016, 10:20",
    "timestamp": "2016-03-02T15:20:31.171Z",
    "notes": "N/A",
    "schemaChange": false,
    "modules": {
      "js": {
        "app": "nondescript-nation",
        "lib": "nondescript-nation",
        "moduleA": "nondescript-nation",
        "moduleB": "nondescript-nation",
        "moduleC": "nondescript-nation"
      },
      "css": {
        "app": "nondescript-nation"
        },
      "vendor": {}
    }
  }
]

The build directory will contain:

versions
    ├── 0.0.1-nondescript-nation
    │   ├── css
    │   │   └── moduleA.css
    │   ├── js
    │   │   ├── app.js
    │   │   ├── lib.js
    │   │   ├── main.js
    │   │   ├── moduleA.js
    │   │   ├── moduleB.js
    │   │   └── moduleC.js
    │   └── vendor
    └── 0.1.1-vicarious-thrill
        ├── css
        ├── js
        │   └── moduleA.js
        │   
        └── vendor

On the client side production version, the developer will need to either manually patch in the generated files into an HTML file or automate this process with a server side build script (I'm currently working on releasing an open source version of my django/python solution soon)

Manifest Options

Adding keep: true to a version entry ensures this version won't be deleted

Gulpfile options

Webpack Links

  • https://webpack.github.io/docs/list-of-plugins.html

TODO

  • Add vendor module separation
  • Clean up repository and comments