Skip to content

Commit

Permalink
docs(Eleventy): document Eleventy constructor
Browse files Browse the repository at this point in the history
Signed-off-by: André Jaenisch <[email protected]>
  • Loading branch information
Ryuno-Ki committed Jun 28, 2019
1 parent b5968c6 commit 2cfedc7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"scripts": {
"default": "npm run test",
"doc": "jsdoc -c .jsdoc.conf.json -d ./api-docs -p ./package.json -R README.md -t ./node_modules/ink-docstrap/template -r src/**/*.js",
"doc": "jsdoc -c .jsdoc.conf.json -d ./api-docs -p ./package.json -R README.md -t ./node_modules/ink-docstrap/template -r src/*.js",
"test": "npx ava --verbose",
"lint-staged": "lint-staged",
"coverage": "npx nyc ava && npx nyc report --reporter=json-summary && cp coverage/coverage-summary.json docs-src/_data/coverage.json && node cmd.js --config=docs-src/.eleventy.docs.js"
Expand Down
46 changes: 46 additions & 0 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,68 @@ const config = require("./Config");
const bench = require("./BenchmarkManager");
const debug = require("debug")("Eleventy");

/**
* @module @11ty/eleventy/Eleventy
*/

/**
* Runtime of eleventy.
*
* @param {String} input - Where to read files from.
* @param {Output} output - Where to write rendered files to.
* @returns {undefined}
*/
class Eleventy {
constructor(input, output) {
/** @member {Object} - tbd. */
this.config = config.getConfig();

/**
* @member {String} - The path to Eleventy's config file.
* @default null
*/
this.configPath = null;

/**
* @member {Boolean} - Is Eleventy running in verbose mode?
* @default true
*/
this.isVerbose = true;

/**
* @member {Boolean} - Is Eleventy running in debug mode?
* @default false
*/
this.isDebug = false;

/**
* @member {Boolean} - Is Eleventy running in dry mode?
* @default false
*/
this.isDryRun = false;

/** @member {Date} - The time of instantiation. */
this.start = new Date();

/**
* @member {Array<String>} - Subset of template types.
* @default null
*/
this.formatsOverride = null;

/** @member {Object} - tbd. */
this.eleventyServe = new EleventyServe();

/** @member {String} - Holds the path to the input directory. */
this.rawInput = input;

/** @member {String} - Holds the path to the output directory. */
this.rawOutput = output;

/** @member {Object} - tbd. */
this.watchTargets = new EleventyWatchTargets();

/** @member {Object} - tbd. */
this.watchTargets.watchJavaScriptDependencies = this.config.watchJavaScriptDependencies;
}

Expand Down

0 comments on commit 2cfedc7

Please sign in to comment.