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

@videojs/babel-config

v1.0.2

Published

A standard babel config, so that plugins don't need the same script in every repository.

Downloads

1,589

Readme

@videojs/babel-config

Build Status Greenkeeper badge Slack Status

Currently babel configs are the same for most plugins, and most of them are built using this babel config via babel. We have some libraries though that are should not be built using rollup for nodejs consumption, that are currently doing so. So this config while still consumed by videojs-generate-rollup-config can also be used standalone with babel-cli.

Lead Maintainer: Brandon Casey @brandonocasey

Maintenance Status: Stable

Table of Contents

Installation

$ npm install --save-dev @babel/cli @videojs/babel-config

Usage

  1. In your rollup config add a line to delete module builds:
if (config.builds.module) {
  delete config.builds.module;
}
  1. Add a npm scripts for cjs/es dists to your package.json:
{
  "build:cjs": "babel-config-cjs -d ./cjs ./src",
  "build:es": "babel-config-es -d ./es ./src",
  "watch:cjs": "npm run build:cjs -- -w",
  "watch:es": "npm run build:es -- -w"
}
  1. verify that main in package.json is set to the cjs dist. Something like cjs/index.js
  2. verify that module in package.json is set to the es dist. Something like es/index.js
  3. verify that browser in package.json is set to the browser dist. Something like dist/project-name.js
  4. Add es and cjs to vjsstandard.ignore in package.json
  5. Make sure that es/ and cjs/ are in files in package.json
  6. Add /es and /cjs to .gitignore.
  7. Add ./es and ./cjs to the npm script for clean after mkdir -p and rm -rf.
shx rm -rf ./dist ./test/dist ./cjs ./es && shx mkdir -p ./dist ./test/dist ./cjs ./es

Important things

  • When running through babel-config-cjs, babel-config-es, or babel-config-run if the TEST_BUNDLE_ONLY environment variable is set nothing will run! This is to maintain parity with videojs-generate-rollup-config.
  • The babel-config-cjs binary runs babel cli with --verbose and --config-file set to the cjs config exported here.
  • The babel-config-es binary runs babel cli with --verbose and --config-file set to the es config exported here.
  • The babel-config-run binary runs babel cli with --verbose but no config file.

Changing configuration

  1. require the configuration you want to use const config = require('@videojs/babel-config/cjs.js');
  2. Make changes to it and export: module.export = config.
  3. Change the build scripts to babel-config-run --config-file <new-config> ...