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

@linguala/common-dev-dependencies

v3.0.3

Published

Common development dependencies for Linguala frontends

Downloads

228

Readme

common-dev-dependencies

This package contains all dependencies for react-based frontends

It should essentially make it easier to deal with

  • ecmascript -> babel-transpilation for each target-platform
  • test-setup
  • handling these common development dependencies for all linguala-packages in a uniform manner.

babel transforms

This setup builds all ES6+ code for the last 2 browser versions and the currently used node version. Based on the babel-preset-env it is decided what kind of babel-transforms should be run on the target platform. In comparison: babel-preset-latest would just apply all babel transforms that are available. We will save some time and resources with this setup as only a subset of transforms need to run.

Usage in your npm (node package module)

Initialize your module with npm init which generates a package.json file folder if you haven't done this already.

Installation

To use @linguala/common-dev-dependencies first install it as a development dependency:

  • Run yarn add --dev @linguala/common-dev-dependencies
  • or npm install --save-dev @linguala/common-dev-dependencies

package.json

  • name Choose a unique name for your package. If it should be published to https://npmjs.com, prefix it with @linguala, e.g. @linguala/ui-atoms. If it is private add a "private": true in package.json.
  • main is the entrypoint for the transpiled ES5 code.
  • module is the entrypoint for all ES6-compatible code if your target platform supports it.
  • scripts.build is the command to run babel (as it is a dependency of @linguala/common-dev-dependencies it is available in node_modules/ after npm install with npm@3+ flat installation)
  • scripts.prepublish is everything that runs when you run npm publish to publish on https://www.npmjs.com/org/linguala.
  • scripts.what say what? run with npm run what, just an example to run commands in the node environment.

package.json from here

{
  "name": "@linguala/example-module",
  "private": true,
  "main": "dist/index.js",
  "module": "src/index.js",
  "scripts": {
    "what": "echo say what?",
    "build": "node_modules/babel-cli/bin/babel.js src --out-dir dist",
    "prepublishOnly": "npm run build",
    "lint": "node_modules/eslint/bin/eslint.js src/",
    "test": "node_modules/ava/cli.js tests/"
  },
  "devDependencies": {
    "@linguala/common-dev-dependencies": "^2.2.0"
  },
  "ava": {
    "files": [
      "tests/**/*.js"
    ],
    "require": [
      "@babel/register"
    ],
    "babel": {
      "extensions": [
        "js",
        "jsx"
      ]
    }
  },
  "babel": {
    "presets": [
      [
        "@babel/env",
        {
          "targets": {
            "browsers": [
              "last 2 versions"
            ],
            "node": "current"
          }
        }
      ],
      "@babel/react"
    ]
  },
  "eslintConfig": {
    "extends": [
      "@linguala/eslint-config"
    ]
  },
  {
    "prettier": {
    "semi": false,
    "singleQuote": true,
    }
  }
}