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

gulpury

v1.4.0

Published

Nice Module to Create Your Gulp Build-System Quick, Easy & Nifty!

Downloads

32

Readme

gulpury

Gulpury is a Gulp plugin that helps you to write your tasks quick.

Gulpury as a Wrapper Provides these Kind of Jobs

List of Plugins

{
    "gulp-clean-css": "^2.3.2", 
    "gulp-concat": "^2.6.1",
    "gulp-gzip": "^1.4.0",
    "gulp-html-replace": "^1.6.2",
    "gulp-rename": "^1.2.2",
    "gulp-replace": "^0.5.4",
    "gulp-sass": "^3.1.0",
    "gulp-uglify": "^2.0.1"
}

Install

npm install --save-dev gulpury

Basic Usage

var gulp = require('gulp');
var gulpury = require('gulpury');

// When You Want Copy some Sources to another Directory.
gulpury.add('i-want-copy-these', gulpury.TYPES.COPY, {
    src: [
        './src/*.html',
        './src/img/**'
    ],
    dest: './dist',
    base: './src'
});

// When You Want Replace Some Text in Your Text Files such as HTML Files.
gulpury.add('replace-version-with', gulpury.TYPES.COPY, {
    src: [
        './src/index.html',
        './src/layout.html'
    ],
    dest: './dist',
    params: {
        replace: [
            ['%version-js%', '1.0.0'],
            ['%version-css%', '0.1.0']
        ]
    }
});

// When You Want Compress some Files in GZip.
gulpury.add('oh-gzip', gulpury.TYPES.COPY, {
    src: [
        './src/assets/css/theme.min.css'
    ],
    dest: './dist/assets/css',
    params: {
        gzip: true
    }
});

// When You Want Compile/Minify/GZip Your SASS Files.
gulpury.add('css-from-sass', gulpury.TYPES.CSS, {
    src: [
        './src/assets/sass/style.scss'
    ],
    dest: './dist/assets/css',
    params: {
        sass: true,
        min: 'style.min.css',
        gzip: true
    }
});

// When You Want only Watch on Some Sources.
gulpury.add('watch-me', gulpury.TYPES.WATCH, {
    src: [
        './src/assets/sass/_common.scss'
    ]
});

// When You Want Uglify/GZip Your JS Files.
gulpury.add('hot-js', gulpury.TYPES.JS, {
    src: [
        './src/assets2/js/script.js'
    ],
    dest: './dist/assets2/js',
    params: {
        min: 'script.min.js',
        gzip: true
    }
});

/**
 * Run All Gulpury Assets with Type COPY.
 */
gulp.task('copy', function () {
    return gulpury.runByType(gulpury.TYPES.COPY);
});

/**
 * Watch All Sources in Gulpury Assets with Type COPY.
 */
gulp.task('copy:watch', ['copy'], function () {
    gulpury.watchByType(gulpury.TYPES.COPY, ['copy']);
});

/**
 * Run All Gulpury Assets with Type CSS.
 */
gulp.task('css', function () {
    return gulpury.runByType('css');
});

/**
 *
 */
gulp.task('css:watch', ['css'], function () {
   gulpury.watchByType(gulpury.TYPES.CSS, ['css']);
   gulpury.watchById('watch-me', ['css']);
});

/**
 * Run Gulpury Asset with Id 'hot-js'.
 */
gulp.task('js', function () {
    return gulpury.runById('hot-js');
});

/**
 * Watch Gulpury Assets with Id 'hot-js'
 */
gulp.task('js:watch', ['js'], function () {
    gulpury.watchById('hot-js', ['js']);
});

Options

All Asset TYPES:

  • ASSET_TYPES.WATCH
  • ASSET_TYPES.COPY
  • ASSET_TYPES.CSS
  • ASSET_TYPES.JS

Asset Params

var params = {
    src: 'sources',
    dest: 'destination-directory',
    base: 'base-directory',
    params: {
        sass: true, // Default Is False.
        rename: 'file-new-name', // e.g: style.min.css
        min: true, // Default Is False.
        gzip: true, // Default Is False.
        htmlReplace: { // According to gulp-html-replace Doc.
            'css1block': 'css/plugins.min.css?2.19',
            'css2block': 'css/style.min.css?2.19'
        },
        replace: [ // You Can Define Multiple Replacements.
           ['%placeholder1%', 'text1'],
           ['##placeholder2##', 'text2'],
           ['REPLACE_ME', 'text3']
        ]
    }
};