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

hck2-dev

v1.26.0

Published

Development Tools For HCK2

Downloads

111

Readme

hck2-dev

Pre-Install

$ npm install gulp -g

Install

NPM

$ npm init -y
$ npm install hck2-dev --save

Yarn

$ yarn add hck2-dev

Update

NPM

$ npm update

Yarn

$ yarn add hck2-dev

Usage

run 'gulp'

Activate/Deactive Turbolinks v5.1.1 in "./Boilerplate/src/js/init.js"

    // Change the value to Activate/Deactive Turbolinks v5.1.1
    window.turbolinks = true;

CLI Commands

SASS Page Specific File Structure Generator

$ gulp --sass http://LocalOrRemote.com/first-page/second-page

SASS Page Specific Component Generator

$ gulp --sass http://LocalOrRemote.com/first-page/second-page~testComponent

Generate SASS Global Component

$ gulp --sass ~componentName

Use this command to generate a init.js with file structure. This function executes only on that page

$ gulp --initPage http://localhost:5000/first-page/second-page

or

$ gulp --js http://localhost:5000/first-page/second-page

Generate JavaScript Page Component (Generates: './page/firstPage/secondPage/testComponent.js)

$ gulp --js http://localhost:5000/first-page/second-page~testComponent

Generate JavaScript Page Sub Component (Generates: './page/firstPage/secondPage/testComponent/subComponent.js)

$ gulp --js http://localhost:5000/first-page/second-page~testComponent~subComponent

Generate External JavaScript Component (Generates: './external/componentName.js)

/* How To Use

    External.js('componentName', function(){
        components.componentName.init();
    });

*/
$ gulp --js ~componentName --external

Generate JavaScript Global Component (Generates: './components/globalComponent.js)

$ gulp --js ~globalComponent

Generate JavaScript Global Sub Component (Generates: './components/googleMaps/fetchData.js)

$ gulp --js ~googleMaps~fetchData

Watches 'JS' & 'SASS' folder for any changes. Runs 'gulp sass' or 'gulp js'

$ gulp
$ gulp watch

SASS Compiler

$ gulp sass

Babel transpiler with ESLint

$ gulp js

Minifies SASS

$ gulp sass --prod

Seperates SASS into multiple files - app.css, app-mobile.css, app-tablet.css, app-desktop.css

$ gulp sass --seperate

Minifies Javascript with Babel transpiler

$ gulp js --prod

Executes both "gulp js --prod" & "gulp sass --prod"

$ gulp prod

Installs Jigsaw (Requires Composer To Be Installed Globally)

$ gulp jigsaw

Starts Jigsaw Server

$ gulp

Image Optimizer

$ gulp image
$ gulp

Sitespeed.io Web Performance Test

$ gulp sitespeed --http://google.com

Fetches and Minifes the provided URLs. Output folder './Minified'

$ gulp minify
hck2.gulp.task('minify', function () {
    hck2.minify([
        'https://google.com',
        'cnn.com',
        'https://twitter.com/about'
    ]);
});

Tests Accessibility for the provided URL

$ gulp access
hck2.gulp.task('access', function () {

    // Enter URL or path to .html file
    var url = 'https://www.couchsurfing.com/';

    // WCAG2A, WCAG2AA, WCAG2AAA, and Section508
    var accessibilityLevel = 'WCAG2AA';

    var reportLevels = {
        notice: false,
        warning: true,
        error: true
    }

    hck2.accessibility(url, accessibilityLevel, reportLevels);
});

Webpage load tester

$ gulp stress
hck2.gulp.task('stress', function () {

    var url = 'https://www.example.com';
    var concurrent = 10;
    var requestsPerSecond = 5;
    var maxSeconds = 30;

    hck2.stressTest(url, concurrent, requestsPerSecond, maxSeconds);
});

Critical Path CSS Generator

$ gulp critical
hck2.gulp.task('critical', function () {

    var stylesheet = './public/css/app.css';
    var output = './public/css/'; //critical.css
    var url = 'https://example.com';
    var width = 1300;
    var height = 900; 

    hck2.criticalCSS(stylesheet, output, url, width, height);
});

Image Sprites Generator

$ gulp sprites
hck2.gulp.task('sprites', function () {

    var input = './src/images/*.png';
    var output = './src/images/output/';

    hck2.sprites(input, output);
});

License

MIT