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

gulp-recipe-pipemin-index

v0.1.7

Published

Receipe for building index file in development

Downloads

5

Readme

gulp-recipe-pipemin-index Dependency Status

NPM

Container for fast project compilation with hooks, based on gulp-pipemin.

Tasks

index

Compile index file and save in temp directory for serving.

watch:index

deps: index

Watch all index file dependencies and recompile it on change.

Configuration

Recipe specific

Sources

sources.index

mandatory flow: sources.index -> pipes.preBuild* -> pipemin -> merge with build -> pipes.postMerge* -> dest

Entry point html files (index.html) to be processed with gulp-pipemin. These files will also be watched by watch:index task.

example config:

sources.index = 'app/index.html';

sources.devAssets

mandatory flow: sources.devAssets -> pipemin's assetStream

Files that will be treated as assets for pipemin. Names of these files will be sorted and then fed to glob paths in index.html. These files will also be watched by watch:index task.

example config:

sources.devAssets = [
    'app/bower_components/*/*.js',
    'app/bower_components/*/{dist,min,release}/*.{js,css}', // most of the generic bower modules
    sources.js, // include only when serving non-processed js files
    sources.css // include only when serving non-processed css files
    { files: paths.tmp + '**/*', base: paths.tmp } // all processed files from temp directory
];

Note for recipe developer: there is no hook for transforming files in here (for optimization purposes). All compiled files should be saved in temp folder, not compiled every request. If you need to sort your assets differently, use pipes.devAsset* hook and do your own sorting.

Paths

paths.pipeminTmp

alias: paths.tmp default: 'tmp/'

Path to index task output directory.

Tasks

tasks.pipeminIndex

alias tasks.index default 'index'

index task name.

tasks.pipeminWatchIndex

alias tasks.watchIndex default 'watch:index'

watch:index task name.

Order

config.order.postDevAssetsSort

default: 100

Order of task for devAssets files sorting.

Api

Provided Hooks

pipes.devAsset*

type: source

Additional assets feeding to pipemin. Use it to do your own sorting.

pipes.postDevAsset*

type: sequence flow: sources.devAssets -> pipes.postDevAsset* -> pipemin's assetStream

Process all asset files before feeding them into pipemin. Note: sources.devAssets are marked as {read: false}, no file's content will be provided, and no transformed file will be actually written to disk. This is mainly intended for ordering or filename operations.

pipes.preDevBuild*

type: sequence

Do actions on index just before feeding it into pipemin.

pipes.postDevBuild*

type: sequence

Do actions on index files from pipes.build*. Example usage in gulp-recipe-pipemin-rev.

Used Hooks

postDevAssetsSort

Sorts raw assets files by name and places into hook.

preServe

Register index task to preServe.

watch

Register watch:index task to global watch.

Minify html