urbanjs-tools
Development stack for node packages
API documentation
.setupInMemoryTranspile()
Installs in memory transpile and sourcemap support
const tools = ; // optionaltools; tools;
.setGlobalConfiguration(config)
Sets global configuration object
const tools = ;tools
.getGlobalConfiguration()
Returns the global configuration object
const tools = ;const globals = tools;
.getTool(toolName)
Returns a registrable gulp tool: (gulp, taskName, parameters) => void
Please check Tool configuration section for more information about parameters.
const gulp = ;const tools = ;tools;
.initializeTask(gulp, taskName, parameters)
Uses taskName to find the tool and registers it
Use .getTool() to register a task with different name than the name of the tool
Please check Tool configuration section for more information about parameters.
const gulp = ;const tools = ;tools;
.initializeTasks(gulp, parametersByToolName)
Registers all tasks with their parameters
Please check Tool configuration section for more information about parameters.
const gulp = ;const tools = ;tools;
.initializePreset(gulp, presetName, parameters)
Registers a preset with its subtasks
Please check Preset configuration section for more information about parameters.
const gulp = ;const tools = ;tools;tools;
.initializePresets(gulp, parametersByPresetName)
Registers all presets with their subtasks
Please check Preset configuration section for more information about parameters.
const gulp = ;const tools = ;tools;
.initialize(gulp, parametersByTaskNameOrPresetName)
Registers all tasks and presets with their parameters
const gulp = ;const tools = ;tools;
Tool configuration
parameters
argument can be
- true to use defaults
- object to merge it with defaults on root level
- function to get the defaults and return the final configuration (output won't be merged with defaults)
Defaults of tools can be found in packages/<tool>/src/defaults.ts
files e.g. mocha.
Preset Configuration
parameters
argument can be
- true to use default tasks
- array of task names to use it as is
- function to get the defaults and return the final list of task names
Default preset configuration can be found here.