How to integrate GruntJS with Netbeans 7.3? - netbeans

How do I integrate Grunt into Netbeans 7.3, or alternatively allow Netbeans define some external script/program to exec as part of a build.
This is so I can setup Netbeans to compile Less into CSS automatically.

You don't have to change anything in Netbeans.
You should only use the Grunt to compile LESS into CSS, minify your scripts, etc.
Grunt will run in the background and will compile your LESS files into CSS files whenever you make any changes in this files.
Install Node.js (Grunt is running on node.js)
https://nodejs.org/en/download/package-manager/
Install Grunt
http://gruntjs.com/getting-started
On grunt webpage go to plugins subpage and install:
grunt-contrib-watch
grunt-contrib-less
On each plugins subpage you have exact instructions how to set them up.

You can use java to convert from less to css.Or why do you need configuration in NetBeans?You can create a grunt task,call it with terminal,and task will convert what you need.

Related

Customize babel configuration in project created using create-react-app

I want to use a babel plugin (babel-plugin-module-resolver) in a project created using create-react-app.
I know how to change babel configuration using npm run eject, but I would like to avoid it.
I was going to use react-app-rewired but I heard that there is the possibility to configure babel without ejecting and without additional libraries.
(if possible), how can I do it?

Is it possible to skip maven-javadoc-plugin execution in an Eclipse run configuration?

I have a few Maven projects in Eclipse 2019-6 that each include the maven-javadoc-plugin (v2.8) in their pom (which I don't want to modify), but in some cases I'd like to skip building the javadoc.jar when I run maven package or install through Eclipse (because for a couple of these projects, the javadoc.jar takes a fair amount of time to build).
Is there an argument I can pass through the Eclipse m2 run configuration that will allow me to skip the javadoc.jar when I run a package or install locally?
I've searched fair amount for tutorials or documentation of m2 run configurations in Eclipse and haven't found anything much more than "here's how to set up a Maven run configuration" with no extra options or advanced configurations.
I really appreciate any help!
You can try adding maven.javadoc.skip=true in the build parameters table of your launch configuration (equivalent to -Dmaven.javadoc.skip=true in a CLI build)

How to clone Ionic project to production

I have an Ionic Project, with all plugins, and libs and I am a little lost on how to manage so many plugins and libs.
Sometimes I install a plugin, test and after that install a couple of other plugins, and so on. After some time, I have so many plugins and I donĀ“t remember what are useful and what are not useful.
So, I would like to create another folder with a fresh version of my project, with only the necessary plugins and libs.
I am now using gulp to minify and uglyfy my code, and I will put all my minified files in this new folder.
So, my questions are:
Is there a simple way to verify what are the plugins and libs really necessary, without need to see it one by one ?
Is there a way to clone all my original project to another one, after I have already cleaned up the original folder ?
Thanks.
when you adding a plugin, you should call
ionic plugin "plugin-name" --save
it will save plugin information to your config.xml and package.json
next time, when your run ionic build, if plugins not install, it will auto install necessary plugins.
about npm module, you should call npm install "package-name" --save-dev to save your develop module, like gulp
in new project, you just copy the package.json and change project name and information, then call npm install, it will install the saved module.

Run Ant files when performing Build and Deploy Worklight 5.x.x Application

I have a Worklight application set up in Eclipse. Before executing Build And Deploy Worklight Application, I need to run a bat that compiles a bunch of HTML templates. This templates are necessary to run the app correctly.
So, I would like to know if it is possible to link (maybe under Run Configurations...?) an Ant file or similar that allows me to execute the bat and perform the build & deploy in an automatic way. Any advice?
Hope the question is clear.
I believe you can add an extra project builder to your application that invokes the Ant task you need.
Under Eclipse take a look at Project->Properties->Builders->New.
You will find Ant buildfiles as project builders a useful link.

How to build SCons projects with Eclipse CDT?

We have a fairly large C/C++ project using scons for the building. I'd like to go at an attempt to build this through Eclipse-CDT. Anyone have any experience with this and can tell me the steps to set up scons as a builder. (NOT using the SConsBuilder plugin, it will not work with the Eclipse-CDT from Fedora-11).
You can use a Makefile that simply delegates the important targets to scons
.PHONY: all clean install
default: all
all:
scons
clean:
scons -c
install:
scons install
Then it is possible to use "Standard Make C Project" out of the box.
One of our students implemented a new SCons integration for Eclipse CDT that works bi-directional, i.e., it can import SCons files and populate Eclipse CDT projects with the corresponding settings and it can generate SCons files from Eclipse project settings. In addition it provides an interactive SCons mode that speeds up incremental building of larger SCons projects significantly. It will be released to the public for free soon, see http://sconsolidator.com
I've tried Waf in Eclipse CDT before now, SCons would be really similar. The solution was to create an empty Makefile project, then simply change "make" to "scons" in the options. On Windows that would probably need the scons.bat file in your path. That is not much better than creating a dummy Makefile that has an all:\n\tscons type pattern in it, but is the least work.
The SConsBuilder plugin is not a good idea. It has a whole bunch of hard coded python code in there that it spits out to a SConstruct. It hasn't been updated in ages and a lot of code is probably deprecated in SCons by now. I think a better approach is to do what SCons does for Visual Studio, or what CMake does for Eclipse CDT. That means generating a .cproject file on the fly based on your build configuration.
I wrote an Eclipse project generator for Waf at one point, which walks the build nodes gathering source files and spits out a .project and .cproject file. Similar to how CMake does it, but Waf's default behaviour of creating a variant directory means you don't have to deal with out-of-source build issues. This has since been added as an extra in waf itself. It uses only part of the Waf API so it would be possible to convert it to SCons with some small-ish amount of work. In other words, there's nothing much out there. The .cproject format is not really documented anywhere and is really ugly compared to the Java version.
I didn't get on too well with CDT though - it is a long way behind the Java dev tools - and I still use Vim with :make, so it was all a bit academic in the end.
Just change builder settings, no plugins required. Choose external builder and set scons instead of make and set workdir to dir where SConstruct placed.
Now, you can use make targets view to create scons build commands and execute it like make commands. Error parsers with scons works fine by default, no additional configuration required.
http://sconsolidator.com/ Sconsolidator should work though.
Be VERY VERY careful about using Sconsolidator with an existing project!! It will blindly overwrite any existing SConstruct/SConscript files you have in the root directory of your project when you click the link to add a SCons nature to your project. (I'm trying to report this as a bug to the project, but being blocked at every turn so far.)