plugman not working on windows? adding core features to phonegap 3.0 app - plugins

I have followed theese instructions.
installed plugman (command didnt work, so I added this C:\Users\XXX\AppData\Roaming\npm\node_modules\cordova\node_modules.bin to PATH to make 'plugman' command work in cmd).
after getting plugman command to work (it's help was working in console), Ive entered the camera api command:
plugman --platform android --project c:/path/to/app --plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
the output was:
undefined is not a function
what did I do wrong?

I've found an answer on phonegap google group.
To make this work, you need to install git console and then download the plugin with command:
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

The is a bug that was recently submitted and fixed.
You basically need Git installed, yes, but for plugman to work in "cmd.exe" (or any non-Git CLI) you need to have Git/bin in your system path.
Taken from my blog (http://atomicstructure.net/blog/2013/07/phonegap-3-0-troubles):
Click Start, right-click Computer then select Properties. Click Advanced System Settings (top-left) then Environment Variables in the Advanced tab.
Under System variables find the variable called Path and edit that to include the full system path to where Git is installed. So for example, mine now reads:
%SystemRoot%\system32;%SystemRoot%; [snip] ;C:\Program Files (x86)\Git\bin
With the all important bit highlighted in bold. As with Ant and Android Development Tools, you'll need to include the /bin subfolder, too.

Related

How to install a NetBeans plugin via CLI?

Question:
Is there a way to install a downloaded NBM (Netbeans Module) into an already installed Netbeans IDE via CLI?
Current setup
Netbeans 12.3 with Windows 10
Netbeans 12.3 with Linux Mint 20.1
Relevant scenario
If the question comes to your mind 'why aren't you just using the GUI?' or anything like that. Think of the following scenario. When working on an air gapped network with 50 computers you're the one having to install Netbeans plugins on all of that PCs. You're able to put files on those PCs and execute a command via console and you don't want to run around all the buildings and clicking through the process.
Thank you very much in advance.
I think I found a solution. I'll post it here to reflect my research because I've never found a answer on stackoverflow.
When Netbeans is already installed you can use the --help parameter like:
C:\Program Files\NetBeans\netbeans\bin\netbeans64.exe --help
This lists lot of available parameters (which I haven't found a list of on the web) like (shortened):
General options:
--help show this help
--jdkhome <path> path to JDK
--console new open new console for output
Module reload options:
--reload /path/to/module.jar install or reinstall a module JAR file
Additional module options:
--modules
--refresh Refresh all catalogs
--list Prints the list of all modules, their versions and enablement status
--install <arg1>...<argN> Installs provided JAR files as modules
--disable <arg1>...<argN> Disable modules for specified codebase names
--enable <arg1>...<argN> Enable modules for specified codebase names
--update <arg1>...<argN> Updates all or specified modules
--update-all Updates all modules
Core options:
--fontsize <size> set the base font size of the user interface, in points
--userdir <path> use specified directory to store user settings
--nosplash do not show the splash screen
In my case the solution was to use the --install parameter pointing to the jar file to install.Be aware that the NBM files are just containers containing the jar file and some more meta data files like config xml files. You're able to open it via 7zip for example. And you'll have to take care of all the dependencies yourself.

cli: stylelint --help : command not found (mac)

I've been using stylelint-gulp for some time now without issue.
I have stylelint loaded as a npm devDependancy(ie not global, as I dont want it to be global) in my project, and following the instructions I should have the CLI available as well.
however stylelint --help returns "command not found"
I have other modules installed like eslint, and the cli works just fine.
node: v12.11.1
npm: 6.11.3
I also have nvm installed so I've tried switching back to npm --lts but it's still not working. Btw, this is on osx 10.13.6 if it matters.
any advice?
As you don't have stylelint installed globally you won't have the stylelint command available globally.
Similar to noted in the comment above, the best way to use the stylelint command when you don't have it installed globally is to access it via a repo where you do have it installed:
./node_modules/.bin/stylelint "**/*.css"
The short answer:
With any locally installed npm package (ie as a project's devDependancy), you should not expect to be able to run the package's CLI as follows <package_name> --help. You will need to include the full path to the module in the .node_moduels/ directory, just as #netweb has shown in his answer:
./node_modules/.bin/stylelint --help
IMHO Stylelint's documentation page is a tad confusing in this regard, which is why I asked the question.
The longer answer:
To be able to run stylelint --help or any other npm CLI, you would have to† install the package globally, ie: <package_name> -global. In that process, a symlink is created so the <package_name> keyword could be invoked in any directory on the system.
However, there is a category of tools (for example linters) where its usually considered bad practice to install them globally. This is because different projects will likely have conflicting requirements, in which case, having all these tools globally installed quickly becomes problematic. It's best to have these tools installed at the project level as a devDependancy like so: npm install <package_name> --save-dev.
If you are setting up an npm scripts or Continuous Integration systems then you would invoke these tools' CLI by including the path to the local install: ./node_modules/.bin/stylelint "**/*.css"
However, in the terminal, writing the fill path each and every time you want to invoke a tool is painful, so instead, you can use [npx][4] to invoke the locally installed module:
npx stylelint --help
† npm-link, also symlinks your local package as if it was a globally installed. However, except for some specific scenarios, it's very unlikely you want to make globally available a local devDependancy.

How to run ionic app on my mobile device?

I found one answer "adb devices"commend to know list of devices attached.But my doubt is where to type this commend and how to know my android SDK paths connecting with ionic .please exp in detail
1.) Enable debugging over USB
2.) Install drivers for mobile device
3.) Run adb devices in cmd.exe
$ ionic platform add android
$ ionic run android
Chapter 2: Installation
Windows users developing for Android: You'll want to make sure you
have the following installed and set up.
NOTE: Whenever you make changes to the PATH, or any other environment
variable, you'll need to restart or open a new tab in your shell
program for the PATH change to take effect.
Java JDK
Install the most recent Java JDK (NOT just the JRE).
Next, create an environment variable for JAVA_HOME pointing to the
root folder where the Java JDK was installed. So, if you installed the
JDK into C:\Program Files\Java\jdk7, set JAVA_HOME to be this path.
After that, add the JDK's bin directory to the PATH variable as well.
Following the previous assumption, this should be either
%JAVA_HOME%\bin or the full path C:\Program Files\Java\jdk7\bin
Apache Ant
To install Ant, download a zip from here, extract it, move the first
folder in the zip to a safe place, and update your PATH to include the
bin folder in that folder. For example, if you moved the Ant folder to
c:/, you'd want to add this to your PATH: C:\apache-ant-1.9.2\bin.
Android SDK
Installing the Android SDK is also necessary. The Android SDK provides
you the API libraries and developer tools necessary to build, test,
and debug apps for Android.
Cordova requires the ANDROID_HOME environment variable to be set. This
should point to the [ANDROID_SDK_DIR]\android-sdk directory (for
example c:\android\android-sdk).
Next, update your PATH to include the tools/ and platform-tools/
folder in that folder. So, using ANDROID_HOME, you would add both
%ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools.

How do I get debugging to work after building VS Code from source?

I built VS Code from source following the guide How to Contribute. It seems to build fine and launches in Electron.
Problem:
When I try to build vscode-samples, both with the included JavaScript and TypeScript versions (I ran npm install on each first), I'm not able to enter debug mode with F5. It says "Error: No extension installed for 'node' debugging."
Also...
I tried running and debugging an extension I had previously worked on for VS Code (I'm able to do this on the distribution available on http://code.visualstudio.com.
However, I'm getting a similar error:"No extension installed for 'extensionHost' debugging."
Any help would be greatly appreciated. Thanks!
The Dev build version that you are running does not include the node-debugger extension required for debugging node apps.
Lots of VSCode functionality are implemented as extensions, when the product is shipped those extensions are bundled into the released version.
if you need to run the node debugger extension within the build version, you need to add the extension to the OSS build extensions folder, to do that:
cd ~/.vscode-oss-dev/extensions/
git clone https://github.com/Microsoft/vscode-node-debug && cd vscode-node-debug
npm install && gulp build
This will pull the node extensions to dev build extension folder, then will build the extension. Next time you run, the dev build will load this extension, you will be able to do node debugging.

Oh My Zsh - how to use GitHub plugin?

Just enabled github plugin in .zshrc:
plugins=(… guthub …)
After this autocomplete works fine, when I press tab I see:
But then, if, I try to run actual command, e.g.
github create test-repo
I'm getting
zsh: command not found: github
Until now I used simple plugins only with aliases and I'm sure that I'm missing something here :)
The github plugin contains this comment:
# in order to make this work, you will need to have the github gem installed
# http://github.com/defunkt/github-gem
So to use it you'll need to install Ruby, then gem install github.