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

codemonauts-gulp-tasks

v0.0.16

Published

Our shared Gulp tasks. Mainly for CraftCMS

Downloads

3

Readme

codemonauts-gulp-tasks

npm version

Some common Gulp functions we share accross all our projects.

Usage

Install the package codemonauts-gulp-tasks with your preferred package manager and then require it at the start of your gulpfile.js like this:

const { clean, script, copy, pug, sass } = require('codemonauts-gulp-functions');

Environment

Some functions behave differently based on your environment which can be set via --env when calling Gulp. The default value is development. If you provide any other value it will switch to production mode and e.g. activate minifying of the final CSS.

Included functions

clean

clean('list-of-folders')

Example:

task('clean', function () {
    return clean([
        '../templates/*',
        '../public/js/*',
    ]);
});

copy

copy('source-folder/list-of-folders/single-file', 'destination-folder')

If destination-folder has a trailing slash, we assume we should copy the file into this folder. If it doesn't end in a slash, the last part of the path is used as the new filename.

Example:

task('templates', function () {
    return copy("src/static/**", "dist/") && // Copy a whole folder
    copy("src/static/hello.txt", "dist/") && // Copy a single file
    copy("src/static/hello.txt", "dist/renamed.txt") // Copy and rename file
});

pug

pug('source-folder', 'destination-folder' [,'amp-css-file'])

Example:

task('pug', function () {
    return pug('pug/**/*.pug', '../templates')
});

Or if you want to inline a special CSS file for AMP, provide the file path via the third parameter:

task('pug', function () {
    return pug('pug/**/*.pug', '../templates', '../public/css/amp.css')
});

sass

sass('source-folder', 'base-path', 'destination' [, extraPlugins])

The list of extraPlugins is optional and can be ommitted. Then you will only get autoprefixer and if building for production also cssnano.

Example:

const tailwindcss = require("tailwindcss");

task("sass", function () {
  extras = [tailwindcss("./tailwind.config.js")];
  return sass("src/sass/**.sass", "src/sass", "website/static/css/", extras);
});

script

js('filename', 'destination')

Example:

task('js', function () {
    return script('scripts.js');
});

With ❤ by codemonauts