Catalog npm
Back to packageRELEASE DETAILS

0.1.0

npm

2d-brace

browserify compatible version of the ace editor.

acebrowserbrowserifybundleeditorinlinepackage
Published30 Dec 2024
Direct dependencies5
Transitive dependenciesNot calculated

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.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
browserify
Environment
{
  "local_name": "browserify",
  "alias": false,
  "peer_metadata": null
}
~4.2.0development
opener
Environment
{
  "local_name": "opener",
  "alias": false,
  "peer_metadata": null
}
~1.3.0development
shelljs
Environment
{
  "local_name": "shelljs",
  "alias": false,
  "peer_metadata": null
}
~0.2.6development
tape
Environment
{
  "local_name": "tape",
  "alias": false,
  "peer_metadata": null
}
~4.0.0development
uglify-js
Environment
{
  "local_name": "uglify-js",
  "alias": false,
  "peer_metadata": null
}
~2.2.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-A2nQ8t/yVzClq23KCrod9N5Nzg6GQT5SqcYEz/B3PbZrtn+vTkTCwfv2p2H/pVJj3WCO8C9Hj6nqnT1e0nSdvA==",
  "shasum": "9a2bace82c040a58cecb4fe1ee5bea545f5289c3",
  "tarball": "https://registry.npmjs.org/2d-brace/-/2d-brace-0.1.0.tgz",
  "fileCount": 392,
  "unpackedSize": 8455212,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIGknP6G+GlwgJeDBjfbFVIiglIngrYeGjLHzPrQejLjoAiEAy7JfS8an3G7204JewixUOAcay/fXRQ18pTThfpv4l/E="
    }
  ]
}

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_version:8089074f7e601e9cd0bd9670bd4628d8c9906cf7cddeeedb4dff6280d394c5e6

Other collected versions

View all collected versions →