js-library-boilerplate

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 孙阳旭
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Javascript Library Boilerplate

Library Starter Kit for your Javascript projects
Build Status Publish Status

This is a more robust library boilerplate. For a minimal alternative, check out js-library-boilerplate-basic.

⭐️ Features

  • Webpack 5
  • Babel 7
  • Hot Reloading (npm start)
  • CSS Autoprefixer
  • SASS/SCSS support
  • UMD exports, so your library works everywhere.
  • Based on CRA v4.0.3 (For Vanilla JS libs or React libs)
  • Jest unit testing
  • npm run demo To build a ready-for-deployment demo (Example)
  • Customizable file headers for your build (Example 1) (Example2)
  • Configurable postinstall message (Example)
  • Daily dependabot dependency updates

�� Getting Started

git clone https://github.com/hodgef/js-library-boilerplate.git myLibrary
npm install

�� Customization

Before shipping, make sure to:

  1. Edit LICENSE file
  2. Edit package.json information (These will be used to generate the headers for your built files)
  3. Edit library: "MyLibrary" with your library's export name in ./config/webpack.config.js
  4. Edit ./bin/postinstall (If you would like to display a message on package install)

�� Deployment

  1. npm publish
  2. Your users can include your library as usual

npm

import MyLibrary from 'my-library';
import 'my-library/build/index.css' // If you import a css file in your library

let libraryInstance = new MyLibrary();
...

self-host/cdn

<link href="build/index.css" rel="stylesheet">
<script src="build/index.js"></script>

let MyLibrary = window.MyLibrary.default;
let libraryInstance = new MyLibrary();
...

Libraries built with this boilerplate

Made a library using this starter kit? Share it here by submitting a pull request!

 相关资料
  • Javascript Library Boilerplate Basic Minimal Library Starter Kit for your Javascript projects If you like TypeScript, check out ts-library-boilerplate-basic. Want a more robust (yet bulkier) alternati

  • D3.js star 数:88K D3.js 可能是最流行和使用最广泛的 JavaScript 数据可视化库。D3 用于基于数据的文档操作,并使用 HTML、SVG 和 CSS 让数据活起来。它基于 Web 标准,结合现代浏览器,不需要与专有框架耦合,将可视化组件和数据驱动的方法结合到 DOM 操作上。它允许你将任意数据绑定到文档对象模型(DOM),然后在文档上应用数据转换。 这里有一个很棒的例子

  • 1.Yammer Codehale评测 1.1 简介 堂堂Java界,只有一个Yammer Codehale作为metrics库,其余就是不成熟的Netfilx Servo,以及JavaSimon, JaMon, Perf4j这些单调的更接近的Profiler。所以,Cassandra是用Yammer, Spring Boot里也是用Yammer。 Codehale有几种Metrics类型: Co

  • Ruby comes ``out of the box'' with a large and useful library of modules and classes. This chapter contains a sampling of the more useful of these. Interestingly, and unlike some of the code in later

  • Highlight.js exports a few functions as methods of the hljs object. highlight(languageName, code, ignore_illegals, continuation) Core highlighting function. Accepts a language name, or an alias, and a

  • Ceph is structured into libraries which are built and then combined together to make executables and other libraries. libcommon: a collection of utilities which are available to nearly every ceph libr