Skip to content

Nodejs build automation utility

Zeioth edited this page Nov 18, 2023 · 9 revisions

When compiler.nvim detects a package.json file in the current working directory, Telescope will be populated with all its script entries.

Hello world

Create a package.json file in your working directory and copy/paste this:

{
  "name": "hello-world-app",
  "version": "1.0.0",
  "scripts": {
    "start": "node index.js"
  }
}

Now let's create the file we are building on the example above: Create index.js in the same directory.

console.log("Hello, World!");

When you open the compiler you will see the option to run it screenshot_2023-11-18_04-03-36_077009168

And this is the result screenshot_2023-11-18_04-03-26_249266649

In the same way you can run hello world, you can execute any command necessary to build your program.

More info

(optionally) You can define the next globals

global defaut value accepted values
NODEJS_PACKAGE_MANAGER npm npm, yarn

Example:

let g:NODEJS_PACKAGE_MANAGER='yarn'

Globals persist between Neovim sessions.

Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy