@instructure/ui-docs

A webpack plugin to generate documentation made by Instructure Inc.

Stats

StarsIssuesVersionUpdatedCreatedSize
@instructure/ui-docs
3.0.04 years ago4 years agoMinified + gzip package size for @instructure/ui-docs in KB

Readme

npm

Installation

npm install @instructure/ui-docs

Usage

In your webpack config add the plugin:

const path = require('path')
const pkg = require('./package.json')

new DocsPlugin({
  title: `${pkg.name} : ${pkg.description} (${pkg.version})`,
  favicon: path.join(__dirname, 'logo.png'),
  library: {
    packageName: pkg.name,
    packageMain: pkg.main,
    name: 'MyLibrary',
    description: pkg.description,
    version: pkg.version,
    repository: pkg.repository.url,
    author: pkg.author,
    codepen: { // codpen button form data
      js_external: [
        `${pkg.homepage}common.js`,
        `${pkg.homepage}${pkg.name}.js`,
        `${pkg.homepage}globals.js`
      ]
    }
  },
  globals: { // for component playground and codepen examples
    moment: 'moment'
  },
  files: {
    components: [
      path.join(__dirname, 'lib/components/*/index.js') // only top level components
    ],
    docs: [
      path.join(__dirname, 'README.md'),
      path.join(__dirname, 'CHANGELOG'),
      path.join(__dirname, 'docs/*.md')
    ]
  },
  template: path.join(__dirname, 'templates/docs/index.tmpl.html')
})

Browser Support

  • Internet Explorer 11 and Edge
  • Chrome, Safari, Firefox (last two versions)

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.