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-evrythng-tasks

v0.0.13

Published

Common dev tasks framework using Gulp 4 for evrythng.js and plugins.

Downloads

495

Readme

EVRYTHNG.js Gulp tasks framework

js-standard-style

This repo contains common configuration files and tasks to be used across all evrythng.js libraries and plugins.

Getting started

Install using npm:

$ npm install --save-dev gulp-evrythng-tasks

Add pre-defined tasks to your Gulpfile:

const gulp = require('gulp')
require('gulp-evrythng-tasks')(gulp)

Tasks

Linting (Standard.js)

$ gulp lint

Linting uses Standard Code Style to lint all files in your repository, excluding the ones in .gitignore.

If you need additional configuration use the standard configuration object in your package.json:

{
  "standard": {
    "globals": ["fetch"]
  }
}

Building (Rollup)

$ gulp build

This builds two versions of your library (including the minified versions):

  • using ES6 modules: for future use, or to use with next generation bundlers like Webpack 2+ and Rollup;
  • using the UMD pattern: to use across environments and different loaders (globals, AMD, Commonjs)

All libraries should be isomorphic (do not rely on browser and/or Node.js platforms).

Configuration

Add an evrythng.config.js file to the root of your library with the base Rollup configuration:

module.exports = {
  moduleName: 'EVTPlugin',
  external: 'evrythng',
  globals: {
    'evrythng': 'EVT'
  }
}

Additional builds

TODO

  • [ ] Update configuration for generic builds (not just polyfill)
  • [ ] Document configuration file

Testing (Karma + Jasmine)

$ gulp test
$ gulp test:unit
$ gulp test:integration
$ gulp test:int:globals
$ gulp test:int:amd
$ gulp test:int:cjs
$ gulp test:int:node
$ gulp test:int:es6

This tests all the above scenarios using Karma and Jasmine.

Unit tests are loaded via Rollup, so they can use ES6 modules. It also adds istanbul and coveralls reports to the report folder in your project, to be used in Travis CI.

Integration tests test the loading of the compiled library in UMD and ES6 modules environments. UMD integration tests should also be UMD compatible (i.e. have the UMD wrapper). See evrythng.js example.

require-main.js

AMD requires an extra bit of configuration. You need to tell RequireJS where to load your external dependencies from. This is done in the test/require-main.js file. It should also export the dependencies path map to be used in Node.js. See evrythng.js example.

Publishing

TODO

  • [ ] Automate release notes (?)
  • [ ] Document release process

Developing

If you need to update and test gulp-evrythng-tasks while you're working on evrythng.js libraries the best way is to link your local package in the evrythng.js library repo:

In <$cwd>/gulp-evrythng-tasks

$ npm install
$ npm link

In <$cwd>/evrythng-plugin

$ npm link gulp-evrythng-tasks

License

Apache 2.0 License. Copyright (c) EVRYTHNG Ltd.