Running external commands with files from plugin jar package
Answered
I need to do the following:
- add some javascript and json files to the plugin package jar file. I could put them into src/main/resources/xyz, right?
- in runtime, ensure that Node.js is available. If not available, install on the local system (MacOS, Linux, Windows).
- in runtime, run Node.js with my javascript and json files as command line arguments. Node.js should be able to read these files from the local file system - i.e., these files should be extracted from the plugin jar into the file system before running Node.js command.
Which SDK classes and objects would you recommend to use for each of these tasks?
Please sign in to leave a comment.
1. Yes - or customize the plugin distribution layout task via Gradle build script to use some other directory.
2. Javascript plugin offers API via com.intellij.javascript.nodejs.interpreter.NodeJsInterpreterManager
3. AFAIU com.intellij.openapi.application.PathManager should offer all related API
thanks
2. Hm-m,
Javascript and TypeScript,Node.js,Node.js Remote Interpreter- The plugins are available only in IntelliJ IDEA Ultimate, where they are enabled by default.Our plugin is for Android Studio.
Are there some mechanisms in community IntelliJ that we could use to download or install Node.js from the Web?
There are some utilities for downloading/extracting stuff, but nothing targeting NodeJS specificaly.
com.intellij.util.io.HttpRequests