Skip to content

Latest commit

 

History

History
133 lines (99 loc) · 3.74 KB

README_ENG.md

File metadata and controls

133 lines (99 loc) · 3.74 KB

The best third party JS library scaffolder. By forking or cloning the repository, you can complete the basic framework for building a new library.

Characteristics

  • Coded in ES6, easily compile and generate production code
  • Integrated babel-runtime (Default set to closed)
  • Third parties rely on automatic injection
  • Supports default browsers
  • Supports AMD,CMD
  • Supports Webpack,Rollup,fis, and more
  • Supports Node
  • Integrated unit test environment
  • Integrated eslint
  • Integrated travis-ci
  • Supports banner

Note: When export and export default are not used at the same time, there is the option to turn on legacy mode. Under legacy mode, the module system can be compatible with IE6-8. For more information on legacy mode, please see rollup supplemental file.

Compatibility

Unit tests guarantee support on the following environment:

  • Node 4+
  • Safari 6+ (Mac)
  • iOS 5+ Safari
  • Chrome 23+ (Windows, Mac, Android, iOS, Linux, Chrome OS)
  • Firefox 4+ (Windows, Mac, Android, Linux)
  • Internet Explorer 6+ (Windows, Windows Phone)
  • Opera 10+ (Windows, linux, Android)

Directory

├── demo - Using demo
├── dist - Compiler output code
├── doc - Project documents
├── src - Source code directory
├── test - Unit tests
├── CHANGELOG.md - Change log
└── TODO.md - Planned functions

Usage Instructions

Using npm, download and install the code.

$ npm install --save jslib_base

If you are in a node enviroment:

var base = require('jslib_base');

If you are in a webpack or similar environment:

import base from 'jslib_base';

If you are in a requirejs environment:

requirejs(['node_modules/jslib_base/dist/index.aio.js'], function (base) {
    // xxx
})

If you are in a browser environment:

<script src="node_modules/jslib_base/dist/index.aio.js"></script>

Documents

API

Contribution Guide

For first time contributors, you need to install the dependencies first.

$ npm install

To build the project:

$ npm run build

To run unit tests:

$ npm test
  • Note: The browser environment needs to be tested manually under test/browser

Modify the version number in package.json, modify the version number in README.md, modify the CHANGELOG.md, and then release the new version.

$ npm run release

Publish the new version to NPM.

$ npm publish

You may need to modify the following files in your project:

  • The messages in README.md
  • The messages in package.json
  • The messages in config/rollup.js
  • The repository name in test/browser/index.html

Change Log

CHANGELOG.md

Future Planned Functions

TODO.md

Current Users