Gruntfile tasks. These tasks are intended to help you when modifying the template. If you are
just using the template, don't sweat this stuff. To use these tasks, you must install grunt, if you haven't already,
and install the dependencies. All of this requires node.js, of course.
Install grunt:
npm install -g grunt-cliThen in the directory where you found this file:
npm installAnd you are all set. See the individual tasks for details.
- Source:
Requires
- module:path
- module:lodash
- module:http
- module:async
- module:fs
Members
-
<static> apply
-
TASK: Applies the theme in the conf file and applies it to the styles directory.
- Source:
-
<static> bootswatch
-
TASK: Grab all Bootswatch themes and create css from each one based on the main.less in the styles directory. NOTE that this will
leave the last swatch downloaded in the styles directory, you will want to call "apply" afterwards- Source:
-
<static> build
-
TASK: Builds the whole shebang. Which means creating testdocs, the bootswatch fixtures and then resetting the
styles directory.- Source:
-
<static> dev
-
Compile the CSS and create the project documentation
- Source:
-
<static> docs
-
Builds the project's documentation
- Source:
-
<static> examples
-
TASK:Create fixtures from the themes. The files must have been built first from the bootswatch task.
- Source:
-
<static> less
-
TASK: The less task creates the themed css file from main.less. The file is written to the template styles
directory as site.[name of theme].css. Later the .conf file will look for the theme to apply based
on this naming convention.- Source:
-
<static> shell:dox
-
TASK: Create project documentation
- Source:
-
<static> shell:testdocs
-
TASK: Create the a documentation set for testing changes to the template
- Source:
-
<static> testdocs
-
TASK: Builds the main less file and then generates the test documents
- Source:
-
<private, inner> jsdocExamplePages
-
The definition to run the sample files. This runs the files in
fixtureswith the
sample'sconf.jsonfile. No task directly exposes this configuration. Thefixturestask
modifies this for each swatch it finds and then run the docs command against it.- Source:
-
<private, inner> jsdocTestPages
-
The definition to run the development test files. This runs the files in
fixtureswith the
project'sconf.jsonfile.- Source:
-
<private, inner> projectDocs
-
This definition provides the project's main, published documentation.
- Source:
Methods
-
<private, inner> applyTheme(grunt, definition)
-
Applies one of the Bootswatch themes to the working
stylesdirectory. When you want to modify a particular theme, this where you
get the basis for it. The files are written to./styles/variables.lessand./styles/bootswatch.less. The./styles/main.less
file includes them directly, so after you apply the theme, modifymain.lessto your heart's content and then run thelesstask
as ingrunt lessParameters:
Name Type Description gruntobject The grunt object reference
definitionobject The swatch definition files
Properties
Name Type Description lessstring The url to the
bootswatch.lessfilelessVariablesstring The url to the
variables.lessfile- Source:
-
<private, inner> getBootSwatchComponent(url, done)
-
This method will get one of the components from Bootswatch, which is generally a
lessfile or alessVariablesfile.Parameters:
Name Type Description urlstring The url to retreive from
donefunction The callback when complete
Properties
Name Type Argument Description errobject <nullable>
If an error occurred, you will find it here.
responseTextstring The body of whatever was returned
-
<private, inner> getBootSwatchList(done)
-
Gets the list of available Bootswatches from, well, Bootswatch.
Parameters:
Name Type Description donefunction The callback when complete
Properties
Name Type Argument Description errobject <nullable>
If an error occurred, you will find it here.
responseBodyobject This is a parsed edition of the bootswatch server's response. It's format it defined
by the return message from here -
<inner> jsdocCommand(jsdoc)
-
Normalizes all paths from a JSDoc task definition and and returns an executable string that can be passed to the shell.
Parameters:
Name Type Description jsdocobject A JSDoc definition
- Source:
Returns:
- Type
- string