Socket
Socket
Sign inDemoInstall

@sinclair/hammer

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinclair/hammer - npm Package Compare versions

Comparing version 0.17.2 to 0.18.0

2

index.d.ts

@@ -9,5 +9,5 @@ export { folder, file, shell, watch, delay } from './task/global/index';

private build;
private watch;
private serve;
private run;
private watch;
private monitor;

@@ -14,0 +14,0 @@ private task;

@@ -79,5 +79,5 @@ "use strict";

// -------------------------------------------------------------
// Watch
// Serve
// -------------------------------------------------------------
async watch(options) {
async serve(options) {
const cache = new index_2.Cache({

@@ -94,3 +94,3 @@ key: 'sourcePath',

esm: options.esm,
node: options.platform === 'node',
node: false,
bundle: true,

@@ -103,4 +103,11 @@ watch: true,

const watcher = (0, index_5.watch)([...options.sourcePaths, ...assets.map((asset) => asset.sourcePath)]);
const server = (0, index_6.serve)({
targetDirectory: options.dist,
port: options.port,
cors: options.cors,
sabs: options.sabs,
});
this.disposables.push(watcher);
this.disposables.push(builder);
this.disposables.push(server);
for await (const _ of watcher) {

@@ -114,5 +121,5 @@ const assets = [...(0, index_4.resolve)(options.sourcePaths, options.dist)];

// -------------------------------------------------------------
// Serve
// Run
// -------------------------------------------------------------
async serve(options) {
async run(options) {
const cache = new index_2.Cache({

@@ -123,3 +130,3 @@ key: 'sourcePath',

const builder = new index_3.Build({
platform: 'browser',
platform: 'node',
minify: options.minify,

@@ -130,21 +137,16 @@ sourcemap: options.sourcemap,

esm: options.esm,
node: false,
node: true,
bundle: true,
watch: true,
});
const assets = [...(0, index_4.resolve)(options.sourcePaths, options.dist)];
const assets = [...(0, index_4.resolve)([options.sourcePath], options.dist)];
const actions = cache.update(assets);
await builder.update(actions);
const watcher = (0, index_5.watch)([...options.sourcePaths, ...assets.map((asset) => asset.sourcePath)]);
const server = (0, index_6.serve)({
targetDirectory: options.dist,
port: options.port,
cors: options.cors,
sabs: options.sabs,
});
const watcher = (0, index_5.watch)([options.sourcePath, ...assets.map((asset) => asset.sourcePath)]);
const process = (0, index_7.run)(options.entryPath, options.args);
this.disposables.push(watcher);
this.disposables.push(builder);
this.disposables.push(server);
this.disposables.push(process);
for await (const _ of watcher) {
const assets = [...(0, index_4.resolve)(options.sourcePaths, options.dist)];
const assets = [...(0, index_4.resolve)([options.sourcePath], options.dist)];
watcher.add(assets.map((asset) => asset.sourcePath));

@@ -156,5 +158,5 @@ const actions = cache.update(assets);

// -------------------------------------------------------------
// Run
// Watch
// -------------------------------------------------------------
async run(options) {
async watch(options) {
const cache = new index_2.Cache({

@@ -165,3 +167,3 @@ key: 'sourcePath',

const builder = new index_3.Build({
platform: 'node',
platform: options.platform,
minify: options.minify,

@@ -172,16 +174,14 @@ sourcemap: options.sourcemap,

esm: options.esm,
node: true,
node: options.platform === 'node',
bundle: true,
watch: true,
});
const assets = [...(0, index_4.resolve)([options.sourcePath], options.dist)];
const assets = [...(0, index_4.resolve)(options.sourcePaths, options.dist)];
const actions = cache.update(assets);
await builder.update(actions);
const watcher = (0, index_5.watch)([options.sourcePath, ...assets.map((asset) => asset.sourcePath)]);
const process = (0, index_7.run)(options.entryPath, options.args);
const watcher = (0, index_5.watch)([...options.sourcePaths, ...assets.map((asset) => asset.sourcePath)]);
this.disposables.push(watcher);
this.disposables.push(builder);
this.disposables.push(process);
for await (const _ of watcher) {
const assets = [...(0, index_4.resolve)([options.sourcePath], options.dist)];
const assets = [...(0, index_4.resolve)(options.sourcePaths, options.dist)];
watcher.add(assets.map((asset) => asset.sourcePath));

@@ -188,0 +188,0 @@ const actions = cache.update(assets);

{
"name": "@sinclair/hammer",
"version": "0.17.2",
"version": "0.18.0",
"description": "Build Tool for Browser and Node Applications",

@@ -40,4 +40,4 @@ "author": "sinclairzx81",

"dependencies": {
"esbuild": "^0.15.7"
"esbuild": "0.15.7"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc