@linguala/common-dev-dependencies
Common development dependencies for Linguala frontends
Last updated 6 days ago by hexagon6 .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install @linguala/common-dev-dependencies 
SYNC missed versions from official npm registry.

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,
    }
  }
}

Current Tags

  • 3.0.0                                ...           latest (6 days ago)

47 Versions

  • 3.0.0                                ...           6 days ago
  • 2.3.2                                ...           7 days ago
  • 2.3.1                                ...           a month ago
  • 2.3.0                                ...           a month ago
  • 2.2.0                                ...           a month ago
  • 2.1.0                                ...           a month ago
  • 2.0.2                                ...           3 months ago
  • 2.0.1                                ...           4 months ago
  • 2.0.0                                ...           4 months ago
  • 1.6.0                                ...           4 months ago
  • 1.5.4                                ...           6 months ago
  • 1.5.3                                ...           6 months ago
  • 1.5.1                                ...           8 months ago
  • 1.5.2                                ...           8 months ago
  • 1.5.0                                ...           8 months ago
  • 1.4.0                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.2                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
  • 1.0.0-beta.0                                ...           2 years ago
  • 1.0.0-alpha.4                                ...           2 years ago
  • 1.0.0-alpha.3                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
  • 1.0.0-alpha.1                                ...           2 years ago
  • 1.0.0-alpha.0                                ...           2 years ago
  • 0.0.17                                ...           2 years ago
  • 0.0.16                                ...           3 years ago
  • 0.0.15                                ...           3 years ago
  • 0.0.14                                ...           3 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 74
Last Month 76
Dependencies (7)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |