lifterlms-lib-tasks v4.0.1
lifterlms-lib-tasks
Gulp tasks and Node utilities for LifterLMS and LifterLMS add-on development
Installation
npm install --save-dev lifterlms-lib-tasks
Create a gulpfile in the root of your project (gulpfile.js)
The file must contain, at a minimum:
var gulp = require('gulp');
require( 'lifterlms-lib-tasks' )( gulp );Config File
Create a file named .llmsconfig in the root directory of your project
Example:
{
"build": {
"custom": [ "custom_build_task_1", "custom_build_task_2" ]
},
"pot": {
"bugReport": "https://mybugreports.tld",
"domain": "my-text-domain",
"dest": "i18n/",
"jsClassname": "LLMS_SLUG_l10n",
"jsFilename": "class-llms-slug-l10n.php",
"jsSince": "1.0.0",
"lastTranslator": "Jeffrey Lebowski <thedude@earthlink.com>",
"team": "Team Name <team@myteam.com>",
"package": "my-package-name",
},
"scripts": {
"src": [ "assets/js/\*\*/\*.js", "!assets/js/\*\*/\*.min.js" ],
"dest": "assets/js/"
},
"watch": {
"custom": [
{
"glob": [ "path/to/files/**.js" ],
"tasks": [ "watch_task_1", "watch_task_2" ]
}
],
}
}Tasks
gulp build: Run textdomain, pot, scripts, and styles tasks.gulp pot: Generates a.potfile in the configured destination directory (defaults toi18n)gulp scripts: Minifies unminified scripts in the configuredscripts.srcglob via uglifyjs and saves them with a.minsuffix in thescripts.destdirectorygulp styles: Compiles.scssfiles to.css(both minified and unminified) from the configuredstyles.srcglob via gulp-sass and saves in thestyles.destdirectory.gulp textdomain: Ensures all WP i18n functions have the text domain specified bypot.domain.gulp versioner -V X.X.X: Replaces all instances of "@deprecated version", "@since version", & "@version version" with the supplied version number in specifed files. Usesversioner.srcglob. Ifversioner.scriptsis true, adds glob defined inscripts.src.gulp watch: Watch all configuredsrcdirectories for pot, scripts, and styles tasks and re-run them on change.
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago