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

gulp-tron

v1.0.0-alpha.3

Published

Easy to use, flexible gulp build manager

Downloads

2

Readme

gulp-tron

Easy to use, configuration based gulp build manager. Users can create gulp tasks with simple build configurations. At the same time, javascript can be used to customize and extend the configuration.

Focus on build actions, rather than environment setup.

Note: gulp-tron is the successor of gulp-build-manager, which is no longer maintained.

Installation

npm i gulp-tron --save-dev
npm i gulp --save-dev

gulp should also be installed.

Documentation

Go to Documentation

Key features

  • Quick and easy gulp task creation
  • Watching, reloading, and cleaning with minimal efforts
  • Rich run-time builder API for user build actions
  • Sync and async control for tasks, build actions, and gulp streams for flushing.
  • Automatic Node module installation (npm/pnpm/yarn)
  • Small to large scale project support using modular configuration
  • Pre-defined Buildt-in builders and extensions
  • Custom builders and extension support

Quick example: gulpfile.js

const tron = require('gulp-tron');

const scss = {
    buildName: 'scss',
    builder: (rtb) => {
        const sass = require('gulp-sass');
        rtb.src().pipe(sass().on('error', sass.logError)).dest()
    },
    src: 'assets/scss/**/*.scss',
    dest: 'www/css',
    npmInstall: ['gulp-sass']
}

const scripts = {
    buildName: 'babel',
    builder: (rtb) => {
        const babel = require('gulp-babel');
        rtb.src().pipe(babel()).dest()
    },
    src: 'assets/js/**/*.js',
    dest: 'www/js',
    npmInstall: ['gulp-babel', '@babel/core']
}

const build = {
    buildName: '@build',
    triggers: tron.parallel(scss, scripts),
    clean: 'www/{css,js}'
}

tron.createProject(build)
    .addWatcher({
        watch: 'www/**/*.html',
        browserSync: { server: 'www' }
    })
    .addCleaner();

This gulpfile will create a single project with 5 gulp tasks as following:

  • scss: sass transpiler
  • babel: ES6 transpiler using babel
  • @build: main task running 'scss' and 'babel' in parallel
  • @clean: clean task (default name is @clean)
  • @watch: Full featured watch task with reloading using browser-sync (default name is @watch)

Easier way using built-in builders: gulpfile.js

const tron = require('gulp-tron');

const scss = {
    buildName: 'scss',
    builder: 'GCSSBuilder',
    src: 'assets/scss/**/*.scss',
    dest: 'www/css',
}

const scripts = {
    buildName: 'babel',
    builder: 'GJavaScriptBuilder',
    src: 'assets/js/**/*.js',
    dest: 'www/js',
}

const build = {
    buildName: '@build',
    triggers: tron.parallel(scss, scripts),
    clean: 'www/{css,js}'
}

tron.createProject(build)
    .addWatcher({
        watch: 'www/**/*.html',
        browserSync: { server: 'www' }
    })
    .addCleaner();

Check samples for more examples.