Catalog npm
PACKAGE EXPLORERView in registry

2d-brace

npm

browserify compatible version of the ace editor.

acebrowserbrowserifybundleeditorinlinepackage
Versions collected1
Direct dependencies5From release 0.1.0
Last observed20 Oct, 19:10 UTC

README

Current package documentation

brace

[原始仓库]https://github.com/thlorenz/brace.git

[业务改造仓库]https://github.com/kkYFL/2d-brace.git

Installation

npm install brace

Example

var ace = require('brace');
require('brace/mode/javascript');
require('brace/theme/monokai');

var editor = ace.edit('javascript-editor');
editor.getSession().setMode('ace/mode/javascript');
editor.setTheme('ace/theme/monokai');

Include the above as an entry in your browserify build, add a <div id="javascript-editor"></div> to your html page and a JavaScript editor will appear.

This editor will show error/warning annotations if your browser supports WebWorkers created via a blob URL (see testling support badge on top).

Please consult the detailed example for more information.

Can I use it with TypeScript?

Yes, brace includes modular type definitions so you can do normal import statements and type safety checking with TypeScript. The example above becomes:

import * as ace from 'brace';
import 'brace/mode/javascript';
import 'brace/theme/monokai';

const editor = ace.edit('javascript-editor');
editor.getSession().setMode('ace/mode/javascript');
editor.setTheme('ace/theme/monokai');

Test

npm explore brace
npm test

分支

2d-branch 业务改造分支

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.0Registry latest30 Dec 20245

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
kkyfl/2d-brace

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:10 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:046ff27fa01b8bd4c46e29fb57fbfafc6ba35a770bc5cd2b62cdaf443fa3c617