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

time-interactive

v0.7.2

Published

Interactive bootstrap files for Time.com

Downloads

111

Readme

The TIME.com Interactive Bootstrapper

Build Status Dependency Status

v0.7.2

Introduction

Our interactives at Time are developed independently from the CMS and bundled into self-assembling Javascript files using bundle-module, and external Webpack bundler maintained by Chris Wilson. They are both discrete--requiring no dependencies--and discreet--interfering as little as possible with the rest of the page.

You can also see the wiki for instructions on installation and usage.

Getting started

npm install -g time-interactive

This repository provides both a command-line script for generating new projects and a client-side script with a few convenience functions.

Generating a project

When globally installed, the module with bootstrap a project with the id you provide.

time-interactive [project_id]

If the script detects an existing time-interactive project by that name with an older version, it will ask you if you want to update.

Compiling

To bundle your project, you must have bundle-module globally installed:

npm install bundle-module -g

You can compile your interactive with either npm run build (development), which is loaded by index.html, or npm run minify, which is loaded by embed.html. You can also build the development version on every file change with npm run watch.

Building

Since v0.6.2, every project generated by the module had two Webpack configurations and a long list of development dependencies for local bundling. This meant every project had a busy node_modules directory and was frozen at the state of Webpack at the time it was generated, which is good and bad.

Seeing as all the Webpack configs and dependencies were redundant, I created a global Webpack bundler, bundle-module, that is always reasonably up-to-date and contains all the loaders you're likely to need, such as HTML/EJS templates, SASS/LESS, .\*sv, etc. At some future point, I may work in the option of a local webpack config, which is generally generated dynamically. In the meantime, if you need a loader that isn't present, please raise and issue or PR on the GitHub repo or, if you must, just e-mail me to complain :)

In cases were an old, "broken" module requires globals--here's looking at you, jQuery--the configuration file may need to be shimmed to execute correctly. This also may be required if using underscore templates.

Loaders

The following types of files may be imported in debug.js:

  • Text: using raw-loader
  • .css: using css-loader. This currently does resolve paths in url() calls. It allows uses the autoprefixer plugin to ensure browser compatibility.
  • .less and .scss: You can import .less and .scss files as well using less-loader and sass-loader. These are also autoprefixed.
  • .html and .ejs: The ejs-loader handles both .ejs templates and raw .html.
  • .csv, .tsv, .dsv: The dsv-loader can handle any delimited file.
  • .png, .jpg, .jpg, .gif: The file-loader plug can import images.