This document lists the standard libraries that are pre-integrated into @codebase and available for use in your extensions and projects.
Font Awesome provides scalable vector icons that can be customized with CSS.
Import: Font Awesome is globally available
// Add a Font Awesome icon to an element
element.innerHTML = '<i class="fas fa-save"></i>';Developer-focused icons for programming languages and development tools.
Import: Devicons are available globally.
// Add a Devicon to an element
element.innerHTML = '<i class="devicon-javascript-plain"></i>';GitHub's icon set.
Import: Octicons are available globally.
// Add an Octicon to an element
element.innerHTML = '<i class="octicon octicon-mark-github"></i>';Logic-less templates.
Import: Mustache is available globally.
const Mustache = brackets.getModule("thirdparty/mustache/mustache");
// example
const template = "Hello {{name}}!";
const data = { name: "World" };
const output = Mustache.render(template, data);A modern JavaScript utility library delivering modularity, performance & extras.
Import: Lodash is available globally.
const _ = brackets.getModule("thirdparty/lodash");A markdown parser and compiler.
Import: Marked is available globally.
const marked = brackets.getModule('thirdparty/marked.min');
const html = marked("# I am using __markdown__.");These libraries are available through the Phoenix.libs namespace:
Least Recently Used (LRU) cache implementation.
Import:
const { LRUCache } = Phoenix.libs;
// example
const cache = new LRUCache(100); // Create cache with max 100 items
cache.set('key', 'value');
const value = cache.get('key');Syntax highlighting for code.
Import:
const { hljs } = Phoenix.libs;
// see hilight js docs for usageCharacter encoding conversion.
Import:
const { iconv } = Phoenix.libs;
// Example
const buffer = iconv.encode("Hello", 'utf8');
const text = iconv.decode(buffer, 'utf8');Glob matching and pattern matching.
Import:
const { picomatch } = Phoenix.libs;
// Example
const isMatch = picomatch('.js');
console.log(isMatch('file.js')); // true
console.log(isMatch('file.css')); // false- All libraries are pre-loaded when your extension starts up
- Some libraries are available globally through the
windowobject - Phoenix-specific libraries are accessed through
Phoenix.libs - Version information for each library can be found in the package dependencies