Skip to content

Latest commit

 

History

History
2638 lines (1916 loc) · 108 KB

scripts.md

File metadata and controls

2638 lines (1916 loc) · 108 KB

Classes

QuasarApiQuasarRuntime

The API wrapper around the quasar runtime.

QuasarCli

Processes command line arguments to run quasar runtime methods.

QuasarConfig

Contains the path information for loading quasar files.

DTQuasarTaskQuasarTask

A quasar task with Digital Trends specific business logic

QuasarElectronApp

Runs the QuasarWebApp in an electron window

QuasArgs

The default quasArgs object used in quasar builds.

QuasarRuntime

The quasar Runtime [use the quasar API, not this class directly].

QuasarTask

A task that can be run by the quasar runtime API.

QuasarWebApp

The web application for running the quasar API and webform.

QuasarApi ⇐ QuasarRuntime

The API wrapper around the quasar runtime.

Kind: global class
Extends: QuasarRuntime
Export:

quasarApi.config : QuasarConfig

Kind: instance property of QuasarApi

quasarApi.cleanDevFolders(quasArgs) ⇒ promise

cleans local files in the application root for development testing

Kind: instance method of QuasarApi
Overrides: cleanDevFolders

Param Type
quasArgs QuasArgs

quasarApi.cleanOutputFolders(quasArgs, [allFolders]) ⇒ promise

deletes the contents of the output root folder and all subdirectories

Kind: instance method of QuasarApi
Overrides: cleanOutputFolders

Param Type Default
quasArgs QuasArgs
[allFolders] boolean false

quasarApi.cleanAssetsFolder(quasArgs, subdirectory) ⇒ promise

deletes the contents of the assets folder for this quasar

Kind: instance method of QuasarApi
Overrides: cleanAssetsFolder

Param Type
quasArgs QuasArgs
subdirectory string

quasarApi.compileScriptsToAssetsFolder(quasArgs, files, outputFilename) ⇒ promise

Compiles jsx templates in the templates folder and outputs the targetFile into the assets folder.

Kind: instance method of QuasarApi
Overrides: compileScriptsToAssetsFolder
Returns: promise - gulp chain

Param Type Description
quasArgs QuasArgs
files array | string gulp src input
outputFilename string

quasarApi.compileStylesToAssetsFolder(quasArgs, files, outputFilename) ⇒ promise

Compiles sass templates in the templates folder, using json files for data input which mirror the input filenames, and outputs the targetFile into the assets folder.

Kind: instance method of QuasarApi
Overrides: compileStylesToAssetsFolder
Returns: promise - gulp chain

Param Type Description
quasArgs QuasArgs
files array | string gulp src input
outputFilename string

quasarApi.compileTargetFileToAssetsFolder(quasArgs) ⇒ promise

compiles mustache templates in the templates folder, using json files for data input which mirror the input filenames, and outputs the targetFile into the assets folder.

Kind: instance method of QuasarApi
Overrides: compileTargetFileToAssetsFolder
Returns: promise - gulp chain

Param Type
quasArgs QuasArgs

quasarApi.copyFilesFromAssetsFolderToOutput(quasArgs, files, excludeFiles) ⇒ promise

copies files from the assets folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyFilesFromAssetsFolderToOutput

Param Type
quasArgs QuasArgs
files *
excludeFiles *

quasarApi.copyFilesFromSourcesFolderToOutput(quasArgs, [files], [excludeFiles]) ⇒ promise

copies files the sources folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyFilesFromSourcesFolderToOutput

Param Type Default
quasArgs QuasArgs
[files] *
[excludeFiles] * []

quasarApi.copyFilesFromTemplatesFolderToAssetsFolder(quasArgs, files, [excludeFiles]) ⇒ promise

copies files from the templates folder to the assets folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyFilesFromTemplatesFolderToAssetsFolder

Param Type Default
quasArgs QuasArgs
files *
[excludeFiles] * []

quasarApi.copyFilesFromTemplatesFolderToOutput(quasArgs, files, [excludeFiles]) ⇒ promise

copies files from the templates folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyFilesFromTemplatesFolderToOutput

Param Type Default
quasArgs QuasArgs
files *
[excludeFiles] * []

quasarApi.copyFilesToOutputFolder(quasArgs, fromDirectory, files, [excludeFiles]) ⇒ promise

copies files from a directory to the output folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyFilesToOutputFolder

Param Type Default
quasArgs QuasArgs
fromDirectory *
files *
[excludeFiles] * []

quasarApi.copyTemplateFilesToAssetsPath(quasArgs) ⇒ promise

copies files from the templates folder to the assets folder given the quasArgs folder information

Kind: instance method of QuasarApi
Overrides: copyTemplateFilesToAssetsPath

Param Type
quasArgs QuasArgs

quasarApi.debug(message, obj, condition)

makes a call to log and is used as a canary for testing

Kind: instance method of QuasarApi
Overrides: debug

Param Type
message string
obj object
condition string

quasarApi.downloadFileFromUrlToSourcesFolder(quasArgs, url) ⇒ promise

downloads source files from a url into the sources folder to be used at build time

Kind: instance method of QuasarApi
Overrides: downloadFileFromUrlToSourcesFolder

Param Type
quasArgs QuasArgs
url string

quasarApi.downloadSourceFilesToSourcesFolder(quasArgs) ⇒ promise

downloads source files from a url into the sources folder to be used at build time

Kind: instance method of QuasarApi
Overrides: downloadSourceFilesToSourcesFolder

Param Type
quasArgs QuasArgs

quasarApi.findTargetFile(quasArgs, nextPath, originalPath, exhausted) ⇒ string

searches for a target file in the various available folders by name, qType, oType, and extension until it finds one

Kind: instance method of QuasarApi
Overrides: findTargetFile

Param Type
quasArgs QuasArgs
nextPath string
originalPath string
exhausted string

quasarApi.getAvailableSourceFilenames(quasArgs) ⇒ array

gets the filenames of the source extension type from the sources folder

Kind: instance method of QuasarApi
Overrides: getAvailableSourceFilenames
Returns: array - list of filenames from sources folder

Param Type
quasArgs QuasArgs

quasarApi.getAvailableDebrisFilenames(quasArgs) ⇒ array

gets the debris filenames from the debris folder

Kind: instance method of QuasarApi
Overrides: getAvailableDebrisFilenames
Returns: array - list of filenames from debris folder

Param Type
quasArgs QuasArgs

quasarApi.getAvailableTaskNames() ⇒ array

gets an array of the loaded task names

Kind: instance method of QuasarApi
Overrides: getAvailableTaskNames

quasarApi.getQuasarOutputPath([quasArgs]) ⇒ string

gets the outputPath for quasars

Kind: instance method of QuasarApi
Overrides: getQuasarOutputPath

Param Type Default
[quasArgs] QuasArgs {}

quasarApi.getTaskNames([dir]) ⇒ array

gets the task names from the tasks folder

Kind: instance method of QuasarApi
Overrides: getTaskNames

Param Type Default
[dir] string null

quasarApi.getTasksAssociatedByOutputType(taskNames, [orderByQuasar]) ⇒ object

gets task names associated with the oType field

Kind: instance method of QuasarApi
Overrides: getTasksAssociatedByOutputType

Param Type Default
taskNames array
[orderByQuasar] boolean false

quasarApi.injectCode(quasArgs) ⇒ object

Injects asset file references into the output file in the assets folder.

Kind: instance method of QuasarApi
Overrides: injectCode
Returns: object - the quasargs used

Param Type
quasArgs QuasArgs

quasarApi.injectDebrisFilesIntoStream(quasArgs, contents, [minify]) ⇒ stream

Injects require statements for debris.

Kind: instance method of QuasarApi
Overrides: injectDebrisFilesIntoStream
Returns: stream - the stream written to

Param Type Default
quasArgs QuasArgs
contents stream
[minify] boolean false

quasarApi.injectRequiredFilesIntoStream(quasArgs, contents) ⇒ stream

Injects require statements for the default asset files (css and js).

Kind: instance method of QuasarApi
Overrides: injectRequiredFilesIntoStream
Returns: stream - the stream written to

Param Type
quasArgs QuasArgs
contents stream

quasarApi.loadTasks(taskPaths, [loadDefaults], [clobber]) ⇒ array

loads the quasar tasks into the gulp taskList

Kind: instance method of QuasarApi
Overrides: loadTasks
Returns: array - the tasks loaded

Param Type Default
taskPaths array
[loadDefaults] boolean false
[clobber] boolean true

quasarApi.logArgsToFile(quasArgs, [toStatus], [overwite]) ⇒ QuasArgs

writes the args to file with the status passed in

Kind: instance method of QuasarApi
Overrides: logArgsToFile

Param Type Default
quasArgs QuasArgs
[toStatus] string null
[overwite] boolean false

quasarApi.logBuildQueued(quasArgs) ⇒ QuasArgs

logs quasArgs to the jobFile

Kind: instance method of QuasarApi
Overrides: logBuildQueued
Returns: QuasArgs - the quasargs logged with updated argsFile entry

Param Type
quasArgs QuasArgs

quasarApi.logCritical(message, obj, color)

ogs a critical message

Kind: instance method of QuasarApi
Overrides: logCritical

Param Type
message string
obj object
color color

quasarApi.logData(message, obj, color)

Logs a data message

Kind: instance method of QuasarApi
Overrides: logData

Param Type
message string
obj object
color color

quasarApi.logEnd(message, obj, color)

Logs an end message

Kind: instance method of QuasarApi
Overrides: logEnd

Param Type
message string
obj object
color color

quasarApi.logError(message, obj, color)

Logs an error message

Kind: instance method of QuasarApi
Overrides: logError

Param Type
message string
obj object
color color

quasarApi.logInfo(message, obj, color)

Logs an info message (default)

Kind: instance method of QuasarApi
Overrides: logInfo

Param Type
message string
obj object
color color

quasarApi.logSuccess(message, obj, color)

Logs a success message

Kind: instance method of QuasarApi
Overrides: logSuccess

Param Type
message string
obj object
color color

quasarApi.makePromptRequired() ⇒ function

used with inquirer questions to ensure that values entered have a length

Kind: instance method of QuasarApi
Overrides: makePromptRequired

quasarApi.makePromptRequiredAndSanitary() ⇒ function

used with inquirer questions to ensure that values entered from the CLI follow the required ruleset

Kind: instance method of QuasarApi
Overrides: makePromptRequiredAndSanitary

quasarApi.moveTargetFilesToRootOfAssetsPath(quasArgs) ⇒ promise

moves the target html, js, and css files to the assetsFolder

Kind: instance method of QuasarApi
Overrides: moveTargetFilesToRootOfAssetsPath

Param Type
quasArgs QuasArgs

quasarApi.outputToHtmlFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as HTML.

Kind: instance method of QuasarApi
Overrides: outputToHtmlFile
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarApi.outputToJsonFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as JSON.

Kind: instance method of QuasarApi
Overrides: outputToJsonFile
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarApi.outputToTextFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as TXT.

Kind: instance method of QuasarApi
Overrides: outputToTextFile
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarApi.promptConsole(questions, getResults, [showOptional], [optionalOnly]) ⇒ promise

prompts the terminal with questions

Kind: instance method of QuasarApi
Overrides: promptConsole
Returns: promise - the promise of a prompt of the user to the command line interface

Param Type Default Description
questions array the questions to ask the user
getResults function callback after prompt has completed
[showOptional] boolean false
[optionalOnly] boolean

quasarApi.runFromArgsFile(qType, argsFile)

spawns a task to run a quasar from quasArgs saved in a json file.

Kind: instance method of QuasarApi
Overrides: runFromArgsFile

Param Type
qType *
argsFile *

quasarApi.runLastSuccessfulBuild([quasArgs]) ⇒ promise

runs the last successfully recorded argsFile

Kind: instance method of QuasarApi
Overrides: runLastSuccessfulBuild
Returns: promise - resolves to the QuasArgs used

Param Type Default
[quasArgs] QuasArgs

quasarApi.runQuasar(quasar, [quasArgs], registerTask, end) ⇒ promise

Runs a quasar build task

Kind: instance method of QuasarApi
Overrides: runQuasar

Param Type Default Description
quasar string name of the quasar to run
[quasArgs] QuasArgs {}
registerTask bool whether or not to register the quasar with gulp
end function the callback for when the task has completed

quasarApi.unpackSourceFiles(quasArgs, subDirectory) ⇒ promise

unzips or moves source files to the assets folder

Kind: instance method of QuasarApi
Overrides: unpackSourceFiles

Param Type Description
quasArgs QuasArgs
subDirectory string the subdirectory of the assets folder to place the source files

quasarApi.uploadOutputFiles(quasArgs, [excludeFiles]) ⇒ promise

Uploads output files to Amazon S3.

Kind: instance method of QuasarApi
Overrides: uploadOutputFiles

Param Type Default
quasArgs QuasArgs
[excludeFiles] array []

quasarApi.uploadOutputFileAsTxt(quasArgs) ⇒ promise

Uploads the outputFile to Amazon S3.

Kind: instance method of QuasarApi
Overrides: uploadOutputFileAsTxt

Param Type
quasArgs QuasArgs

quasarApi.uploadOutputFileWithMetadata(quasArgs) ⇒ promise

Uploads the outputFile to Amazon S3.

Kind: instance method of QuasarApi
Overrides: uploadOutputFileWithMetadata

Param Type
quasArgs QuasArgs

QuasarCli

Processes command line arguments to run quasar runtime methods.

Kind: global class
Export:

quasarCli.app

returns the application attached to the CLI

Kind: instance property of QuasarCli
Read only: true

quasarCli.applicationRoot

the absolute path to the application root

Kind: instance property of QuasarCli
Read only: true

quasarCli.jobsFolder

the absolute path to the jobs folder

Kind: instance property of QuasarCli
Read only: true

quasarCli.outputRoot

the absolute path to the output root folder

Kind: instance property of QuasarCli
Read only: true

quasarCli.getJobError(jobFile) ⇒ string

extracts the error from the jobfile

Kind: instance method of QuasarCli

Param Type Description
jobFile string the jobFile path

quasarCli.init([appRoot], [outRoot])

creates the application job folders and sets initial vars

Kind: instance method of QuasarCli

Param Type Default
[appRoot] * process.cwd()
[outRoot] string "`${os.homedir()}/Documents/quasar/`"

quasarCli.packageIntoElectronApp() ⇒ promise

runs electron-packager on the applicationRoot and uses the electron.js file for driving the application

Kind: instance method of QuasarCli
Summary: [INCOMPLETE]
Returns: promise - gulp chain

quasarCli.processArgsFile(argsFile, data)

processes a job file and kicks off a build from those args

Kind: instance method of QuasarCli

Param Type Description
argsFile string the path to the argsfile to process
data *

quasarCli.quasarSelectPrompt(tasks) ⇒ promise

prompts the user from the command line with the given tasks

Kind: instance method of QuasarCli

Param Type Description
tasks QuasarTask defaults to available tasks

quasarCli.run([args]) ⇒ promise

runs the command from the arguments passed in from the command line and invocation

Kind: instance method of QuasarCli

Param Type Default
[args] object {}

quasarCli.runProcess(args, resolve, reject) ⇒ promise

runs the arguments as a single batch process

Kind: instance method of QuasarCli

Param Type
args object
resolve function
reject function

quasarCli.spawnElectronApp()

spawns a new instance of electron from the applicationRoot folder

Kind: instance method of QuasarCli

quasarCli.spawnWebApp() ⇒ boolean

spawns the web app and web api in an express application

Kind: instance method of QuasarCli
Returns: boolean - whether or not the web app was successfully run

quasarCli.spawnWebForm() ⇒ boolean

spawns the web form and web api in an express application

Kind: instance method of QuasarCli
Returns: boolean - whether or not the web form was successfully run

quasarCli.watchJobs()

watches the jobs created folder for new files created and process the argsFile as a new quasar build

Kind: instance method of QuasarCli

QuasarConfig

Contains the path information for loading quasar files.

Kind: global class
Export:

quasarConfig.applicationRoot ⇒ string

the absolute path of the application

Kind: instance property of QuasarConfig
Returns: string - application root path
Read only: true

quasarConfig.assetsFolder ⇒ string

the absolute path of the assets folder

Kind: instance property of QuasarConfig
Returns: string - assets folder path
Read only: true

quasarConfig.debrisFolder ⇒ string

the absolute path of the debris folder

Kind: instance property of QuasarConfig
Returns: string - debris folder path
Read only: true

quasarConfig.jobsFolder ⇒ string

the absolute path of the jobs folder

Kind: instance property of QuasarConfig
Returns: string - jobs folder path
Read only: true

quasarConfig.node_modules ⇒ string

the absolute path of the node_modules folder

Kind: instance property of QuasarConfig
Returns: string - node_modules folder path
Read only: true

quasarConfig.outputFolder ⇒ string

the absolute path of the output folder

Kind: instance property of QuasarConfig
Returns: string - output folder path
Read only: true

quasarConfig.quasarsFolder ⇒ string

the absolute path of the quasars folder

Kind: instance property of QuasarConfig
Returns: string - quasars folder path
Read only: true

quasarConfig.sourcesFolder ⇒ string

the absolute path of the sources folder

Kind: instance property of QuasarConfig
Returns: string - sources folder path
Read only: true

quasarConfig.tasks ⇒ array

an array of tasks for this configuration

Kind: instance property of QuasarConfig
Returns: array - list of tasks
Read only: true

quasarConfig.tasks

sets the list of tasks for this configuration

Kind: instance property of QuasarConfig

Param Type
tasks array

quasarConfig.templatesFolder ⇒ string

the absolute path of the templates folder

Kind: instance property of QuasarConfig
Returns: string - templates folder path
Read only: true

quasarConfig.init(applicationRoot, [outputRoot])

initializes the configuration values from an applicationRoot which defaults to the running process location

Kind: instance method of QuasarConfig

Param Type Default Description
applicationRoot string defaults to the running process location
[outputRoot] string null the output root location

DTQuasarTask ⇐ QuasarTask

A quasar task with Digital Trends specific business logic

Kind: global class
Extends: QuasarTask
Export:

dtQuasarTask.getDefaultQuasarQuestions() ⇒ array

returns a list of default prompts for a quasar.

Kind: instance method of DTQuasarTask
Overrides: getDefaultQuasarQuestions
Returns: array - list of default prompts

dtQuasarTask.resolveQuasArgs([args])

sets digital trends specific quasArgs data.

Kind: instance method of DTQuasarTask
Overrides: resolveQuasArgs

Param Type Default
[args] QuasArgs {}

dtQuasarTask.build() ⇒ promise

Builds the quasar into a single outputFile.

Kind: instance method of DTQuasarTask
Returns: promise - the build promise chane

dtQuasarTask.cleanUp()

deletes the assets folder and any other temporary build files

Kind: instance method of DTQuasarTask

dtQuasarTask.getQuasarPrompts() ⇒ array

retrieves the list of inquirer questions to ask the user

Kind: instance method of DTQuasarTask
Returns: array - array of questions
See: https://www.npmjs.com/package/inquirer#questions

dtQuasarTask.promptUser() ⇒ promise

prompts the user from the CLI to get the QuasArgs

Kind: instance method of DTQuasarTask
Returns: promise - prompt promise

dtQuasarTask.registerRequiredQuasArgs([requiredArgs], [optionalRequiredArgs], [clobber])

adds required and optional defined arguments, and the defaults, within the quasArgs

Kind: instance method of DTQuasarTask
Summary: This method expects that the second parameter requiredArgs is an array of objects with the same structure as inquirer's .prompt questions parameter
See: https://www.npmjs.com/package/inquirer#questions

Param Type Default
[requiredArgs] array []
[optionalRequiredArgs] array []
[clobber] boolean true

dtQuasarTask.registerTasks()

register the build tasks for this quasar

Kind: instance method of DTQuasarTask

dtQuasarTask.run([args]) ⇒ promise

Runs the quasar through validation, build, then cleanup.

Kind: instance method of DTQuasarTask

Param Type Default
[args] QuasArgs {}

dtQuasarTask.setConfig(_config, [applicationRoot], [force])

sets the configuration values from the quasar runtime

Kind: instance method of DTQuasarTask

Param Type Default
_config QuasarConfig
[applicationRoot] String process.cwd()
[force] boolean false

dtQuasarTask.setDefaultQuasArgs(qType, [additionalArgs]) ⇒ QuasArgs

sets the default quasArgs including command line arguments in order of priority from: QuasArgs class, additionalArgs param, cliArgs, loaded from file

Kind: instance method of DTQuasarTask

Param Type Default
qType string
[additionalArgs] object {}

dtQuasarTask.setSourceAndOutputPlusArgs([args])

sets the default values of the source and output arguments from user input

Kind: instance method of DTQuasarTask

Param Type Default
[args] QuasArgs {}

dtQuasarTask.setSourceQuaArgsFromSourceFiles(map, defaultKey)

unpacks source files and sets quasArg values using the regex map passed in

Kind: instance method of DTQuasarTask

Param Type
map object
defaultKey string

dtQuasarTask.validateRequiredArgs([args]) ⇒ promise

sets args from quasar form data and runs validation on the final fields

Kind: instance method of DTQuasarTask
Returns: promise - resolves to true if validation is successful

Param Type Default
[args] QuasArgs {}

QuasarElectronApp

Runs the QuasarWebApp in an electron window

Kind: global class
Export:

quasarElectronApp.createWindow([title], [htmlContent]) ⇒ BrowserWindow

creates an electron window

Kind: instance method of QuasarElectronApp

Param Type Default
[title] string "'quasar'"
[htmlContent] string null

quasarElectronApp.electrify() ⇒ BrowserWindow

runs the quasar cli to watch the jobs folder, then creates the app window

Kind: instance method of QuasarElectronApp

quasarElectronApp.getIconFilePath([rootPath], [iconName], [iconExt]) ⇒ BrowserWindow

returns the path to the icon file

Kind: instance method of QuasarElectronApp

Param Type Default
[rootPath] string "appRoot"
[iconName] string "'icon'"
[iconExt] string "'.ico'"

quasarElectronApp.runElectron()

Creates an electron app and sets it up to run quasar

Kind: instance method of QuasarElectronApp

quasarElectronApp.showErrorWindow(error) ⇒ BrowserWindow

creates a window with the content of an error for debugging purposes

Kind: instance method of QuasarElectronApp

Param Type
error *

QuasArgs

The default quasArgs object used in quasar builds.

Kind: global class
Export:

quasArgs.qType : string

This is the main field of a quasar and is used in many places and used to infer build task and template files

Kind: instance property of QuasArgs
Summary: the quasar type

quasArgs.domain : string

This field could be used to designate builds between different pages, or to represent different data types. In the end, it's up to the implementation as to how this is relevant.

Kind: instance property of QuasArgs
Summary: the namespace or global name of the quasar
Example

(the name of a company) 'Toyota'

quasArgs.signature : string

This field is more granular than the field before it, domain, and represents a more specific identifier for something lik a region or position in a document.

Kind: instance property of QuasArgs
Summary: the id or build name of the quasar
Example

(the name of a product) 'Tacoma'

quasArgs.buildUser : string

This field defaults to the machine hostname

Kind: instance property of QuasArgs
Summary: the name of the user who initiated the build

quasArgs.target : string

This field tells quasar to look when targeting a file for a build. If left blank, this will be inferred from the qType variable and fallback to any .html quasar can find between the templates folder and the assets folder.

Kind: instance property of QuasArgs
Summary: the main file to target when building the quasar

quasArgs.status : string

This field changes as the quasar moves through each phase of the build

Kind: instance property of QuasArgs
Summary: the status of the build of quasar
Default: "'created'"
Example

[ 'created', 'queued', 'completed', 'failed' ]

quasArgs.jobTimestamp : string

This field also serves as specific job identifier for the assets folder and can be used to version the output

Kind: instance property of QuasArgs
Summary: the timestamp of the build
Default: "Date.now()"

quasArgs.outputFolder : string

This path is where quasar outputs are saved once the build has finished.

Kind: instance property of QuasArgs
Summary: The absolute path to the output folder
Example

`/${publicFolder}/${domain}/${signature}`

quasArgs.sourcesFolder : string

This path is where sources are downloaded to and pulled from during build time.

Kind: instance property of QuasArgs
Summary: The absolute path to the sources folder

quasArgs.jobsFolder : string

This path is where quasArgs are saved as the build moves through the each status of the build.

Kind: instance property of QuasArgs
Summary: The absolute path to the jobs folder

quasArgs.debrisFolder : string

This path is where quasArgs are saved as the build moves through the each status of the build.

Kind: instance property of QuasArgs
Summary: The absolute path to the debris folder

quasArgs.templatesFolder : string

This path is where quasar gets the template files for the build. This field looks for a folder with the name of the qType.

Kind: instance property of QuasArgs
Summary: The absolute path to the sources folder
Default: "`${args.config.templatesFolder}/${this.qType}`"

quasArgs.assetsFolder : string

This path is where quasar puts the template files for the build to stage for output. Files in this folder are modified ahead of build time and then data from both the quasArgs set by the user are piped into the template files.

Kind: instance property of QuasArgs
Summary: The absolute path to the assets folder
Default: "`${args.config.assetsFolder}/${this.qType}`"

quasArgs.targetFilePath : string

This field is used at build time and cannot be set by the user.

Kind: instance property of QuasArgs
Summary: the full filename of the target
Default: "`${this.qType}.html`"

quasArgs.argsFile : string

This field is used at build time and cannot be set by the user.

Kind: instance property of QuasArgs
Summary: the asbolute path to the jobfile which is saved into the jobs folder under the status
Default: "`${this.jobsFolder}/${this.status}/${this.qType}_${this.jobTimestamp}.json`"

quasArgs.targetEnvironments : array

This field is used to designate a quasar's intended output to differentiate it between a build of the same type used between different use cases only by the environment it is in.

Kind: instance property of QuasArgs
Summary: the acronyms of each environment where this quasar will live

quasArgs.cliArgs : map

Kind: instance property of QuasArgs
Summary: the arguments that the quasar has been run with from the CLI

quasArgs.runArgs : map

Kind: instance property of QuasArgs
Summary: the arguments that the quasar has been run with from the CLI with a jobFile

quasArgs.sourceFileRegexMaps : map

Kind: instance property of QuasArgs
Summary: the regex maps to required args for inferring sourceFile assets

quasArgs.debris : array

This field is a list of js or css files to inject into the output. The contents of the files are piped into script or style tags depending on the file type. Debris are piped into the file only once.

Kind: instance property of QuasArgs
Summary: the list of debris to require with this quasar build.

quasArgs.requiredArgs : array

This field is used with the inquirerjs node package and follows the structure of 'questions'.

Kind: instance property of QuasArgs
Summary: the args that the user can set from a UI.
See: https://github.com/SBoudrias/Inquirer.js/
Example

const questions = [{
				type: 'input',
				name: 'domain',
				shortMessage: 'Domain',
				message: 'Enter the name of the domain to be used in building assets:',
				required: true,
			}];

quasArgs.dbFolder : string

Kind: instance property of QuasArgs
Summary: the name of the folder to upload to when uploading files to Dropbox.

quasArgs.bucket : string

Kind: instance property of QuasArgs
Summary: the name of the bucket to upload to when uploading files to Amazon AWS S3.

quasArgs.logFile : string

If this field is populated then critical level logs will also be saved to the file specified

Kind: instance property of QuasArgs
Summary: the file to log outputs to
Default: "'.log'"

quasArgs.sourceExt : string

This field is appended to the source name when seeking to unpack or copy source files to the assets folder

Kind: instance property of QuasArgs
Summary: the extension of the source file
Default: "'.zip'"

quasArgs.outputExt : string

This field is appended to the outputFile name when building the output.

Kind: instance property of QuasArgs
Summary: the extension of the outputFile
Default: "'.html'"

quasArgs.cdnUrlStart : string

This

Kind: instance property of QuasArgs
Summary: the
Default: "'https=//cdn.com/'"

quasArgs.cssInjectTargets : Array.<string>

These tags are used to search the outputFile and insert default css files found in the template

Kind: instance property of QuasArgs
Summary: a list of the targets for pre and post injection of style tags

quasArgs.jsInjectTargets : Array.<string>

These tags are used to search the outputFile and insert default js files found in the template

Kind: instance property of QuasArgs
Summary: a list of the targets for pre and post injection of script tags

quasArgs.outputVersion : int

This field is not used unless there is another file found with the same id, in which case _${++outputVersion} is appended to the outputFile name.

Kind: instance property of QuasArgs
Summary: the version number to append to the end of a file

quasArgs.uploadOutputFileAsTxtFile : boolean

This will use the Dropbox credentials found in a .config file.

Kind: instance property of QuasArgs
Summary: upload the outputFile to Dropbpx as a .txt file
Default: false

quasArgs.uploadToS3 : boolean

This will use the Amazon AWS IAM credentials found in a .config file.

Kind: instance property of QuasArgs
Summary: upload files to S3 using the domain and signature fields into the destination set in the bucket field.
Default: false

quasArgs.unpackSourceFiles : boolean

This field is mostly used for testing purposes.

Kind: instance property of QuasArgs
Summary: this will flag whether or not to unpack (unzip) the source file
Default: true

quasArgs.minifyScripts : boolean

This field is used at build time to flag whether or not to run minification strategies on injected script files.

Kind: instance property of QuasArgs
Summary: run minification on script files injected
Default: false

quasArgs.minifyStyles : boolean

This field is used at build time to flag whether or not to run minification strategies on injected style files.

Kind: instance property of QuasArgs
Summary: run minification on style files injected
Default: false

quasArgs.minifyHtml : boolean

This field is used at build time to flag whether or not to run minification strategies on the outputFile.

Kind: instance property of QuasArgs
Summary: run minification on html output
Default: false

quasArgs.overwriteUnpackDestination : boolean

This field determines whether or not to preserve or destroy an existing outputFile when copying files to the assets folder during the unpacking of source files.

Kind: instance property of QuasArgs
Summary: overwrite existing assets folder contents on unpack
Default: false

quasArgs.overwriteTargetFileFromTemplate : boolean

This field determines whether or no to override an existing file at the targetFilePath with the file ${qType}.html from the templates folder.

Kind: instance property of QuasArgs
Summary: overwrite the targetFile using the template file
Default: true

quasArgs.cleanUpTargetFileTemplate : boolean

This is a debug field which, if set, will have quasar delete the targetFile after it has been used in the build.

Kind: instance property of QuasArgs
Summary: delete the targetFile
Default: false

quasArgs.useJobTimestampForBuild : boolean

This field, if set, will append the jobTimestamp to assets to ensure uniqueness of the build.

Kind: instance property of QuasArgs
Summary: append the jobTimestamp to the assetsFolder and asset files
Default: true

quasArgs.buildCompletedSuccessfully : boolean

This field is used by the runtime and set upon successful build before outputting the args to file.

Kind: instance property of QuasArgs
Summary: denotes whether or not these quasArgs have been put through a build and have succeeded
Default: false

quasArgs.excludeOutputFileFromUpload : boolean

This is mostly a debug field which allows quasar to not upload the outputFile.

Kind: instance property of QuasArgs
Summary: exclude the outputFile from uploading to Amazon AWS S3
Default: false

quasArgs.wrapInHtmlTags : boolean

This field denotes whether or not the output should be wrapped in html tags.

Kind: instance property of QuasArgs
Summary: wrap the outputFile in html tags
Default: true

quasArgs.versionOutputFile : boolean

This field tells quasar to append the version number to the outputFile if a file exists already with that name in the outputFolder.

Kind: instance property of QuasArgs
Summary: append the version to the outputFile, if one already exists with that name
Default: true

quasArgs.debugAssetsFolder : boolean

This is a debug field that allows a dev to analyze what state the assets files were in before injection and build.

Kind: instance property of QuasArgs
Summary: debug flag for the files used as templates for the build
Default: false

QuasarRuntime

The quasar Runtime [use the quasar API, not this class directly].

Kind: global class
Requires: module:gulp, module:gulp-template, module:gulp-rename, module:gulp-inject-string, module:gulp-insert, module:gulp-concat, module:gulp-flatmap, module:gulp-mustache, module:gulp-clean-css, module:gulp-include, module:gulp-html-beautify, module:gulp-browserify, module:gulp-babel, module:gulp-s3-upload, module:gulp-dropbox, module:gulp-download-files
Export:

new QuasarRuntime()

the build pipeline of the quasar framework

quasarRuntime.config : QuasarConfig

Kind: instance property of QuasarRuntime

quasarRuntime.cleanDevFolders(quasArgs) ⇒ promise

cleans local files in the application root for development testing

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

quasarRuntime.cleanOutputFolders(quasArgs, [allFolders]) ⇒ promise

deletes the contents of the output root folder and all subdirectories

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
[allFolders] boolean false

quasarRuntime.cleanAssetsFolder(quasArgs, subdirectory) ⇒ promise

deletes the contents of the assets folder for this quasar

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs
subdirectory string

quasarRuntime.compileScriptsToAssetsFolder(quasArgs, files, outputFilename) ⇒ promise

Compiles jsx templates in the templates folder and outputs the targetFile into the assets folder.

Kind: instance method of QuasarRuntime
Returns: promise - gulp chain

Param Type Description
quasArgs QuasArgs
files array | string gulp src input
outputFilename string

quasarRuntime.compileStylesToAssetsFolder(quasArgs, files, outputFilename) ⇒ promise

Compiles sass templates in the templates folder, using json files for data input which mirror the input filenames, and outputs the targetFile into the assets folder.

Kind: instance method of QuasarRuntime
Returns: promise - gulp chain

Param Type Description
quasArgs QuasArgs
files array | string gulp src input
outputFilename string

quasarRuntime.compileTargetFileToAssetsFolder(quasArgs) ⇒ promise

compiles mustache templates in the templates folder, using json files for data input which mirror the input filenames, and outputs the targetFile into the assets folder.

Kind: instance method of QuasarRuntime
Returns: promise - gulp chain

Param Type
quasArgs QuasArgs

quasarRuntime.copyFilesFromAssetsFolderToOutput(quasArgs, files, excludeFiles) ⇒ promise

copies files from the assets folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs
files *
excludeFiles *

quasarRuntime.copyFilesFromSourcesFolderToOutput(quasArgs, [files], [excludeFiles]) ⇒ promise

copies files the sources folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
[files] *
[excludeFiles] * []

quasarRuntime.copyFilesFromTemplatesFolderToAssetsFolder(quasArgs, files, [excludeFiles]) ⇒ promise

copies files from the templates folder to the assets folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
files *
[excludeFiles] * []

quasarRuntime.copyFilesFromTemplatesFolderToOutput(quasArgs, files, [excludeFiles]) ⇒ promise

copies files from the templates folder to the output folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
files *
[excludeFiles] * []

quasarRuntime.copyFilesToOutputFolder(quasArgs, fromDirectory, files, [excludeFiles]) ⇒ promise

copies files from a directory to the output folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
fromDirectory *
files *
[excludeFiles] * []

quasarRuntime.copyTemplateFilesToAssetsPath(quasArgs) ⇒ promise

copies files from the templates folder to the assets folder given the quasArgs folder information

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

quasarRuntime.debug(message, obj, condition)

makes a call to log and is used as a canary for testing

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
condition string

quasarRuntime.downloadFileFromUrlToSourcesFolder(quasArgs, url) ⇒ promise

downloads source files from a url into the sources folder to be used at build time

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs
url string

quasarRuntime.downloadSourceFilesToSourcesFolder(quasArgs) ⇒ promise

downloads source files from a url into the sources folder to be used at build time

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

quasarRuntime.findTargetFile(quasArgs, nextPath, originalPath, exhausted) ⇒ string

searches for a target file in the various available folders by name, qType, oType, and extension until it finds one

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs
nextPath string
originalPath string
exhausted string

quasarRuntime.getAvailableSourceFilenames(quasArgs) ⇒ array

gets the filenames of the source extension type from the sources folder

Kind: instance method of QuasarRuntime
Returns: array - list of filenames from sources folder

Param Type
quasArgs QuasArgs

quasarRuntime.getAvailableDebrisFilenames(quasArgs) ⇒ array

gets the debris filenames from the debris folder

Kind: instance method of QuasarRuntime
Returns: array - list of filenames from debris folder

Param Type
quasArgs QuasArgs

quasarRuntime.getAvailableTaskNames() ⇒ array

gets an array of the loaded task names

Kind: instance method of QuasarRuntime

quasarRuntime.getQuasarOutputPath([quasArgs]) ⇒ string

gets the outputPath for quasars

Kind: instance method of QuasarRuntime

Param Type Default
[quasArgs] QuasArgs {}

quasarRuntime.getTaskNames([dir]) ⇒ array

gets the task names from the tasks folder

Kind: instance method of QuasarRuntime

Param Type Default
[dir] string null

quasarRuntime.getTasksAssociatedByOutputType(taskNames, [orderByQuasar]) ⇒ object

gets task names associated with the oType field

Kind: instance method of QuasarRuntime

Param Type Default
taskNames array
[orderByQuasar] boolean false

quasarRuntime.injectCode(quasArgs) ⇒ object

Injects asset file references into the output file in the assets folder.

Kind: instance method of QuasarRuntime
Returns: object - the quasargs used

Param Type
quasArgs QuasArgs

quasarRuntime.injectDebrisFilesIntoStream(quasArgs, contents, [minify]) ⇒ stream

Injects require statements for debris.

Kind: instance method of QuasarRuntime
Returns: stream - the stream written to

Param Type Default
quasArgs QuasArgs
contents stream
[minify] boolean false

quasarRuntime.injectRequiredFilesIntoStream(quasArgs, contents) ⇒ stream

Injects require statements for the default asset files (css and js).

Kind: instance method of QuasarRuntime
Returns: stream - the stream written to

Param Type
quasArgs QuasArgs
contents stream

quasarRuntime.loadTasks(taskPaths, [loadDefaults], [clobber]) ⇒ array

loads the quasar tasks into the gulp taskList

Kind: instance method of QuasarRuntime
Returns: array - the tasks loaded

Param Type Default
taskPaths array
[loadDefaults] boolean false
[clobber] boolean true

quasarRuntime.logArgsToFile(quasArgs, [toStatus], [overwite]) ⇒ QuasArgs

writes the args to file with the status passed in

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
[toStatus] string null
[overwite] boolean false

quasarRuntime.logBuildQueued(quasArgs) ⇒ QuasArgs

logs quasArgs to the jobFile

Kind: instance method of QuasarRuntime
Returns: QuasArgs - the quasargs logged with updated argsFile entry

Param Type
quasArgs QuasArgs

quasarRuntime.logCritical(message, obj, color)

ogs a critical message

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.logData(message, obj, color)

Logs a data message

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.logEnd(message, obj, color)

Logs an end message

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.logError(message, obj, color)

Logs an error message

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.logInfo(message, obj, color)

Logs an info message (default)

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.logSuccess(message, obj, color)

Logs a success message

Kind: instance method of QuasarRuntime

Param Type
message string
obj object
color color

quasarRuntime.makePromptRequired() ⇒ function

used with inquirer questions to ensure that values entered have a length

Kind: instance method of QuasarRuntime

quasarRuntime.makePromptRequiredAndSanitary() ⇒ function

used with inquirer questions to ensure that values entered from the CLI follow the required ruleset

Kind: instance method of QuasarRuntime

quasarRuntime.moveTargetFilesToRootOfAssetsPath(quasArgs) ⇒ promise

moves the target html, js, and css files to the assetsFolder

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

quasarRuntime.outputToHtmlFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as HTML.

Kind: instance method of QuasarRuntime
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarRuntime.outputToJsonFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as JSON.

Kind: instance method of QuasarRuntime
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarRuntime.outputToTextFile(quasArgs) ⇒ object

Compiles the quasar into the outputFile alongside the assets into the outputFolder as TXT.

Kind: instance method of QuasarRuntime
Returns: object - quasArgs including errors if they exist

Param Type
quasArgs QuasArgs

quasarRuntime.promptConsole(questions, getResults, [showOptional], [optionalOnly]) ⇒ promise

prompts the terminal with questions

Kind: instance method of QuasarRuntime
Returns: promise - the promise of a prompt of the user to the command line interface

Param Type Default Description
questions array the questions to ask the user
getResults function callback after prompt has completed
[showOptional] boolean false
[optionalOnly] boolean

quasarRuntime.runFromArgsFile(qType, argsFile)

spawns a task to run a quasar from quasArgs saved in a json file.

Kind: instance method of QuasarRuntime

Param Type
qType *
argsFile *

quasarRuntime.runLastSuccessfulBuild([quasArgs]) ⇒ promise

runs the last successfully recorded argsFile

Kind: instance method of QuasarRuntime
Returns: promise - resolves to the QuasArgs used

Param Type Default
[quasArgs] QuasArgs

quasarRuntime.runQuasar(quasar, [quasArgs], registerTask, end) ⇒ promise

Runs a quasar build task

Kind: instance method of QuasarRuntime

Param Type Default Description
quasar string name of the quasar to run
[quasArgs] QuasArgs {}
registerTask bool whether or not to register the quasar with gulp
end function the callback for when the task has completed

quasarRuntime.unpackSourceFiles(quasArgs, subDirectory) ⇒ promise

unzips or moves source files to the assets folder

Kind: instance method of QuasarRuntime

Param Type Description
quasArgs QuasArgs
subDirectory string the subdirectory of the assets folder to place the source files

quasarRuntime.uploadOutputFiles(quasArgs, [excludeFiles]) ⇒ promise

Uploads output files to Amazon S3.

Kind: instance method of QuasarRuntime

Param Type Default
quasArgs QuasArgs
[excludeFiles] array []

quasarRuntime.uploadOutputFileAsTxt(quasArgs) ⇒ promise

Uploads the outputFile to Amazon S3.

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

quasarRuntime.uploadOutputFileWithMetadata(quasArgs) ⇒ promise

Uploads the outputFile to Amazon S3.

Kind: instance method of QuasarRuntime

Param Type
quasArgs QuasArgs

QuasarTask

A task that can be run by the quasar runtime API.

Kind: global class
Summary: This class can be extended to create custom quasars as shown in the example.
Export:

quasarTask.build() ⇒ promise

Builds the quasar into a single outputFile.

Kind: instance method of QuasarTask
Returns: promise - the build promise chane

quasarTask.cleanUp()

deletes the assets folder and any other temporary build files

Kind: instance method of QuasarTask

quasarTask.getDefaultQuasarQuestions() ⇒ array

returns a list of default prompts for a quasar.

Kind: instance method of QuasarTask
Returns: array - list of default prompts

quasarTask.getQuasarPrompts() ⇒ array

retrieves the list of inquirer questions to ask the user

Kind: instance method of QuasarTask
Returns: array - array of questions
See: https://www.npmjs.com/package/inquirer#questions

quasarTask.promptUser() ⇒ promise

prompts the user from the CLI to get the QuasArgs

Kind: instance method of QuasarTask
Returns: promise - prompt promise

quasarTask.registerRequiredQuasArgs([requiredArgs], [optionalRequiredArgs], [clobber])

adds required and optional defined arguments, and the defaults, within the quasArgs

Kind: instance method of QuasarTask
Summary: This method expects that the second parameter requiredArgs is an array of objects with the same structure as inquirer's .prompt questions parameter
See: https://www.npmjs.com/package/inquirer#questions

Param Type Default
[requiredArgs] array []
[optionalRequiredArgs] array []
[clobber] boolean true

quasarTask.registerTasks()

register the build tasks for this quasar

Kind: instance method of QuasarTask

quasarTask.resolveQuasArgs([args])

method for extended classes to do extra work for quasArgs after validation

Kind: instance method of QuasarTask

Param Type Default
[args] QuasArgs {}

quasarTask.run([args]) ⇒ promise

Runs the quasar through validation, build, then cleanup.

Kind: instance method of QuasarTask

Param Type Default
[args] QuasArgs {}

quasarTask.setConfig(_config, [applicationRoot], [force])

sets the configuration values from the quasar runtime

Kind: instance method of QuasarTask

Param Type Default
_config QuasarConfig
[applicationRoot] String process.cwd()
[force] boolean false

quasarTask.setDefaultQuasArgs(qType, [additionalArgs]) ⇒ QuasArgs

sets the default quasArgs including command line arguments in order of priority from: QuasArgs class, additionalArgs param, cliArgs, loaded from file

Kind: instance method of QuasarTask

Param Type Default
qType string
[additionalArgs] object {}

quasarTask.setSourceAndOutputPlusArgs([args])

sets the default values of the source and output arguments from user input

Kind: instance method of QuasarTask

Param Type Default
[args] QuasArgs {}

quasarTask.setSourceQuaArgsFromSourceFiles(map, defaultKey)

unpacks source files and sets quasArg values using the regex map passed in

Kind: instance method of QuasarTask

Param Type
map object
defaultKey string

quasarTask.validateRequiredArgs([args]) ⇒ promise

sets args from quasar form data and runs validation on the final fields

Kind: instance method of QuasarTask
Returns: promise - resolves to true if validation is successful

Param Type Default
[args] QuasArgs {}

QuasarTask.DTQuasarTask#validateRequiredArgs([args]) ⇒ promise

downloads source files, sets defaults from form args, and copies files to the assets folder

Kind: static method of QuasarTask
Returns: promise - resolves to true if validation is successful

Param Type Default
[args] QuasArgs {}

QuasarWebApp

The web application for running the quasar API and webform.

Kind: global class
Export:

quasarWebApp.port : string

Kind: instance property of QuasarWebApp

quasarWebApp._app : express

Kind: instance property of QuasarWebApp

quasarWebApp.availableTasks : array

Kind: instance property of QuasarWebApp

quasarWebApp.app ⇒ express

retrieves the express instance for the web app

Kind: instance property of QuasarWebApp
Read only: true

quasarWebApp.autoReloadingPageWithMessage([message]) ⇒ string

the content for a loading page with a message

Kind: instance method of QuasarWebApp

Param Type Default
[message] string "`Loading ...`"

quasarWebApp.createJobFile(args) ⇒ promise

Writes a jobFile to the jobs folder

Kind: instance method of QuasarWebApp
Returns: promise - resolves with the created job information

Param Type Description
args QuasArgs the args to create the job with

quasarWebApp.getJob(req, res)

sends the outputFile of a job or the json data about the job if it has not completed

Kind: instance method of QuasarWebApp

Param Type
req *
res *

quasarWebApp.getJobStatus(jobId) ⇒ string

returns the status of a job based on the filename and which job folder it is in

Kind: instance method of QuasarWebApp

Param Type
jobId *

quasarWebApp.getPublicBuild(req, res)

returns the directory view of a domain/signature for a given date range

Kind: instance method of QuasarWebApp

Param Type
req *
res *

quasarWebApp.onTaskDataReceived(req, res) ⇒ promise

creates a jobfile and returns the preliminary data to the response

Kind: instance method of QuasarWebApp
Returns: promise - the json response to the request

Param Type
req *
res *

quasarWebApp.run([app], [port], [start])

runs the express application with webpage and API

Kind: instance method of QuasarWebApp

Param Type Default
[app] express
[port] number
[start] boolean false

quasarWebApp.saveSourceFiles(args) ⇒ QuasArgs

saves an uploaded source file to the sources folder

Kind: instance method of QuasarWebApp
Returns: QuasArgs - the saved QuasArgs

Param Type
args QuasArgs

quasarWebApp.sendJobFileCompleted(job, jobFile) ⇒ promise

sends a response to a client when a job has been completed

Kind: instance method of QuasarWebApp

Param Type
job *
jobFile *

quasarWebApp.sendJobFileQueued(job, jobFile) ⇒ promise

sends a response to a client when a job has been queued

Kind: instance method of QuasarWebApp
Returns: promise - resolves to the job queued information

Param Type
job string
jobFile string