How can I install Grunt an any nitrous.io box - nitrousio

I am developing an python app on a Nitrous.io python box but I am using a grunt to build the front end. How can I install node, grunt and bower on a python box?

Grunt requires Node.JS version >=0.8.0 (source), and currently Nitrous.IO only offers Node.JS on the Node.JS templates (source).
As a workaround, you may want to look into building your Python project on a Node.JS template using Nitrous.IO. Along with NPM and Node.JS, the template also includes Python 2.7.3, pip, and virtualenv.

Related

How to send emails with smtpjs in reacts without typescript

I tried creating a contact form with SMTP js in react but it did not work tried checking stack over flow but no good answer for using only react not typescript
I was expecting the stmp is to be installed like normal swiper
Because I'm still a junior frontend dev 🤧
You can also find more information and documentation on using smtp.js in React app on the following resources:
Official smtp.js documentation: https://github.com/kimmobrunfeldt/smtp.js
SMTP in Node.js: https://nodemailer.com/smtp/
this also explains better:
https://victorbruce82.medium.com/how-to-send-emails-using-react-through-emailjs-no-server-code-needed-8e1453ef8796
Yes, you can install smtp.js in a similar way to installing other packages in your React app. You can use npm or yarn to install it:
CODE :
npm install smtpjs
or
yarn add smtpjs
After installation, you can import and use smtp.js in your React component.

what a part does bower/bower-asset play in php application such as yii2

Recently I deployed some projects like trntv/yii2-starter-kit and so on.but all applications are publishing assets on '#vendor/bower' instead of'#vendor/bower/bower-asset'. I have read the question Yii2 Composer manage package in bower and bower-vendor and solved it . but I still feel confused about the directory vendor/bower/bower-asset.
What's the part does bower/bower-asset play in php application? it is not a composer package but many theme store in there. Furthermore, bower is a dependency management for javascript just like Composer for PHP , but how does it solve dependency for js package by PHP on this occasion that I have not install node.js environment?
The idea of Composer Asset Plugin is to download Bower / NPM packages and manage their dependencies without having Node JS, Bower and NPM installed (through PHP / Composer). Also it adds possibility to add JavaScript dependencies for PHP packages that use JavaScript libraries.
See for example yii2-bootstrap Yii2 extension (PHP) has a dependency on Bootstrap (JS + CSS):
"bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*"
When you run composer install or composer update, all JS dependencies will be installed to vendor/bower folder.
This is built into the core, but very ambiguous, receives a lot of criticism and there are plans to remove it in 2.1.0 (as far as I remember, it was included before release of 2.0 even it was unstable). Unfortunately this is required and there is no normal way to disable it.
You can read more info on the extension's Github page.
As for folder name, it should be named bower, not bower-asset, if you installed everything correctly.
It's named like so automatically, make sure you have the latest version of plugin:
composer global require "fxp/composer-asset-plugin:~1.1.1"
I'd recommend to even switch to:
composer global require "fxp/composer-asset-plugin:*"
If you have problems or errors, execute:
composer global remove "fxp/composer-asset-plugin"
Then reinstall it again, delete vendor and composer.lock in your application folder and run:
composer install

Using NPM on a Nitrous box setup for Go

I'm developing a web application in Go on Nitrous.io and i want to install Less for css compilation. Is there a way of installing NPM on a Nitrous box setup for Go development?
Nitrous IDE now include autoparts to manage additional package and nodejs is available:
http://blog.nitrous.io/2013/09/18/introducing-autoparts-for-nitrous-io.html
In the terminal, try:
parts install nodejs

Jenkins, xcodebuild -> JUnit-Tests with Appium?

i am using Jenkins CI to build my iOS-Project. For this task, I use a sh-script to build the binaries directly from a git-repo by running xcodebuild and thats working pretty well.
Currently I run JUnit-tests with appium from eclipse to test my app, but I would like to integrate them into Jenkins as well. I found some tutorials to integrate JUnit-tests into jenkins by using ant-scripts, but I dont use ant to build my project.
how can I integrate my JUnit-tests into jenkins, without a ant-script? Or should I use a ant-script?
thank you.
I switched now to Gradle Build Automation which is much easier to handle and can be integrated into Jenkins as well by using Jenkins Gradle Plugin. xCode-Projects can automatically be build from Gradle by using Gradle xcode plugin and its easy to integrate JUnit or NGTests into a Gradle Scripts. In java test classes I am able to use selenium driver against appium server who's remote controlling iOS-Simulator.

NodeJS, Express, Jade, MySQL, Socket.io Boilerplate?

Does anyone know of a boilerplate combining Express, Jade, Socket.io, and MySQL? All of the ones I'm able to find use a noSQL DB. I might have to just write my own templates to use, but would hate to re-invent the wheel.
I haven't tried: https://github.com/robrighter/node-boilerplate but it has most of what your after.
I can suggest using express as the boilerplate:
npm install -g express
So after you'll globally install it, you could do something like:
express newApp
which will create a new dir named newApp and populate it with the boilerplate of the framework.
(you can follow http://expressjs.com/guide.html)
afterwards, you can "cd newApp" and run
npm install
this will read the dependencies from package.json and will download the node.js modules required.
for socket.io , just run
npm install socket.io
as for jade, it's the default templating engine of express, it's built in.
Regarding mySQL , there are tones of options: https://github.com/joyent/node/wiki/Modules#wiki-db-mysql
you just have to choose. If your after ORM, i can recommend: https://github.com/sdepold/sequelize
Hope this helps.