hck2-dev
Development Tools For HCK2
Last updated a year ago by hck2-dev .
MIT · Original npm · Tarball · package.json
$ cnpm install hck2-dev 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.26.0                                ...           latest (a year ago)
  • 1.22.8                                ...           next (2 years ago)

136 Versions

  • 1.26.0                                ...           a year ago
  • 1.25.0                                ...           a year ago
  • 1.24.4                                ...           a year ago
  • 1.24.3                                ...           a year ago
  • 1.24.2                                ...           2 years ago
  • 1.24.1                                ...           2 years ago
  • 1.24.0                                ...           2 years ago
  • 1.23.0                                ...           2 years ago
  • 1.22.9                                ...           2 years ago
  • 1.22.8                                ...           2 years ago
  • 1.22.7                                ...           2 years ago
  • 1.22.6                                ...           2 years ago
  • 1.22.5                                ...           2 years ago
  • 1.22.4                                ...           2 years ago
  • 1.22.3                                ...           2 years ago
  • 1.22.2                                ...           2 years ago
  • 1.22.1                                ...           2 years ago
  • 1.22.0                                ...           2 years ago
  • 1.21.2                                ...           2 years ago
  • 1.21.1                                ...           2 years ago
  • 1.21.0                                ...           2 years ago
  • 1.20.0                                ...           2 years ago
  • 1.19.0                                ...           2 years ago
  • 1.18.2                                ...           2 years ago
  • 1.18.1                                ...           2 years ago
  • 1.18.0                                ...           2 years ago
  • 1.17.2                                ...           2 years ago
  • 1.17.1                                ...           2 years ago
  • 1.17.0                                ...           2 years ago
  • 1.16.0                                ...           2 years ago
  • 1.15.0                                ...           2 years ago
  • 1.14.0                                ...           2 years ago
  • 1.13.9                                ...           2 years ago
  • 1.13.8                                ...           2 years ago
  • 1.13.7                                ...           2 years ago
  • 1.13.6                                ...           2 years ago
  • 1.13.5                                ...           2 years ago
  • 1.13.4                                ...           2 years ago
  • 1.13.3                                ...           2 years ago
  • 1.13.2                                ...           2 years ago
  • 1.13.1                                ...           2 years ago
  • 1.13.0                                ...           2 years ago
  • 1.12.1                                ...           2 years ago
  • 1.12.0                                ...           2 years ago
  • 1.11.5                                ...           2 years ago
  • 1.11.4                                ...           2 years ago
  • 1.11.3                                ...           2 years ago
  • 1.11.2                                ...           2 years ago
  • 1.11.1                                ...           2 years ago
  • 1.11.0                                ...           2 years ago
  • 1.10.2                                ...           2 years ago
  • 1.10.0                                ...           2 years ago
  • 1.9.11                                ...           2 years ago
  • 1.9.10                                ...           2 years ago
  • 1.9.9                                ...           2 years ago
  • 1.9.8                                ...           2 years ago
  • 1.9.7                                ...           2 years ago
  • 1.9.6                                ...           2 years ago
  • 1.9.5                                ...           2 years ago
  • 1.9.4                                ...           2 years ago
  • 1.9.3                                ...           2 years ago
  • 1.9.2                                ...           2 years ago
  • 1.9.1                                ...           2 years ago
  • 1.9.0                                ...           2 years ago
  • 1.8.8                                ...           2 years ago
  • 1.8.7                                ...           2 years ago
  • 1.8.6                                ...           2 years ago
  • 1.8.5                                ...           2 years ago
  • 1.8.4                                ...           2 years ago
  • 1.8.3                                ...           2 years ago
  • 1.8.2                                ...           2 years ago
  • 1.8.1                                ...           2 years ago
  • 1.8.0                                ...           2 years ago
  • 1.7.9                                ...           2 years ago
  • 1.7.8                                ...           2 years ago
  • 1.7.7                                ...           2 years ago
  • 1.7.6                                ...           2 years ago
  • 1.7.5                                ...           2 years ago
  • 1.7.4                                ...           2 years ago
  • 1.7.3                                ...           2 years ago
  • 1.7.2                                ...           2 years ago
  • 1.7.1                                ...           2 years ago
  • 1.7.0                                ...           2 years ago
  • 1.6.9                                ...           2 years ago
  • 1.6.8                                ...           2 years ago
  • 1.6.7                                ...           2 years ago
  • 1.6.6                                ...           2 years ago
  • 1.6.5                                ...           2 years ago
  • 1.6.3                                ...           2 years ago
  • 1.6.2                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.4                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.9                                ...           2 years ago
  • 1.4.8                                ...           2 years ago
  • 1.4.7                                ...           2 years ago
  • 1.4.6                                ...           2 years ago
  • 1.4.5                                ...           2 years ago
  • 1.4.4                                ...           2 years ago
  • 1.4.3                                ...           2 years ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.7                                ...           2 years ago
  • 1.3.6                                ...           2 years ago
  • 1.3.5                                ...           2 years ago
  • 1.3.4                                ...           2 years ago
  • 1.3.3                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.4                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 273
Dependencies (21)
Dev Dependencies (10)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |