
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@auser/metalsmith-watch
Advanced tools
Metalsmith plugin to watch for changes and trigger partial and full rebuilds
Metalsmith plugin to watch for changes and trigger partial and full rebuilds.
$ npm install metalsmith-watch
var metalsmith = require('metalsmith');
var watch = require('metalsmith-watch');
metalsmith(__dirname)
.use(
watch({
paths: {
"${source}/**/*": true,
"templates/**/*": "**/*.md",
},
livereload: true,
})
)
.build();
{"${source}/**/*": true}
)Map of paths to trigger rebuild. Both keys and value accept a glob pattern.
{
"file(s) to watch": "file(s) to rebuild"
}
Value accept a boolean. When a boolean is used, only watched files changed will be rebuilded.
{
"${source}/**/*": true, // every changed files will trigger a rebuild of themselves
"templates/**/*": "**/*", // every templates changed will trigger a rebuild of all files
}
Please note that:
${source}
is replaced by metalsmith.source()
.metalsmith.source()
(because it's the only place where to build files)false
)Allows you to enable a livereload server.
Using a boolean will enable a livereload server on port the default port is 35729
.
Accept a port number to start on the port you need.
To get live reload working properly, you should add the following <script>
in your templates files to enable livereloading of each pages:
<script src="http://localhost:35729/livereload.js"></script>
Make sure to update the port number in the script above accordingly to the port specified.
undefined
)Allows you to define a function to get called after metalsmith has reloaded all the files. If a function is passed, this will be called with the updated files and all options passed.
{
onUpdateCallback: function (files, options) {
// Called on every rebuild
}
}
function(...args) { console.log(prefix, ...args)}
)Function used to display the logs.
true
)Allows you to enable cache invalidation for js files. Convenient if you use some js files for templates (eg: React templates) to get updated components. If disabled you won't get update for changed js files as node/iojs use a cache.
FAQs
Metalsmith plugin to watch for changes and trigger partial and full rebuilds
We found that @auser/metalsmith-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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.