zenflow-build-js-lib
A zero-config opinionated and awesome build system for portable js libs
Last updated a year ago by zen_flow .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install zenflow-build-js-lib 
SYNC missed versions from official npm registry.

zenflow-build-js-lib

A minimal-config opinionated and awesome build system for portable js libs

Build Status tested with jest npm version Dependencies Status Greenkeeper badge semantic-release badge License: MIT

Features

  • convention over configuration
  • rollup under the hood
  • babel 6, with whatever presets and plugins you need
  • cjs es & umd formats
  • pretty banners with package name & version, filename, homepage & license

Conventions

  • entry point will be src/index.js
  • externals (non-bundled imports) will be "dependencies" and "peerDependencies"
  • package "main" refers to cjs format file (optional)
  • package "module" refers to es format file (optional)
  • package "browser" refers to umd format file (optional)
  • global export name will be camelized package name
  • global import names will be camelized package names unless specified in pkg.zenflowConfig.build.globals option in package.json

CLI

zenflow-build-js-lib [--prod]

  • --prod - "production mode" - produce sourcemaps and additional minified versions of all js files

Configs

This project strives to eliminate as much configuration as possible, but sometimes it's needed.

In your package.json, at pkg.zenflowConfig.build, add any of the following options:

  • "globals" - Object mapping external package names to their global export names (e.g. {"react-dom": "ReactDOM"})

Example

package.json

{
  "name": "example",
  "version": "1.0.0",
  "main": "dist/example.cjs.js",
  "module": "dist/example.es.js",
  "browser": "dist/example.umd.js",
  "files": [
    "dist/**/*"
  ],
  "homepage": "HOMEPAGE",
  "license": "LICENSE",
  "scripts": {
    "build": "zenflow-build-js-lib --minify --sourcemap"
  },
  "peerDependencies": {
    "react": "^16.0.0",
    "react-dom": "^16.0.0"
  },
  "devDependencies": {
    "zenflow-build-js-lib": "^1.0.0"
  },
  "zenflowConfig": {
    "build": {
      "globals": {
        "react": "React",
        "react-dom": "ReactDOM"
      }
    }
  }
}

Current Tags

  • 3.0.1                                ...           latest (a year ago)

14 Versions

  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 14
This Month 14
Last Day 0
Last Week 0
Last Month 30
Dependencies (12)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |