@instructure/ui-docsdeprecated

A webpack plugin to generate documentation made by Instructure Inc.

Usage no npm install needed!

<script type="module">
  import instructureUiDocs from 'https://cdn.skypack.dev/@instructure/ui-docs';
</script>

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