npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bin-editor-next

v1.1.0

Published

基于vue的代码编辑器插件

Downloads

55

Readme

介绍

bin-editor-next 为更好的区分vue版本依赖,现包名已更新为bin-editor-next,组件名不变。

最新版本

NPM version

安装

通过unpkg.com/bin-editor-next 可以看到 bin-editor-next 最新版本的资源,也可以切换版本选择需要的资源,在页面上引入 js 和 css 文件即可开始使用:

<!-- import Vue.js -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!-- import bin-editor-next -->
<script src="https://unpkg.com/[email protected]/lib/index.min.js"></script>

npm 安装

推荐使用npm安装,它能更好地和webpack打包工具配合使用。而且可以更好的和 es6配合使用。并且支持按需引入

npm i bin-editor-next -S
# or 
yarn add bin-editor-next

引入

在 main.js 中写入以下内容:

import { createApp } from 'vue'
import Editor from 'bin-editor-next';
import App from './App.vue';

import * as ace from 'brace'
import 'brace/ext/emmet'
import 'brace/ext/language_tools'
import 'brace/mode/json'
import 'brace/snippets/json'
import 'brace/theme/chrome'

const app = createApp(App)
app.component(Editor.name, Editor)
app.mount('#app', true)

CDN 安装

快速构建一个编辑器需要依赖 ace-builds 构建,去下载对应资源放置到项目中或使用cdn

<script src="../lib/bin-editor-next/src-min-noconflict/ace.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/ext-beautify.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/ext-language_tools.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/mode-json.js"></script>
<script src="../lib/bin-editor-next/src-min-noconflict/snippets/json.js"></script>

<script src="../lib/bin-editor-next/bin-editor-next.min.js"></script>

上面五个是依赖,根据需要实现的语言类型引入

推荐使用npm方式来进行使用,这样可以更好的配合webpack进行构建