npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scroungejs

v1.9.11

Published

An obscure build tool starting as an emacs elisp script in 2009

Downloads

25

Readme

scroungejs

[!WARNING] This application is not suitable for production and is missing many tests, if you plan on using it, you are on you own.

scrounge

npm version License: GPL v3 Build Status

An obscure build tool starting as an emacs elisp script in 2009. Scroungejs was used by foxsports.com and ties.com.

scrounge

A test configuration is found in spec/. Below is a config with common options. All options are optional and if you're unsure about an option, you likely don't need it.

await scroungejs({
  version : process.env.npm_package_version,
  inputpath : './src/',
  outputpath : './build/',
  iscompress : true,
  isconcat : false,
  
  // read this template html and output to basepage
  basepagein : './src/index.tpl.html',
  basepage : './build/index.html',
  
  // join contents of these files to top of this tree's file
  prependarr : [{
    treename : 'app.js',
    sourcearr : [
      './node_modules/three/build/three.js',
      './node_modules/hls.js/dist/hls.min.js'
    ]
  }],

  skipdeparr : [
    '/hls.js'
  ],

  // write these trees, the root file of a tree the treename
  treearr : [
    'app.js',
    'app.css'
  ]
});

The example in test/ console-prints something like this when it runs,

[...] start: Tue Apr 03 2018 23:12:23 GMT-0700 (PDT)
[...] root: app.js

scroungejs-1.3.6:~/test/src/app.js
└─┬ scroungejs-1.3.6:~/test/src/views/viewsall.js
. ├─┬ scroungejs-1.3.6:~/test/src/views/viewb.mjs
. │ └─┬ scroungejs-1.3.6:~/test/src/controls/ctrlsall.js
. │   ├─┬ scroungejs-1.3.6:~/test/src/controls/ctrla.js
. │   │ └── scroungejs-1.3.6:~/test/src/models/modela.js
. │   └─┬ scroungejs-1.3.6:~/test/src/controls/ctrlb.js
. │     └── scroungejs-1.3.6:~/test/src/models/modelb.js
. └── scroungejs-1.3.6:~/test/src/views/viewa

[...] ugly: (app.js, .css, 1/2) ./src/views/viewa.less
[...] ugly: (app.js, .css, 2/2) ./src/views/viewb.less
[...] write: ./out/app.css ~25.93kb
[...] ugly: (app.js, .js, 1/9) ./src/models/modela.js
[...] ugly: (app.js, .js, 2/9) ./src/controls/ctrla.js
[...] ugly: (app.js, .js, 3/9) ./src/models/modelb.js
[...] ugly: (app.js, .js, 4/9) ./src/controls/ctrlb.js
[...] ugly: (app.js, .js, 5/9) ./src/controls/ctrlsall.js
[...] ugly: (app.js, .js, 6/9) ./src/views/viewb.mjs
[...] ugly: (app.js, .js, 7/9) ./src/views/viewa.js
[...] ugly: (app.js, .js, 8/9) ./src/views/viewsall.js
[...] ugly: (app.js, .js, 9/9) ./src/app.js
[...] write: ./out/app.js ~2016.23kb
[...] write: ./out/app.js.map
[...] write: ./index.html
[...] finish: 00:00:167 (mm:ss:ms)

It reads index.tpl.html,

<!DOCTYPE html>
<html>
  <head>
    <!-- <scrounge root="app.css"> -->
    <!-- </scrounge> -->
    <!-- <scrounge root="app.js"> -->
    <!-- </scrounge> -->
  </head>
  <body></body>
</html>

It creates and updates a resulting index.html,

<!DOCTYPE html>
<html>
  <head>
    <!-- <scrounge root="app.css"> -->
    <link href="./out/app.css" rel="stylesheet" type="text/css">
    <!-- </scrounge> -->
    <!-- <scrounge root="app.js"> -->
    <script src="./out/app.js" type="text/javascript"></script>
    <!-- </scrounge> -->
  </head>
  <body></body>
</html>

When iswatch is true and concatenate is false, updating a file shows this,

[...] update: scroungejs-1.3.6:~/test/src/lib/library.js
[...] write: ./index.html

scrounge