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

@gravityforms/gulp-tasks

v7.0.2

Published

Configurable Gulp tasks for use in Gravity Forms projects.

Downloads

2,504

Readme

Gravity Forms Gulp Tasks

Configurable Gulp tasks for use in Gravity Forms projects.

Installation

Install the module:

npm install @gravityforms/gulp-tasks --save-dev

Note: This package requires node 20.10.0 or later, and npm 10.2.3 or later.

Overview

This module encapsulates all of our gulp tasks and makes them reusable by add-ons in the Gravity Forms ecosystem. It has specialized tasks like extracting and injecting icon kits from Icomoon into postcss systems, browsersync enabled dev modes and more.

Usage

After installing, in a gravityforms.config.js in the root directory add the following and tweak as needed in regard to paths or adding additional tasks.

const { resolve } = require( 'path' );

module.export = {
	gulpConfig: {
		// basic browsersync settings
		browserSync: {
			defaultUrl: 'gravity-forms.local',
			serverName: 'Gravity Forms Dev',
		},
		// control aspects of the icomoon postcss injector
		icons: require( './config/gulp/icons' ),
		// custom jest overrides
		jest: require( './config/gulp/jest' ),
		// paths used by webpack and gulp
		paths: require( './config/gulp/paths' ),
		// various postcss overrides and configs
		postcss: require( './config/gulp/postcss' ),
		// set, extend and override gulp tasks (builtin or custom)
		tasks: {
			// extend the built in gulp methods in @gravityforms/gulp-tasks with additional methods
			builtins: {
				copy: {},
			},
			// add names for the custom tasks you extended here. The format is task type, then your custom method, seperated by
			// a colon. eg: copy:myTask
			builtinsTasks: [],
			// map custom tasks not in built ins to be registered against the methods found in a customDir
			custom: [],
			// path to the custom dir that maps to the array of tasks above
			customDir: resolve( __dirname, 'gulp-tasks' ),
			// object that registers all final tasks to actually be run by Gulp
			runners: require( './config/gulp/tasks/runners' ),
		},
		// set directories and methods to execute for gulp watch
		watchFiles: require( './config/gulp/watch-files' ),
		// override default watch tasks
		watchTasks: [ 'watch:main', 'watch:watchAdminJS', 'watch:watchThemeJS' ],
		// set webpack overrides
		webpack: require( './config/gulp/webpack' ),
	},
	// set project id which is used throughout the system
	projectId: 'gform',
}

Then add this to your scripts block in your root package.json to enable all available tasks:

{
  "scripts": {
    "start": "npm install && cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- dev",
    "dev": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- dev",
    "dev:admin": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- dev --nojs",
    "dev:theme": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- dev --nojs",
    "dev:admin:serve": "cd node_modules/@gravityforms/gulp-tasks && npm run dev:admin:serve",
    "dev:theme:serve": "cd node_modules/@gravityforms/gulp-tasks && npm run dev:theme:serve",
    "dist": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- dist",
    "icons:admin": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- icons --admin",
    "icons:theme": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- icons --theme",
    "validate": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- lint",
    "watch": "cd node_modules/@gravityforms/gulp-tasks && npm run gulp -- watch"
  }
}

You can now run any of those tasks with npm run dev etc.