I am in the process of porting a CLI library from Ruby over to Node.js. In my code I execute several third party binaries when necessary. I am not sure how best to accomplish this in Node.  Here's an example in Ruby where I call PrinceXML to co...
I am writing a batch script in order to beautify JavaScript code. It needs to work on both Windows and Linux.   How can I beautify JavaScript code using the command line tools?...
I'm getting started with Grunt and wanting to pass a variable to a PhantomJS script I'm running via exec. What I want to be able to do is pass a url in for the script to take the screen capture from. Any help would be greatly appreciated, tha...
I would like to have a console window (a command line) on Windows 7 which will allow me to play with JavaScript just like a python console.  Update: It's important to have a file access from within the console (or script run through it)....
I am new to the whole ES6 concept and I am currently trying to use the export and import modules. I have a simple code that just logs something to the console. Below are the codes  autoincrementId.js  export default function autoincrementId() {   ret...
I need to set an environment variable from Node (currently using v8.9.3)  Ideally, I would like to run export DATA_DIR=/var/lib/data when the program starts.  1. Tried spawning a child_process to set this, but it does not appear to work.  Example:  c...
To run a node command within the "context" of your installed node_modules, you can make an entry in the scripts field of package.json.  Eg:  ...   "scripts": {     "test": "mocha --recursive test/**/*.js --compilers js:bab...
I have one specific task in my gulpfile that is isolated from the other tasks and never needs to run as part of the rest of the build process. I'd like to put it in a separate gulpfile and execute that on its own.  How can I use gulp with a gulpf...
Synchronous child process calls are now available in the versions of Node.js that are under development (i.e. unstable). This is great news for writing shell scripts, as it will allow code like this:  var history = child_process.execSync('git log...
I've got a Node.js CLI I've been building using the Commander Library. Here's the code from the main execution file.  #!/usr/bin/env node  var program = require('commander'); var scmStash = require('./lib/hdqc/scmStash');...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.