Giter VIP home page Giter VIP logo

nginx-editor's Introduction

nginx-editor

Build & Deploy Issues Forks Stars Open in unpkg npm version

Nginx language plugin for the Monaco Editor. It provides the following features when editing Nginx config files:

  • Syntax highlighting

Quick Start

npm install monaco-editor-nginx

Open in CodeSandbox Open in Github gh-pages

import MonacoEditor from '@uiw/react-monacoeditor';
import 'monaco-editor-nginx';

<MonacoEditor
  ref={editor}
  theme={theme === 'vs-dark' ? 'nginx-theme-dark' : 'nginx-theme'}
  onChange={(value) => {
    setContentDownload(value);
  }}
  language="nginx"
  value={content}
  height="calc(100vh - 36px)"
/>

or, Integrating the ESM version of the Monaco Editor

import * as monaco from 'monaco-editor';
import 'monaco-editor-nginx';

monaco.editor.create(document.getElementById("container"), {
  theme: 'nginx-theme',
  value: 'nginx code.....',
  language: 'nginx'
});

Development

Runs the project in development mode.

# Step 1, run first, listen to the component compile and output the .js file
# listen for compilation output type .d.ts file
npm run watch
# Step 2, development mode, listen to compile preview website instance
npm run start

Builds the app for production to the build folder.

npm run build

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

Related

Contributors

As always, thanks to our amazing contributors!

Made with github-action-contributors.

License

Licensed under the MIT License.

nginx-editor's People

Contributors

jaywcjlove avatar dependabot[bot] avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.