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

npm-build-seed

v0.0.4

Published

A basic npm build tool seed

Downloads

109

Readme

npm-build-seed

A basic npm build tool seed.

Clone the repo using Git:

git clone [email protected]:jlison/npm-build-seed.git

... or install it with NPM:

npm install npm-build-seed

Basic usage

  1. Install devDependencies if you haven't already: npm install
  2. Place files in their respective folders under: ./src.
  3. Run desired command(s).
  4. Get the output in the ./dist folder.
  5. Cash in, sell out, bro down.

Command list

  • npm run babel - Runs babel transpiler.
  • npm run build - Runs all commands in the right order with async parallel.
  • npm run dev - Runs npm run build on watch.
  • npm run fonts - Copies fonts to ./dist folder. Not very exciting.
  • npm run imgs - Optimizes jpg and png images.
  • npm run sass - Runs sass and transpiles scss code to css.
  • npm run pug - Transpiles pug (a.k.a jade) files to html.
  • npm run test - Runs all the unit tests with jest once.
  • npm run test:watch - Runs npm run test on watch.
  • npm run webpack - Packs all the javascript files into a single file.

Pros of using NPM as a build tool over Gulp or Grunt

  • Gulp and Grunt rely on NPM. NPM does not rely on Gulp or Grunt.
  • NPM is here to stay. Where is Gulp 4? What happened to Grunt?
  • NPM has easy to use "pre and post hooks".
  • NPM scripts are easy to integrate with tools that use the command line.
  • It is simple to pass arguments to an NPM script.
  • You can set environment variables in your NPM scripts using its config directive.
  • It is easy to write and use asynchronous code to run tasks with NPM scripts.
  • It is easy to use pipes and stream to other tasks using NPM

Cons of using NPM scripts as a build tool

  • The need to make the scripts "cross operating system" compatible.

Inspired by the following EggHead Tutorials: https://egghead.io/courses/how-to-use-npm-scripts-as-your-build-tool https://egghead.io/courses/publish-javascript-packages-on-npm