From 1c317b01b42e2d981c3799048228e298fc0ed107 Mon Sep 17 00:00:00 2001 From: Todd Ogin Date: Sun, 15 Feb 2015 09:30:07 -0500 Subject: [PATCH 1/3] Removes custom bower directories Updates Vagrantfile with correct symlink configuration option Switches bower/grunt in postinstall script to use the globals Changes phantomjs to an npm package install adds --no-bin-link to npm install --- .bowerrc | 7 +------ Vagrantfile | 3 +++ package.json | 2 +- vagrant.sh | 6 +++--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.bowerrc b/.bowerrc index 3ffd231ea1..4a52096b99 100644 --- a/.bowerrc +++ b/.bowerrc @@ -1,8 +1,3 @@ { - "directory": "website/public/bower_components", - "storage" : { - "packages" : ".bower-cache", - "registry" : ".bower-registry" - }, - "tmp" : ".bower-tmp" + "directory": "website/public/bower_components" } diff --git a/Vagrantfile b/Vagrantfile index 113c688efc..c0fb32fe35 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,6 +5,9 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.provider "virtualbox" do |v| + v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant", "1"] + end config.vm.box = "thepeopleseason/habitrpg" config.ssh.forward_agent = true diff --git a/package.json b/package.json index fc065889b9..4823011752 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "scripts": { "test": "./test/run_tests.sh", "start": "grunt run:dev", - "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/grunt;", + "postinstall": "bower --config.interactive=false install -f; grunt;", "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" }, "devDependencies": { diff --git a/vagrant.sh b/vagrant.sh index 814fa3091e..a61831097e 100644 --- a/vagrant.sh +++ b/vagrant.sh @@ -40,7 +40,7 @@ echo Installing GraphicsMagick - provides gm and convert... apt-get install -qq graphicsmagick echo Installing phantomjs and dependency... -apt-get install -qq phantomjs libicu48 +apt-get install -qq libicu48 echo Installing requirements for grunt-spritesmith... apt-get install -qq pkg-config libcairo2-dev libjpeg-dev @@ -63,10 +63,10 @@ apt-get install -qq nodejs cd /vagrant echo Installing grunt/bower... -npm install -g grunt-cli bower +npm install -g grunt-cli bower phantomjs echo Installing HabitRPG -npm install +npm install --no-bin-link echo Installing Bower packages sudo -H -u vagrant bower --config.interactive=false install -f From 65c6d5fc9dfc3caa5356b606b8e024000cc57a70 Mon Sep 17 00:00:00 2001 From: Todd Ogin Date: Sun, 15 Feb 2015 12:38:48 -0500 Subject: [PATCH 2/3] Restores postinstall hook to use local modules Adds grunt to vagrant.sh to mimic postinstall hook --- package.json | 2 +- vagrant.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4823011752..fc065889b9 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "scripts": { "test": "./test/run_tests.sh", "start": "grunt run:dev", - "postinstall": "bower --config.interactive=false install -f; grunt;", + "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/grunt;", "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" }, "devDependencies": { diff --git a/vagrant.sh b/vagrant.sh index a61831097e..1c0a3eadf4 100644 --- a/vagrant.sh +++ b/vagrant.sh @@ -71,6 +71,9 @@ npm install --no-bin-link echo Installing Bower packages sudo -H -u vagrant bower --config.interactive=false install -f +echo Running Grunt +sudo -H -u vagrant grunt + ## # echo Seeding Mongodb... ## node ./src/seed.js ## no longer required - see comments in src/seed.js From 6c9a075aaeb1282dcc08152846ade44a84db50b5 Mon Sep 17 00:00:00 2001 From: Todd Ogin Date: Sun, 15 Feb 2015 18:17:52 -0500 Subject: [PATCH 3/3] running grunt is technically unnecessary --- vagrant.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/vagrant.sh b/vagrant.sh index 1c0a3eadf4..a61831097e 100644 --- a/vagrant.sh +++ b/vagrant.sh @@ -71,9 +71,6 @@ npm install --no-bin-link echo Installing Bower packages sudo -H -u vagrant bower --config.interactive=false install -f -echo Running Grunt -sudo -H -u vagrant grunt - ## # echo Seeding Mongodb... ## node ./src/seed.js ## no longer required - see comments in src/seed.js