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

@kpdecker/linoleum

v2.2.0

Published

Shared javascript build and testing infrastructure

Downloads

26

Readme

Linoleum

Shared javascript build and testing infrastructure

Base project to avoid duplicating infrastructure boilerplate across javascript projects. Provides linting, es6, code coverage, with source maps all running in node, browser, or electron environments.

That's right I've got a floor.

Usage

Within Gulpfile.js:

// Init global state
var Linoleum = require('@kpdecker/linoleum');

// Include optional linoleum tasks
require('@kpdecker/linoleum-node');
require('@kpdecker/linoleum-webpack');
require('@kpdecker/linoleum-electron');

Global APIs:

  • WATCHING: Set to true if the build is in watch mode.

  • SOURCE_FILES: Glob representing source files. May be overridden.

  • TEST_FILES: Glob representing test files. May be overridden.

  • BUILD_TARGET: Path that build artifacts will be output to. May be overridden.

  • COVERAGE_TARGET: Path that coverage reports will be output to. May be overridden.

  • jsFiles: Helper used to generate the final list js files glob

  • testFiles: Helper used to generate the final list test files glob

  • watch: Helper utility to watch and immediately run a particular command on a set of files:

    Linoleum.watch(Linoleum.SOURCE_FILES, 'cover');

    Will create watch:cover task.

    Accepts an option 3rd argument options, which may define:

    • setup: Task that is called once prior to the first exec of the watched task.
    • onChange: Called prior to exec with an array of the changes that occurred to trigger this cycle.

linoleum/tasks/clean

Defines the clean and clean:always task which will remove all build and coverage output from the project. The clean task will only run once in watch mode, while the clean:always task will run on each invocation.

linoleum/tasks/lint

Defines the lint task which will lint all source and test files.

linoleum/tasks/cover

Defines:

  • cover:untested task which runs empty coverage report to ensure that untested files are included in cover:report.
  • cover:report task which combines raw data from the other coverage tasks and asserts coverage.

Common issues

Node Compile Issues

Newer versions of Node (5+, potentially earlier) may run into native compiler errors under Travis due to older versions of the C++ compiler. This can be resolved via this config:

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-4.8
env:
  - CXX=g++-4.8