@ibsheet/loader
Version:
Dynamically load support module for IBSheet
126 lines (94 loc) • 3.75 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://packagephobia.now.sh/result?p=@ibsheet/loader)
[](https://david-dm.org/ibsheet/loader)
[](https://david-dm.org/ibsheet/loader?type=dev)
[](https://snyk.io/test/github/ibsheet/loader)
[](https://github.com/prettier/prettier)
[](https://conventionalcommits.org)
[](https://opensource.org/licenses/MIT)
[](https://github.com/ibsheet/loader/issues)
[](https://discord.gg/H2wyHXb)
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] [AVA](https://github.com/avajs/ava), [nyc](https://github.com/istanbuljs/nyc)
* [x] [Webpack 4](https://webpack.js.org/)
* [x] [Standard Version](https://github.com/conventional-changelog/standard-version)
### continuous integration
* [Codacy](https://www.codacy.com) - Automated code reviews & code analytics
* [CircleCI](https://circleci.com) - Continuous Integration and Delivery
* [codecov](https://codecov.io) - leading, dedicated code coverage
* [snyk.io](https://snyk.io) - Continuously find and fix vulnerabilities for npm
## 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
```js
var loader = window.IBSheetLoader
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
})
loader.createSheet(options)
```
### note: CommonJS usage
```js
const loader = require('@ibsheet/loader')
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
})
loader.createSheet(options)
```
### note: ESModule usage
```js
import loader from '@ibsheet/loader'
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
})
loader.createSheet(options)
```
### note: TypeScript usage
```ts
import { IBSheetLoader as loader } from '@ibsheet/loader'
loader.load({
name: 'ibsheet',
baseUrl: '<publicpath>/ibsheet'
})
loader.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)