-
Notifications
You must be signed in to change notification settings - Fork 14
Grunt
Sugar Calendar development utilizes a task runner called Grunt.
Grunt does the repetitive and time-consuming work that we would prefer not to do on our own.
Below is a brief description of each Grunt task.
Command Line: grunt
or grunt default
or grunt update
Run this whenever any assets (JavaScript, CSS, PHP) have changed.
This task performs the following sub-tasks:
bump
cssmin:ltr
rtlcss
cssmin:rtl
i18n
makepot
Command Line: grunt standardize
Run this when you need to add the "standard" files to your Sugar Calendar checkout.
Command Line: grunt build
or grunt build --standard
Run this when you need to generate a
sugar-calendar.zip
file to deliver to someone, like when deploying a new version to WordPress.org or SugarCalendar.com.
This task performs the following sub-tasks:
-
clean:build
- if standard
standardize
- if standard
update
copy:bootstrap
copy:contents
-
replace:build_bootstrap_php
- if standard
replace:build_bootstrap_php
&replace:build_pot_name
- if standard
-
compress
- if standard
clean:standard_after_build
&makepot
- if standard
Command Line: grunt i18n
Run this when you want to check and update text domains for translatable strings
This task performs the following sub-tasks:
addtextdomain
force:checktextdomain
Command Line: grunt bump
Run this when you want to align version numbers across all files that reference the current version.
This task performs the following sub-tasks:
replace:readme_md
replace:readme_txt
replace:bootstrap_php
replace:loader_php
These tasks are ran by other primary tasks.
Command Line: grunt rtlcss
Run this when you need to generate right-to-left CSS from your left-to-right CSS
Command Line: grunt cssmin
Run this when you need to minify all registered CSS assets. New files need to be added to this manually.
Command Line: grunt checktextdomain
Run this when you need to check that all strings have the correct text domains for internationalization.
Command Line: grunt makepot
Run this when you need to generate a new
sugar-calendar.pot
dictionary for internationalization.
Command Line: grunt compress
Run this to compress the built files into a
sugar-calendar.zip
file.
Command Line: grunt clone-standard
Run this to clone the Standard files into the
/standard/
directory
Internally, this task runs:
clean:standard_before_clone
gitclone:standard
clean:standard_after_clone
These tasks wrap multiple other tasks and should not be ran by themselves.
Command Line: grunt replace
These tasks perform various string replacements.
Command Line: grunt clean
These tasks clean up temporary files and directories.
Command Line: grunt copy
These tasks copy files, typically into the build directory.