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

jugs

v2.1.2

Published

App generator (J)ade (ug)lify (s)tylus makes development fun again!

Downloads

38

Readme

jugs

Build Status

Example Program

App generator (J)avascript (ug)lify (s)tylus makes development fun again!

  • HMR : Hot Module Reloading
  • Babel : Transpile modern javascript, formerly called 6to5
  • Eslint : Lint your javascript in its modern format
  • Stylus : Powerful CSS Preprocessor with a beautiful syntax
  • Uglify : Both CSS and JS to make your client payloads small and quick to load
  • Parcel : Performant Module bundler

Table of Contents

Changes

09-13-2022:
  Switched Parcel out for vite.js and updated linting rules
02-09-2021:
  Removed slush altogether. Doesn't require another npm module to install
10-22-2019:
  Moved from webpack to Parcel to improve speed and greatly decrease complexity
12-17-2018:
  Webpack now keeps css file separate instead of attached by javascript
  Webpack will now copy files to dist folder and listen to assets automatically
  Simplified file structure even more (/src/app -> /src)
06-05-2018:
  Updated all npm modules to latest versions including webpack
  cleaning of folders is done with webpack instead of npm scripts now
  Using latest `ion-cloud` which is more performant
12-06-2016:
  Webpack now compiles everything, gulp has been removed
  `npm start` will now run everything and compile `dist` folder
  `gulp patch` is possible with `npm` for info: `man npm-version`
  `npm version patch -m "message goes here"`
  Significant performance and accuracy of files improved
01-27-2016:
  Webpack now uses commons bundler for vendor files
  ESLint now ignores vendor files
  gulp bump added `gulp patch` `gulp feature` `gulp release` now supported
11-25-2015:
  Using ESLint instead of JSHint (included settings file as .eslintrc)
  Using Webpack to handle ES2015 modules
  Gulpfile is now ES2015 code
  Removed annoying notification messages

Installation

Simply install this app generator globally:

npm i -g jugs
mkdir appName
cd appName
jugs

Follow the questions and it will finalize by installing all dependencies for you. In order to start the app and have it automatically check for code changes and autoupdate merely run the command:

npm start

And just like that, you're on the way to making your app!

File Structure

Javascript files are compiled together based upon their dependencies declared using ES2015 import statements. You can add additional entry files in the gulpfile under the scripts task. Use include for jade files and import for stylus files.

project
├─dist
│ ├<<────(assets are copied here on compile)
│ ├─ file.js (includes all styles)
│ └─ index.html
├─ src
│ ├─assets
│ │ └─ (imgs/pdf/other go here)
│ ├─ app.js
│ ├─ makeItRain.js
│ └─ app.styl
├─ package.json
└─ readme.md

Notes

The boilerplate comes setup with the perspective of a video game developer, but can be easily transitioned into other avenues. Two very basic libraries are included that I developed : Easel and Ion.

Easel sets up a canvas that will fit the perspective of the window and automatically adjust in size when the window is resized.

Ion is a particle engine made for canvas 2d context. The library is well-documented.

Thanks

This boilerplate of mine is just a combination of great tools, all credit goes to those who actually put in all the hard work to create them.

  • Vite.js has been an instrumental boost in productivity and clean code, allowing the the use of the ES2015 module system. Moving from webpack to vite.js greatly decreased complexity and made starting projects so much easier!
  • Though Pug (formerly Jade,) has been seen predominately as a server-side helper for templating, I find it incredibly helpful on front-end projects where I'm using a build system anyways, as the syntax is far easier to read and reduces duplication of segments with partials.
  • From css to less to sass to Stylus, it's been a long road with css pre-processors, but I finally found one that lets me drop all the redundant syntax and focus more on the design. I love my curly brace languages, but personally think that it gets in-between me and focusing on what's important when dealing with UX, wireframing or general design.
  • No more worrying about vendor prefixes! Autoprefixer has been an instrumental improvement to my workflow when it comes to styling. None of that would be possible without PostCSS and all of the benefits it's brought to frontend development.
  • If you're still coding without a linter like ESLint, I'm not sure whether to give you a high-five for all the hard work or question your dedication for only stupidity.
  • Dropped Traceur for Babel (formerly 6to5) because it has more readable compiled code as well as a much more versatile transpilation story when it comes to upcoming features to javascript. You can gather more specifics on comparisons of the two at their website.

License

MIT