
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
customize-watch
Advanced tools
A file watcher for customize
customize-watch
is a file watcher for customize
It attaches watchers (using chokidar) to
the files and directories that are relevant for computing a result with customize
.
If files are added, removed or changed the result will be recomputed.
npm install customize-watch
The following example is almost identical to the
"merging another configuration"-example of the customize
-module.
var customize = require('customize-watch')
// Load files from one directory and merge with second
customize()
.registerEngine('files', require('./engine-concat-files'))
.merge({
files: 'dir1'
})
.merge({
files: 'dir2'
})
.watch()
.on('update', function (result) {
console.log('result', result.files)
})
It will generate the same output, but every time the files in dir1
and dir2
are changed,
removed or added, the output will be recomputed. The update
-event will be sent with the result
as argument, every time the computation has finished.
Kind: global class
Promise.<object>
Promise.<object.<Array.<string>>>
EventEmitter
object
function
Recustomize has the same interface as Customize, but instead of storing the current configuration-state, it stores a function that computes the state. The only difference is the watch()-method. It can be used to emit an event every time one of the input files is added, removed or changed.
Param | Type | Description |
---|---|---|
builder | function | a builder function for a Customize object |
Wrapped function. See customize for details
Kind: instance property of Recustomize
Api: private
Wrapped function. See customize for details
Kind: instance property of Recustomize
Api: private
Wrapped function. See customize for details
Kind: instance property of Recustomize
Api: private
Promise.<object>
Return the configuation object
Kind: instance method of Recustomize
Api: private
Promise.<object.<Array.<string>>>
Return a list of files and directories that need to be watched in watch-mode.
Kind: instance method of Recustomize
Returns: Promise.<object.<Array.<string>>>
- a list of paths to files or directories for each engine
Api: private
EventEmitter
Register file-watchers for all relevant files. Rebuild the config and run the appropriate engine, whenever a file has changed.
Kind: instance method of Recustomize
object
Wraps the run(...)-method of the customize object, rebuilding the whole configuration before running.
Kind: instance method of Recustomize
Api: private
function
Wrap the method of a Customize object such that instead of the new Customize object, new Recustomize object with the appropriate builder-function is returned
Kind: inner method of Recustomize
Api: private
Param |
---|
fnName |
customize-watch
is published under the MIT-license.
See LICENSE.md for details.
For release notes, see CHANGELOG.md
See CONTRIBUTING.md.
FAQs
A file watcher for customize
The npm package customize-watch receives a total of 472 weekly downloads. As such, customize-watch popularity was classified as not popular.
We found that customize-watch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.