5.2.3 • Published 11 days ago

@gravityforms/gulp-tasks v5.2.3

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
11 days ago

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.

@aptuitiv/gulp-clean-css@babel/cli@babel/core@babel/eslint-parser@babel/plugin-proposal-decorators@babel/plugin-syntax-dynamic-import@babel/plugin-transform-class-properties@babel/plugin-transform-object-assign@babel/plugin-transform-object-rest-spread@babel/plugin-transform-optional-chaining@babel/plugin-transform-regenerator@babel/plugin-transform-runtime@babel/preset-env@babel/preset-react@googleapis/drive@gravityforms/node-utils@pmmmwh/react-refresh-webpack-plugin@slack/web-api@testing-library/jest-dom@testing-library/react@testing-library/user-eventapplication-log-winston-interfaceaxiosbabel-jestbabel-loaderbabel-plugin-istanbulbabel-plugin-module-resolverbrowser-syncclean-jsdoc-themecommand-line-argscommand-line-usageconcatcore-jscross-envdeldotenvenv-pathseslinteslint-import-resolver-webpackeslint-plugin-jsdoceslint-plugin-jsx-a11yeslint-plugin-reacteslint-plugin-react-hooksextract-documentation-commentsfind-configform-dataget-streamglobgulpgulp-awspublishgulp-awspublish-routergulp-concatgulp-decompressgulp-eslint-newgulp-footergulp-hashsumgulp-headergulp-ifgulp-postcssgulp-renamegulp-replacegulp-shellgulp-sourcemapsgulp-stylelintgulp-uglifygulp-zipidentity-obj-proxyifdef-loaderjestjest-clijest-environment-jsdomjest-environment-jsdom-globaljsdocjson2phpmake-dirmarkedmatchdep@octokit/restpifypostcsspostcss-custom-mediapostcss-custom-propertiespostcss-extendpostcss-importpostcss-import-ext-globpostcss-mixinspostcss-nestedpostcss-preset-envpostcss-rem-to-pixelpostcss-replaceprocessreact-refreshregenerator-runtimerequire-dirshowdownsimple-gitsimple-package-metaterser-webpack-pluginutils-google-drivewebpackwebpack-bundle-analyzerwebpack-cliwebpack-dev-serverwebpack-mergewebpack-merge-and-include-globallywebpack-streamwebpack-watch-files-plugin
5.2.3

11 days ago

5.2.2

16 days ago

5.2.1

19 days ago

5.2.0

19 days ago

5.1.5

1 month ago

5.1.4

1 month ago

5.1.3

1 month ago

5.1.2

1 month ago

5.1.1

1 month ago

5.1.0

1 month ago

5.0.9

1 month ago

5.0.8

1 month ago

5.0.7

1 month ago

5.0.6

1 month ago

5.0.5

1 month ago

5.0.4

1 month ago

5.0.3

1 month ago

5.0.2

1 month ago

5.0.1

1 month ago

5.0.0

1 month ago

4.0.2

2 months ago

4.0.1

3 months ago

4.0.0

5 months ago

3.3.0

10 months ago

3.0.6

11 months ago

3.0.5

1 year ago

3.0.4

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

1.9.9

1 year ago

1.9.8

1 year ago

1.9.7

1 year ago

1.9.5

1 year ago

1.9.4

1 year ago

1.9.3

1 year ago

1.9.2

1 year ago

1.9.1

2 years ago

1.8.2

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.7.6

2 years ago

1.9.0

2 years ago

1.8.3

2 years ago

1.6.3

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.7.5

2 years ago

1.7.4

2 years ago

1.7.3

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.9

2 years ago

1.4.8

2 years ago

1.4.6

2 years ago

1.4.5

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.31

2 years ago

1.3.32

2 years ago

1.4.7

2 years ago

1.3.30

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.10

2 years ago

1.3.13

2 years ago

1.3.14

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.17

2 years ago

1.3.18

2 years ago

1.3.15

2 years ago

1.3.16

2 years ago

1.3.19

2 years ago

1.3.20

2 years ago

1.3.21

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.24

2 years ago

1.3.25

2 years ago

1.3.22

2 years ago

1.3.23

2 years ago

1.3.28

2 years ago

1.3.27

2 years ago

1.3.1

2 years ago

1.2.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago