140tools 中文文档教程

发布于 7年前 浏览 22 项目主页 更新于 3年前



用简单*、现代、跨浏览器的微型框架替换那些大型框架。

*learning the API might be difficult for some users as all object names are one letter, however there is a larger plugin that gives an easier API and more descriptive function names.

140tools 是一个 140 字节大小的脚本的小型集合,它创建了一个功能强大的多用途框架,它小于所有流行的 JavaScript 框架组合

1. Getting Started

1.1. Installation

除了 140tools 是一个小型库之外,它还可以在任何平台上轻松安装。

1.1.1. Node.js

$ npm i 140tools
const T140 = require('140tools');
// or
import * as T140 from '140tools';

1.1.2. JS

  1. <script src="140tools.github.io/cdn/latest.js" />

就这么简单! 您可以使用变量 T140 访问 140tools。

1.2. Pros

  • Absolutely nano
  • Endless possibilities
  • Faster load time
  • Supports all major browsers
  • Replaces almost any library with even more tools
  • Flexible and extensible
  • Professional material design components
  • Fast code

1.3. Cons

  • Confusing API with one-letter names

2. Patches

140tools 的每个版本都称为一个补丁,因为我们不想破坏 1.42 版本。 它有140个生命的意义在里面!

开发者可以打补丁,贡献者也可以。 如果您想为 140tools 做贡献,请使用以下内容:

# NOTE: Requires Node 8.4.0!
$ git clone https://github.com/140tools/140tools.git
$ cd 140tools
$ npm run cli patch add MyPatch
# work your magic in ./patches/MyPatch/
$ npm run cli patch compile MyPatch
$ npm run cli patch finish MyPatch
# upload patch-MyPatch.ct140patch to an issue in GitHub and you're good!

2.1. Applying a patch

$ npm run cli patch apply ./patch-MyPatch.ct140patch
# ./MyPatch/ contains the pathed files


Replace those large frameworks with an easy*, modern, cross-browser tiny framework.

*learning the API might be difficult for some users as all object names are one letter, however there is a larger plugin that gives an easier API and more descriptive function names.

140tools is a tiny collection of 140-byte sized scripts that create a powerful multi-purpose framework smaller than all popular JavaScript frameworks out there combined.

1. Getting Started

1.1. Installation

Along with 140tools being a tiny library, it has an easy installation for any platform.

1.1.1. Node.js

$ npm i 140tools
const T140 = require('140tools');
// or
import * as T140 from '140tools';

1.1.2. JS

  1. <script src="140tools.github.io/cdn/latest.js" />

It's as easy as that! You can access 140tools by using the variable T140.

1.2. Pros

  • Absolutely nano
  • Endless possibilities
  • Faster load time
  • Supports all major browsers
  • Replaces almost any library with even more tools
  • Flexible and extensible
  • Professional material design components
  • Fast code

1.3. Cons

  • Confusing API with one-letter names

2. Patches

Each version of 140tools is called a patch because we don't want to ruin version 1.42. It's got 140 and the meaning of life in it!

Developers can make patches, and so can contributors too. If you want to contribute to 140tools, use the following:

# NOTE: Requires Node 8.4.0!
$ git clone https://github.com/140tools/140tools.git
$ cd 140tools
$ npm run cli patch add MyPatch
# work your magic in ./patches/MyPatch/
$ npm run cli patch compile MyPatch
$ npm run cli patch finish MyPatch
# upload patch-MyPatch.ct140patch to an issue in GitHub and you're good!

2.1. Applying a patch

$ npm run cli patch apply ./patch-MyPatch.ct140patch
# ./MyPatch/ contains the pathed files
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文