@0xcda7a/bag-of-tricks 中文文档教程

发布于 4年前 浏览 30 更新于 3年前

cdata's "Bag of Tricks"

这是我用于个人项目和演示的各种标准库。

“包”包含我找到的用于状态管理的常用模式和工具 我自己反复写作。 这个库的一般重点是提供 支持使用最好的现代应用程序构建的轻量级模式 网络上的模式。

一些“技巧”具有更好的知名度、更好的测试和/或更好的功能 备择方案。 通常可以安全地假设,如果某些代码出现在这里, 这是因为以下一项或多项在当时是真实的 补充:

  • Alternatives incurred more byte cost than I cared to take on in a project
  • Alternatives assume Node.js / CommonJS details, making them difficult to use and bundle
  • Alternatives are not suitable for use in conjunction with web components

在某些情况下,某些代码也有最受时间尊重的原因 在这里:因为我想自己写????

Warning: pre-alpha status

当前提供,没有测试、文档或 API 稳定性的任何保证。 极光!

Development

Commands

  • npm run build will build the full project, producing deployable artifacts in the dist folder.
  • npm run watch will watch all files in all relevant project directories for changes and build them as necessary
  • npm run serve will start a static web server with dist as the web root
  • npm run dev will do all three of the above things in order

Layout

  • src contains raw TypeScript sources; compiled JavaScript artifacts go to the lib folder.

cdata's "Bag of Tricks"

This is a standard library of sorts that I use for personal projects and demos.

The "bag" contains common patterns and tools for state management that I find myself writing repeatedly. The general emphasis of this library is to offer feather-weight patterns that support using the best of modern app-building patterns on the web.

Some of the "tricks" have better-known, better-tested and/or better-featured alternatives. It is usually safe to assume that if some code makes its way here, it is because one or more of the following things was true at the time it was added:

  • Alternatives incurred more byte cost than I cared to take on in a project
  • Alternatives assume Node.js / CommonJS details, making them difficult to use and bundle
  • Alternatives are not suitable for use in conjunction with web components

In some cases there is also the most time honored of reasons for some code to be here: because I felt like writing it myself ????

Warning: pre-alpha status

Currently offered without tests, docs or any guarantee of API stability. GLHF!

Development

Commands

  • npm run build will build the full project, producing deployable artifacts in the dist folder.
  • npm run watch will watch all files in all relevant project directories for changes and build them as necessary
  • npm run serve will start a static web server with dist as the web root
  • npm run dev will do all three of the above things in order

Layout

  • src contains raw TypeScript sources; compiled JavaScript artifacts go to the lib folder.
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文