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-cli
Then in the directory where you found this file:
npm install
And 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
fixtures
with the
sample'sconf.json
file. No task directly exposes this configuration. Thefixtures
task
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
fixtures
with the
project'sconf.json
file.- 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
styles
directory. When you want to modify a particular theme, this where you
get the basis for it. The files are written to./styles/variables.less
and./styles/bootswatch.less
. The./styles/main.less
file includes them directly, so after you apply the theme, modifymain.less
to your heart's content and then run theless
task
as ingrunt less
Parameters:
Name Type Description grunt
object The grunt object reference
definition
object The swatch definition files
Properties
Name Type Description less
string The url to the
bootswatch.less
filelessVariables
string The url to the
variables.less
file- Source:
-
<private, inner> getBootSwatchComponent(url, done)
-
This method will get one of the components from Bootswatch, which is generally a
less
file or alessVariables
file.Parameters:
Name Type Description url
string The url to retreive from
done
function The callback when complete
Properties
Name Type Argument Description err
object <nullable>
If an error occurred, you will find it here.
responseText
string The body of whatever was returned
-
<private, inner> getBootSwatchList(done)
-
Gets the list of available Bootswatches from, well, Bootswatch.
Parameters:
Name Type Description done
function The callback when complete
Properties
Name Type Argument Description err
object <nullable>
If an error occurred, you will find it here.
responseBody
object 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 jsdoc
object A JSDoc definition
- Source:
Returns:
- Type
- string