Running grunt will be very similar to running gulp, so I will include my configuration below.
This is located inside the .ebextensions folder in the root of my project named 01run.config . You may have several configuration files, they will work in alphabetical order (hence 01 at the beginning.)
This basically just instructs the process to run these commands in order, again, in alphabetical order, so I named them accordingly.
commands: 01get_sudo: command: echo Defaults:root \!requiretty >> /etc/sudoers 02npm_install: command: sudo yum -y --enablerepo=epel install nodejs npm 03npm_install_bower: command: sudo npm install -g bower 04npm_install_gulp: command: sudo npm install -g gulp 05yum_install_git: command: sudo yum -y --enablerepo=epel install git container_commands: 01bower_install: command: sudo bower install --allow-root 02gulp_sass: command: sudo gulp sass
- Get access to sudo
- install node.js and npm using yum
- install the gazebo (my gulp process needs a gazebo)
- install gulp
- install git (necessary for the gazebo)
- I then run the two container commands that occur after installing npm and before running npm:
- bower installation
- gulp sass
In your case, you just uninstall bower and git installs, install grunt-cli, and then run grunt.
After that, I removed the need for the above process by doing all this before deploying and transferring the embedded files to the git repository. It was at least a good learning experience that gives me much more control over my ec2 instances deployed by beanstalk.
Kevin b
source share