1.0.1 • Published 2 years ago

@canonical/discourse-rad-parser v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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