0.0.1 β€’ Published 6 years ago

nuxt-open-in-editor v0.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

nuxt-open-in-editor

npm (scoped with tag) npm CircleCI Codecov Dependencies js-standard-style

Nuxt server middleware to open any file in an editor by request to defined route.

πŸ“– Release Notes

Setup

  • Add nuxt-open-in-editor dependency using yarn or npm to your project
  • Add nuxt-open-in-editor to modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    'nuxt-open-in-editor',

    // With options
    ['nuxt-open-in-editor', { /* module options */ }],
 ]
}

Options

OptionTypeDefaultInfo
pathString/_openTo trigger middleware on any request method to /_open
editorStringcodeEditor to open a file
cmdStringnullCommand to launch an editor
patternStringnullOption to specify arguments for a command
lineNumber1Defines the number of the first line in the editor
columnNumber1Defines the number of the first column in the editor

Supported editors

  • sublime – Sublime Text
  • atom – Atom Editor
  • code – Visual Studio Code
  • webstorm – WebStorm
  • phpstorm - PhpStorm
  • idea14ce – IDEA 14 CE
  • vim – Vim (via Terminal, Mac OS only)
  • emacs – Emacs (via Terminal, Mac OS only)
  • visualstudio – Visual Studio

Usage

Module Description

License

MIT License

Copyright (c) AntΓ©rio Vieira anteriovieira@gmail.com