These commands are run on the command line, prefixed with grunt
. For example, to rebuild the CSS after editing the LESS files, you would run grunt less
.
Some commands require you to have external applications installed. Instructions for installing dependencies are included in the developer documentation.
less
Recompiles all LESS files into their corresponding CSS files, including sourcemaps, and then runs
cssmin
. The list of files that will be compiled is defined inGruntfile.js
in the variablecssLessFiles
.uglify
Minifies Largo's
.js
JavaScript files to.min.js
files.cssmin
Takes all
.css
files incss/
andhomepages/assets/css
that are not.min.css
files and makes minified versions with the file extension.min.css
.shell
Runs commands directly on the command line, instead of running Grunt modules.
These commands require you to have set up Largo according to the complete dev environment or documentation contribution environment instructions, because they require several Python libraries that were installed by following those instructions. Besure to have activated your python virtualenv with
workon
, as described in those instructions.shell:apidocs
Recompiles the Largo API Docs from structured comments in Largo's PHP code using /docs/generate_api_docs.py into reStructuredText files.
shell:sphinx
Converts all available reStructuredText files into HTML documentation, which is saved locally in
docs/_build/html/
. If you want to preview these docs without pushing them to largo.readthedocs.io, runpython -m SimpleHTTPServer
as described in the documentation contribution instructions.shell:msgmerge
Runs msgmerge to merge translation files.
shell:pot
Runs wp i18n make-pot to create a POT file for the project.
watch
Runs
less
if a.less
file inless/
orhomepages/assets/less/
is modified. Runsdocs
if a reStructuredText.rst
file changes indocs/
.pot
Runs
shell:pot
, rebuilding translation files.Running this command requires your computer to have
xgettext
installed. Installation instructions vary based on operating system; your best bet is Google.xgettext
is usually installed in the same package asgettext
.po2mo
Converts the
.po
files to.mo
files. For more information about.po
and.mo
files, see the Wikipedia articles on gettext.Running this command requires your computer to have
xgettext
installed. Installation instructions vary based on operating system; your best bet is Google.xgettext
is usually installed in the same package asgettext
.apidocs
Runs
shell:apidocs
, rebuilding only the API docs.docs
Runs
shell:sphinx
, rebuilding ALL docs.build
Runs
less
,cssmin
,uglify
,apidocs
,docs
,pot
, andshell:msmerge
to rebuild the assets, docs, and language files.version
Increments the Largo version number based on
package.json
. Files affected are:docs/conf.py
,style.css
,readme.md
.build-release
Runs
build
andversion
.publish
Runs the following tasks to publish the newest version of Largo on the
master
branch:confirm
Makes sure that you want to publish a release.
gitcheckout
Checks out the
master
branch of Largo.gitmerge
Merges the
develop
branch intomaster
.gittag
Tags the latest commit with the version number from
package.json
.gitpush
Pushes the
master
branch back to GitHub.