Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-haste

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-haste

Node Haste is a dependency management system for static resources for node.js

  • 1.2.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.9K
increased by492.05%
Maintainers
3
Weekly downloads
 
Created
Source

node-haste Build Status

Node Haste is a dependency management system for static resources for node.js

How Does It Work?

The goal of node haste is to build or update a map of static resources in given directories. For that it scans provided directories for static resources: JS, CSS, Images, Tests, etc. Once the resources are found haste compares mtimes to the resources in an existing map. It also checks for package.json configuration changes. It then starts parsing all affected files to extract useful information: dependencies, processing options, size, etc. Once scanned it will update the map with the new data.

Example

var Haste = require('node-haste').Haste;
var loaders = require('node-haste').loaders;

// configure haste facade
var haste = new Haste(
  [
    new loaders.JSLoader({ networkSize: true }),
    new loaders.CSSLoader({ networkSize: true }),
    new ProjectConfigurationLoader(),
    new ResourceLoader()
  ],
  ['html']
);

// return current map, utilizing cache if available
haste.update('.cache', function(map) {
  assert(map instanceof ResourceMap);
});

Testing

Node haste is covered with unit tests. The unit tests use Jasmine. Any compatible runner can be used to run the tests.

$ npm install
$ npm test

FAQs

Package last updated on 03 Dec 2014

Did you know?

Socket

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.

Install

Related posts

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