@canonical/discourse-rad-parser

1.0.1 • Public • Published

Discourse RAD parser

This script parses the RAD elements generated by Discourse and makes them dynamic.

Usage

  1. Via direct link

To consume the library directly, add a link to the JS file containing an IIFE and call the lib:

<script src="[ INSERT YOUR LOCAL PATH ]/js/discourse-rad-parser.js"></script>
<script>
  drpNs.DiscourseRADParser();
</script>
  1. Via ES6 import
import { DiscourseRADParser } from 'discourse-rad-parser';

Contributing

If you would like to help improve this project, here is a list of commands to help you get started.

Building the discourse-rad-parser

Install the requisite dependencies;

npm install

To build the JS and CSS into the build folder, run:

npm run build

You can view the build files in action by opening the index.html in the root of this project.

Hacking

When developing this project you can run the following command to listen to changes in the src/js/*js and src/sass/*scss folders and build them into the /build folder.

npm run watch

Before submitting your pull request, run the linters, which checks both the JS and Sass for errors.

npm run test

Code licensed LGPLv3 by Canonical Ltd.

With from Canonical

Readme

Keywords

none

Package Sidebar

Install

npm i @canonical/discourse-rad-parser

Weekly Downloads

86

Version

1.0.1

License

ISC

Unpacked Size

134 kB

Total Files

28

Last publish

Collaborators

  • mtruj
  • edlerd
  • seulkee
  • canonical-organization
  • petesfrench
  • petermakowski
  • frankban
  • huwshimi
  • anthonydillon
  • steverydz
  • amylily1011
  • bartaz
  • jpmartinspt