- QuasarApi ⇐
QuasarRuntime
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.
- DTQuasarTask ⇐
QuasarTask
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 ⇐
QuasarRuntime
- .config :
QuasarConfig
- .cleanDevFolders(quasArgs) ⇒
promise
- .cleanOutputFolders(quasArgs, [allFolders]) ⇒
promise
- .cleanAssetsFolder(quasArgs, subdirectory) ⇒
promise
- .compileScriptsToAssetsFolder(quasArgs, files, outputFilename) ⇒
promise
- .compileStylesToAssetsFolder(quasArgs, files, outputFilename) ⇒
promise
- .compileTargetFileToAssetsFolder(quasArgs) ⇒
promise
- .copyFilesFromAssetsFolderToOutput(quasArgs, files, excludeFiles) ⇒
promise
- .copyFilesFromSourcesFolderToOutput(quasArgs, [files], [excludeFiles]) ⇒
promise
- .copyFilesFromTemplatesFolderToAssetsFolder(quasArgs, files, [excludeFiles]) ⇒
promise
- .copyFilesFromTemplatesFolderToOutput(quasArgs, files, [excludeFiles]) ⇒
promise
- .copyFilesToOutputFolder(quasArgs, fromDirectory, files, [excludeFiles]) ⇒
promise
- .copyTemplateFilesToAssetsPath(quasArgs) ⇒
promise
- .debug(message, obj, condition)
- .downloadFileFromUrlToSourcesFolder(quasArgs, url) ⇒
promise
- .downloadSourceFilesToSourcesFolder(quasArgs) ⇒
promise
- .findTargetFile(quasArgs, nextPath, originalPath, exhausted) ⇒
string
- .getAvailableSourceFilenames(quasArgs) ⇒
array
- .getAvailableDebrisFilenames(quasArgs) ⇒
array
- .getAvailableTaskNames() ⇒
array
- .getQuasarOutputPath([quasArgs]) ⇒
string
- .getTaskNames([dir]) ⇒
array
- .getTasksAssociatedByOutputType(taskNames, [orderByQuasar]) ⇒
object
- .injectCode(quasArgs) ⇒
object
- .injectDebrisFilesIntoStream(quasArgs, contents, [minify]) ⇒
stream
- .injectRequiredFilesIntoStream(quasArgs, contents) ⇒
stream
- .loadTasks(taskPaths, [loadDefaults], [clobber]) ⇒
array
- .logArgsToFile(quasArgs, [toStatus], [overwite]) ⇒
QuasArgs
- .logBuildQueued(quasArgs) ⇒
QuasArgs
- .logCritical(message, obj, color)
- .logData(message, obj, color)
- .logEnd(message, obj, color)
- .logError(message, obj, color)
- .logInfo(message, obj, color)
- .logSuccess(message, obj, color)
- .makePromptRequired() ⇒
function
- .makePromptRequiredAndSanitary() ⇒
function
- .moveTargetFilesToRootOfAssetsPath(quasArgs) ⇒
promise
- .outputToHtmlFile(quasArgs) ⇒
object
- .outputToJsonFile(quasArgs) ⇒
object
- .outputToTextFile(quasArgs) ⇒
object
- .promptConsole(questions, getResults, [showOptional], [optionalOnly]) ⇒
promise
- .runFromArgsFile(qType, argsFile)
- .runLastSuccessfulBuild([quasArgs]) ⇒
promise
- .runQuasar(quasar, [quasArgs], registerTask, end) ⇒
promise
- .unpackSourceFiles(quasArgs, subDirectory) ⇒
promise
- .uploadOutputFiles(quasArgs, [excludeFiles]) ⇒
promise
- .uploadOutputFileAsTxt(quasArgs) ⇒
promise
- .uploadOutputFileWithMetadata(quasArgs) ⇒
promise
- .config :
quasarApi.config : QuasarConfig
Kind: instance property of QuasarApi
cleans local files in the application root for development testing
Kind: instance method of QuasarApi
Overrides: cleanDevFolders
Param | Type |
---|---|
quasArgs | QuasArgs |
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 |
deletes the contents of the assets folder for this quasar
Kind: instance method of QuasarApi
Overrides: cleanAssetsFolder
Param | Type |
---|---|
quasArgs | QuasArgs |
subdirectory | string |
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 |
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 |
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 |
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 | * |
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] | * |
[] |
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] | * |
[] |
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] | * |
[] |
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] | * |
[] |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
gets an array of the loaded task names
Kind: instance method of QuasarApi
Overrides: getAvailableTaskNames
gets the outputPath for quasars
Kind: instance method of QuasarApi
Overrides: getQuasarOutputPath
Param | Type | Default |
---|---|---|
[quasArgs] | QuasArgs |
{} |
gets the task names from the tasks folder
Kind: instance method of QuasarApi
Overrides: getTaskNames
Param | Type | Default |
---|---|---|
[dir] | string |
null |
gets task names associated with the oType field
Kind: instance method of QuasarApi
Overrides: getTasksAssociatedByOutputType
Param | Type | Default |
---|---|---|
taskNames | array |
|
[orderByQuasar] | boolean |
false |
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 |
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 |
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 |
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 |
ogs a critical message
Kind: instance method of QuasarApi
Overrides: logCritical
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs a data message
Kind: instance method of QuasarApi
Overrides: logData
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an end message
Kind: instance method of QuasarApi
Overrides: logEnd
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an error message
Kind: instance method of QuasarApi
Overrides: logError
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an info message (default)
Kind: instance method of QuasarApi
Overrides: logInfo
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs a success message
Kind: instance method of QuasarApi
Overrides: logSuccess
Param | Type |
---|---|
message | string |
obj | object |
color | color |
used with inquirer questions to ensure that values entered have a length
Kind: instance method of QuasarApi
Overrides: makePromptRequired
used with inquirer questions to ensure that values entered from the CLI follow the required ruleset
Kind: instance method of QuasarApi
Overrides: makePromptRequiredAndSanitary
moves the target html, js, and css files to the assetsFolder
Kind: instance method of QuasarApi
Overrides: moveTargetFilesToRootOfAssetsPath
Param | Type |
---|---|
quasArgs | QuasArgs |
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 |
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 |
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 |
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 |
|
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 | * |
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 |
|
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 |
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 |
Uploads output files to Amazon S3.
Kind: instance method of QuasarApi
Overrides: uploadOutputFiles
Param | Type | Default |
---|---|---|
quasArgs | QuasArgs |
|
[excludeFiles] | array |
[] |
Uploads the outputFile to Amazon S3.
Kind: instance method of QuasarApi
Overrides: uploadOutputFileAsTxt
Param | Type |
---|---|
quasArgs | QuasArgs |
Uploads the outputFile to Amazon S3.
Kind: instance method of QuasarApi
Overrides: uploadOutputFileWithMetadata
Param | Type |
---|---|
quasArgs | QuasArgs |
Processes command line arguments to run quasar runtime methods.
Kind: global class
Export:
- QuasarCli
- .app
- .applicationRoot
- .jobsFolder
- .outputRoot
- .getJobError(jobFile) ⇒
string
- .init([appRoot], [outRoot])
- .packageIntoElectronApp() ⇒
promise
- .processArgsFile(argsFile, data)
- .quasarSelectPrompt(tasks) ⇒
promise
- .run([args]) ⇒
promise
- .runProcess(args, resolve, reject) ⇒
promise
- .spawnElectronApp()
- .spawnWebApp() ⇒
boolean
- .spawnWebForm() ⇒
boolean
- .watchJobs()
returns the application attached to the CLI
Kind: instance property of QuasarCli
Read only: true
the absolute path to the application root
Kind: instance property of QuasarCli
Read only: true
the absolute path to the jobs folder
Kind: instance property of QuasarCli
Read only: true
the absolute path to the output root folder
Kind: instance property of QuasarCli
Read only: true
extracts the error from the jobfile
Kind: instance method of QuasarCli
Param | Type | Description |
---|---|---|
jobFile | string |
the jobFile path |
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/`" |
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
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 | * |
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 |
runs the command from the arguments passed in from the command line and invocation
Kind: instance method of QuasarCli
Param | Type | Default |
---|---|---|
[args] | object |
{} |
runs the arguments as a single batch process
Kind: instance method of QuasarCli
Param | Type |
---|---|
args | object |
resolve | function |
reject | function |
spawns a new instance of electron from the applicationRoot folder
Kind: instance method of QuasarCli
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
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
watches the jobs created folder for new files created and process the argsFile as a new quasar build
Kind: instance method of QuasarCli
Contains the path information for loading quasar files.
Kind: global class
Export:
- QuasarConfig
- .applicationRoot ⇒
string
- .assetsFolder ⇒
string
- .debrisFolder ⇒
string
- .jobsFolder ⇒
string
- .node_modules ⇒
string
- .outputFolder ⇒
string
- .quasarsFolder ⇒
string
- .sourcesFolder ⇒
string
- .tasks ⇒
array
- .tasks
- .templatesFolder ⇒
string
- .init(applicationRoot, [outputRoot])
- .applicationRoot ⇒
the absolute path of the application
Kind: instance property of QuasarConfig
Returns: string
- application root path
Read only: true
the absolute path of the assets folder
Kind: instance property of QuasarConfig
Returns: string
- assets folder path
Read only: true
the absolute path of the debris folder
Kind: instance property of QuasarConfig
Returns: string
- debris folder path
Read only: true
the absolute path of the jobs folder
Kind: instance property of QuasarConfig
Returns: string
- jobs folder path
Read only: true
the absolute path of the node_modules folder
Kind: instance property of QuasarConfig
Returns: string
- node_modules folder path
Read only: true
the absolute path of the output folder
Kind: instance property of QuasarConfig
Returns: string
- output folder path
Read only: true
the absolute path of the quasars folder
Kind: instance property of QuasarConfig
Returns: string
- quasars folder path
Read only: true
the absolute path of the sources folder
Kind: instance property of QuasarConfig
Returns: string
- sources folder path
Read only: true
an array of tasks for this configuration
Kind: instance property of QuasarConfig
Returns: array
- list of tasks
Read only: true
sets the list of tasks for this configuration
Kind: instance property of QuasarConfig
Param | Type |
---|---|
tasks | array |
the absolute path of the templates folder
Kind: instance property of QuasarConfig
Returns: string
- templates folder path
Read only: true
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 ⇐
QuasarTask
- .getDefaultQuasarQuestions() ⇒
array
- .resolveQuasArgs([args])
- .build() ⇒
promise
- .cleanUp()
- .getQuasarPrompts() ⇒
array
- .promptUser() ⇒
promise
- .registerRequiredQuasArgs([requiredArgs], [optionalRequiredArgs], [clobber])
- .registerTasks()
- .run([args]) ⇒
promise
- .setConfig(_config, [applicationRoot], [force])
- .setDefaultQuasArgs(qType, [additionalArgs]) ⇒
QuasArgs
- .setSourceAndOutputPlusArgs([args])
- .setSourceQuaArgsFromSourceFiles(map, defaultKey)
- .validateRequiredArgs([args]) ⇒
promise
- .getDefaultQuasarQuestions() ⇒
returns a list of default prompts for a quasar.
Kind: instance method of DTQuasarTask
Overrides: getDefaultQuasarQuestions
Returns: array
- list of default prompts
sets digital trends specific quasArgs data.
Kind: instance method of DTQuasarTask
Overrides: resolveQuasArgs
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
Builds the quasar into a single outputFile.
Kind: instance method of DTQuasarTask
Returns: promise
- the build promise chane
deletes the assets folder and any other temporary build files
Kind: instance method of DTQuasarTask
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
prompts the user from the CLI to get the QuasArgs
Kind: instance method of DTQuasarTask
Returns: promise
- prompt promise
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 |
register the build tasks for this quasar
Kind: instance method of DTQuasarTask
Runs the quasar through validation, build, then cleanup.
Kind: instance method of DTQuasarTask
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
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 |
{} |
sets the default values of the source and output arguments from user input
Kind: instance method of DTQuasarTask
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
unpacks source files and sets quasArg values using the regex map passed in
Kind: instance method of DTQuasarTask
Param | Type |
---|---|
map | object |
defaultKey | string |
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 |
{} |
Runs the QuasarWebApp in an electron window
Kind: global class
Export:
- QuasarElectronApp
- .createWindow([title], [htmlContent]) ⇒
BrowserWindow
- .electrify() ⇒
BrowserWindow
- .getIconFilePath([rootPath], [iconName], [iconExt]) ⇒
BrowserWindow
- .runElectron()
- .showErrorWindow(error) ⇒
BrowserWindow
- .createWindow([title], [htmlContent]) ⇒
creates an electron window
Kind: instance method of QuasarElectronApp
Param | Type | Default |
---|---|---|
[title] | string |
"'quasar'" |
[htmlContent] | string |
null |
runs the quasar cli to watch the jobs folder, then creates the app window
Kind: instance method of QuasarElectronApp
returns the path to the icon file
Kind: instance method of QuasarElectronApp
Param | Type | Default |
---|---|---|
[rootPath] | string |
"appRoot" |
[iconName] | string |
"'icon'" |
[iconExt] | string |
"'.ico'" |
Creates an electron app and sets it up to run quasar
Kind: instance method of QuasarElectronApp
creates a window with the content of an error for debugging purposes
Kind: instance method of QuasarElectronApp
Param | Type |
---|---|
error | * |
The default quasArgs object used in quasar builds.
Kind: global class
Export:
- QuasArgs
- .qType :
string
- .domain :
string
- .signature :
string
- .buildUser :
string
- .target :
string
- .status :
string
- .jobTimestamp :
string
- .outputFolder :
string
- .sourcesFolder :
string
- .jobsFolder :
string
- .debrisFolder :
string
- .templatesFolder :
string
- .assetsFolder :
string
- .targetFilePath :
string
- .argsFile :
string
- .targetEnvironments :
array
- .cliArgs :
map
- .runArgs :
map
- .sourceFileRegexMaps :
map
- .debris :
array
- .requiredArgs :
array
- .dbFolder :
string
- .bucket :
string
- .logFile :
string
- .sourceExt :
string
- .outputExt :
string
- .cdnUrlStart :
string
- .cssInjectTargets :
Array.<string>
- .jsInjectTargets :
Array.<string>
- .outputVersion :
int
- .uploadOutputFileAsTxtFile :
boolean
- .uploadToS3 :
boolean
- .unpackSourceFiles :
boolean
- .minifyScripts :
boolean
- .minifyStyles :
boolean
- .minifyHtml :
boolean
- .overwriteUnpackDestination :
boolean
- .overwriteTargetFileFromTemplate :
boolean
- .cleanUpTargetFileTemplate :
boolean
- .useJobTimestampForBuild :
boolean
- .buildCompletedSuccessfully :
boolean
- .excludeOutputFileFromUpload :
boolean
- .wrapInHtmlTags :
boolean
- .versionOutputFile :
boolean
- .debugAssetsFolder :
boolean
- .qType :
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
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'
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'
This field defaults to the machine hostname
Kind: instance property of QuasArgs
Summary: the name of the user who initiated the build
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
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' ]
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()"
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}`
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
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
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
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}`"
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}`"
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`"
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`"
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
Kind: instance property of QuasArgs
Summary: the arguments that the quasar has been run with from the CLI
Kind: instance property of QuasArgs
Summary: the arguments that the quasar has been run with from the CLI with a jobFile
Kind: instance property of QuasArgs
Summary: the regex maps to required args for inferring sourceFile assets
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.
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,
}];
Kind: instance property of QuasArgs
Summary: the name of the folder to upload to when uploading files to Dropbox.
Kind: instance property of QuasArgs
Summary: the name of the bucket to upload to when uploading files to Amazon AWS S3.
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'"
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'"
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'"
This
Kind: instance property of QuasArgs
Summary: the
Default: "'https=//cdn.com/'"
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
- QuasarRuntime
- new QuasarRuntime()
- .config :
QuasarConfig
- .cleanDevFolders(quasArgs) ⇒
promise
- .cleanOutputFolders(quasArgs, [allFolders]) ⇒
promise
- .cleanAssetsFolder(quasArgs, subdirectory) ⇒
promise
- .compileScriptsToAssetsFolder(quasArgs, files, outputFilename) ⇒
promise
- .compileStylesToAssetsFolder(quasArgs, files, outputFilename) ⇒
promise
- .compileTargetFileToAssetsFolder(quasArgs) ⇒
promise
- .copyFilesFromAssetsFolderToOutput(quasArgs, files, excludeFiles) ⇒
promise
- .copyFilesFromSourcesFolderToOutput(quasArgs, [files], [excludeFiles]) ⇒
promise
- .copyFilesFromTemplatesFolderToAssetsFolder(quasArgs, files, [excludeFiles]) ⇒
promise
- .copyFilesFromTemplatesFolderToOutput(quasArgs, files, [excludeFiles]) ⇒
promise
- .copyFilesToOutputFolder(quasArgs, fromDirectory, files, [excludeFiles]) ⇒
promise
- .copyTemplateFilesToAssetsPath(quasArgs) ⇒
promise
- .debug(message, obj, condition)
- .downloadFileFromUrlToSourcesFolder(quasArgs, url) ⇒
promise
- .downloadSourceFilesToSourcesFolder(quasArgs) ⇒
promise
- .findTargetFile(quasArgs, nextPath, originalPath, exhausted) ⇒
string
- .getAvailableSourceFilenames(quasArgs) ⇒
array
- .getAvailableDebrisFilenames(quasArgs) ⇒
array
- .getAvailableTaskNames() ⇒
array
- .getQuasarOutputPath([quasArgs]) ⇒
string
- .getTaskNames([dir]) ⇒
array
- .getTasksAssociatedByOutputType(taskNames, [orderByQuasar]) ⇒
object
- .injectCode(quasArgs) ⇒
object
- .injectDebrisFilesIntoStream(quasArgs, contents, [minify]) ⇒
stream
- .injectRequiredFilesIntoStream(quasArgs, contents) ⇒
stream
- .loadTasks(taskPaths, [loadDefaults], [clobber]) ⇒
array
- .logArgsToFile(quasArgs, [toStatus], [overwite]) ⇒
QuasArgs
- .logBuildQueued(quasArgs) ⇒
QuasArgs
- .logCritical(message, obj, color)
- .logData(message, obj, color)
- .logEnd(message, obj, color)
- .logError(message, obj, color)
- .logInfo(message, obj, color)
- .logSuccess(message, obj, color)
- .makePromptRequired() ⇒
function
- .makePromptRequiredAndSanitary() ⇒
function
- .moveTargetFilesToRootOfAssetsPath(quasArgs) ⇒
promise
- .outputToHtmlFile(quasArgs) ⇒
object
- .outputToJsonFile(quasArgs) ⇒
object
- .outputToTextFile(quasArgs) ⇒
object
- .promptConsole(questions, getResults, [showOptional], [optionalOnly]) ⇒
promise
- .runFromArgsFile(qType, argsFile)
- .runLastSuccessfulBuild([quasArgs]) ⇒
promise
- .runQuasar(quasar, [quasArgs], registerTask, end) ⇒
promise
- .unpackSourceFiles(quasArgs, subDirectory) ⇒
promise
- .uploadOutputFiles(quasArgs, [excludeFiles]) ⇒
promise
- .uploadOutputFileAsTxt(quasArgs) ⇒
promise
- .uploadOutputFileWithMetadata(quasArgs) ⇒
promise
the build pipeline of the quasar framework
quasarRuntime.config : QuasarConfig
Kind: instance property of QuasarRuntime
cleans local files in the application root for development testing
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
deletes the contents of the output root folder and all subdirectories
Kind: instance method of QuasarRuntime
Param | Type | Default |
---|---|---|
quasArgs | QuasArgs |
|
[allFolders] | boolean |
false |
deletes the contents of the assets folder for this quasar
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
subdirectory | string |
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 |
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 |
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 |
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 | * |
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] | * |
[] |
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] | * |
[] |
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] | * |
[] |
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] | * |
[] |
copies files from the templates folder to the assets folder given the quasArgs folder information
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
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 |
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 |
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 |
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 |
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 |
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 |
gets an array of the loaded task names
Kind: instance method of QuasarRuntime
gets the outputPath for quasars
Kind: instance method of QuasarRuntime
Param | Type | Default |
---|---|---|
[quasArgs] | QuasArgs |
{} |
gets the task names from the tasks folder
Kind: instance method of QuasarRuntime
Param | Type | Default |
---|---|---|
[dir] | string |
null |
gets task names associated with the oType field
Kind: instance method of QuasarRuntime
Param | Type | Default |
---|---|---|
taskNames | array |
|
[orderByQuasar] | boolean |
false |
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 |
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 |
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 |
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 |
ogs a critical message
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs a data message
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an end message
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an error message
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs an info message (default)
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
Logs a success message
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
message | string |
obj | object |
color | color |
used with inquirer questions to ensure that values entered have a length
Kind: instance method of QuasarRuntime
used with inquirer questions to ensure that values entered from the CLI follow the required ruleset
Kind: instance method of QuasarRuntime
moves the target html, js, and css files to the assetsFolder
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
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 |
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 |
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 |
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 |
|
spawns a task to run a quasar from quasArgs saved in a json file.
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
qType | * |
argsFile | * |
runs the last successfully recorded argsFile
Kind: instance method of QuasarRuntime
Returns: promise
- resolves to the QuasArgs used
Param | Type | Default |
---|---|---|
[quasArgs] | QuasArgs |
|
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 |
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 |
Uploads output files to Amazon S3.
Kind: instance method of QuasarRuntime
Param | Type | Default |
---|---|---|
quasArgs | QuasArgs |
|
[excludeFiles] | array |
[] |
Uploads the outputFile to Amazon S3.
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
Uploads the outputFile to Amazon S3.
Kind: instance method of QuasarRuntime
Param | Type |
---|---|
quasArgs | QuasArgs |
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
- instance
- .build() ⇒
promise
- .cleanUp()
- .getDefaultQuasarQuestions() ⇒
array
- .getQuasarPrompts() ⇒
array
- .promptUser() ⇒
promise
- .registerRequiredQuasArgs([requiredArgs], [optionalRequiredArgs], [clobber])
- .registerTasks()
- .resolveQuasArgs([args])
- .run([args]) ⇒
promise
- .setConfig(_config, [applicationRoot], [force])
- .setDefaultQuasArgs(qType, [additionalArgs]) ⇒
QuasArgs
- .setSourceAndOutputPlusArgs([args])
- .setSourceQuaArgsFromSourceFiles(map, defaultKey)
- .validateRequiredArgs([args]) ⇒
promise
- .build() ⇒
- static
- instance
Builds the quasar into a single outputFile.
Kind: instance method of QuasarTask
Returns: promise
- the build promise chane
deletes the assets folder and any other temporary build files
Kind: instance method of QuasarTask
returns a list of default prompts for a quasar.
Kind: instance method of QuasarTask
Returns: array
- list of default prompts
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
prompts the user from the CLI to get the QuasArgs
Kind: instance method of QuasarTask
Returns: promise
- prompt promise
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 |
register the build tasks for this quasar
Kind: instance method of QuasarTask
method for extended classes to do extra work for quasArgs after validation
Kind: instance method of QuasarTask
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
Runs the quasar through validation, build, then cleanup.
Kind: instance method of QuasarTask
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
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 |
{} |
sets the default values of the source and output arguments from user input
Kind: instance method of QuasarTask
Param | Type | Default |
---|---|---|
[args] | QuasArgs |
{} |
unpacks source files and sets quasArg values using the regex map passed in
Kind: instance method of QuasarTask
Param | Type |
---|---|
map | object |
defaultKey | string |
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 |
{} |
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 |
{} |
The web application for running the quasar API and webform.
Kind: global class
Export:
- QuasarWebApp
- .port :
string
- ._app :
express
- .availableTasks :
array
- .app ⇒
express
- .autoReloadingPageWithMessage([message]) ⇒
string
- .createJobFile(args) ⇒
promise
- .getJob(req, res)
- .getJobStatus(jobId) ⇒
string
- .getPublicBuild(req, res)
- .onTaskDataReceived(req, res) ⇒
promise
- .run([app], [port], [start])
- .saveSourceFiles(args) ⇒
QuasArgs
- .sendJobFileCompleted(job, jobFile) ⇒
promise
- .sendJobFileQueued(job, jobFile) ⇒
promise
- .port :
Kind: instance property of QuasarWebApp
Kind: instance property of QuasarWebApp
Kind: instance property of QuasarWebApp
retrieves the express instance for the web app
Kind: instance property of QuasarWebApp
Read only: true
the content for a loading page with a message
Kind: instance method of QuasarWebApp
Param | Type | Default |
---|---|---|
[message] | string |
"`Loading ...`" |
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 |
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 | * |
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 | * |
returns the directory view of a domain/signature for a given date range
Kind: instance method of QuasarWebApp
Param | Type |
---|---|
req | * |
res | * |
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 | * |
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 |
sends a response to a client when a job has been completed
Kind: instance method of QuasarWebApp
Param | Type |
---|---|
job | * |
jobFile | * |
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 |