@ibsheet/loader
Version:
Dynamically load support module for IBSheet
112 lines (79 loc) • 3.2 kB
Markdown
# ibsheet-loader
[](https://www.codacy.com/manual/ibsheet/loader?utm_source=github.com&utm_medium=referral&utm_content=ibsheet/loader&utm_campaign=Badge_Grade)
[](https://circleci.com/gh/ibsheet/loader)
[](https://www.npmjs.com/package/@ibsheet/loader)
[](https://snyk.io/test/github/ibsheet/loader)
[](https://github.com/prettier/prettier)
[](https://conventionalcommits.org)
[](https://opensource.org/licenses/MIT)
Dynamically load support module for [IBSheet](https://www.ibsheet.com)
[](http://standardjs.com)
## features
* [x] [TypeScript 3.0](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html)
* [x] [TSLint](https://palantir.github.io/tslint/)
* [x] [standard JS](https://standardjs.com/)
* [x] [Webpack 4](https://webpack.js.org/)
* [x] [Standard Version](https://github.com/conventional-changelog/standard-version)
* [x] ~~[AVA](https://github.com/avajs/ava)~~
* [x] ~~[nyc](https://github.com/istanbuljs/nyc)~~
### continuous integration
* [CircleCI](https://circleci.com) - Continuous Integration and Delivery
* [snyk.io](https://snyk.io) - Continuously find and fix vulnerabilities for npm
* ~~[Codacy](https://www.codacy.com) - Automated code reviews & code analytics~~
* ~~[codecov](https://codecov.io) - leading, dedicated code coverage~~
## documents
* TypeDoc: <https://ibsheet.github.io/loader>
* Manual: <https://ibsheet.github.io/loader-manual>
## installing
Using npm:
```sh
$ npm install @ibsheet/loader
```
Using yarn:
```sh
$ yarn add @ibsheet/loader
```
Using browser:
```html
<script src="https://unpkg.com/@ibsheet/loader/dist/umd/ibsheet-loader.min.js"></script>
```
## example
### note: Browser usage (ES3, ES5)
```js
var loader = window.IBSheetLoader
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
}).createSheet(options)
```
### note: Node.js usage (CommonJS)
```js
var loader = require('@ibsheet/loader')
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
}).createSheet(options)
```
### note: ESModule usage (ES6, TypeScript)
```js
import loader from '@ibsheet/loader'
// or import { IBSheetLoader as loader } from '@ibsheet/loader'
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
}).createSheet(options)
```
## development
run webpack-dev-server `localhost:3033`
```sh
yarn serve
```
### build
```sh
yarn build
```
### document
* generate: `yarn doc`
* publish: `yarn doc:publish`
## license
[MIT](./LICENSE)