New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lawsafrica/bluebell-monaco

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lawsafrica/bluebell-monaco

Monaco editor tooling for the Bluebell grammar

  • 4.8.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

bluebell-monaco

Bluebell grammar support for the Monaco Editor.

  • Language/syntax rules and a corresponding theme to enable syntax highlighting. Enabled with registerLanguage().
  • Actions for monaco to apply formatting (eg. bold, italics). Enabled with installActions() and triggered using editor.trigger('...', 'format.bold').
  • An Indigo GrammarModel for Bluebell

This repo's AKN-to-text XSLT is automatically updated when bluebell/akn_text.xsl is updated in the Bluebell repo.

Installation

Install with

npm install @lawsafrica/bluebell-monaco

Usage

Configure syntax highlighting by registering the language with monaco:

import { registerLanguage } from "bluebell-monaco";
registerLanguage();

and then specify the language and theme when creating your editor:

import { LANGUAGE_ID, THEME_ID } from "bluebell-monaco";

const editor = monaco.editor.create(elem, {
  language: LANGUAGE_ID,
  theme: THEME_ID
});

Once you have created a monaco editor instance, setup Bluebell-related edit actions like this:

import { installActions } from "bluebell-monaco";
installActions(editor);

// trigger the format.bold action
editor.trigger('your-app', 'format.bold');

Running tests

  1. Install dependencies: npm install
  2. Run tests: npm test

Running demo

There's a small demo editor to test functionality. To use it:

  1. cd demo
  2. npx webpack
  3. run demo/index.html in PyCharm to launch a webserver

Releasing a new version

  1. Make your changes.
  2. Update the version in package.json, according to semver.org
  3. Commit and push.
  4. Create a new release in GitHub releases
  5. Github will package the release automatically

License

Copyright 2020 Laws.Africa.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

FAQs

Package last updated on 21 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc