Skip to content

Instantly share code, notes, and snippets.

@twolfson
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twolfson/8838601 to your computer and use it in GitHub Desktop.
Save twolfson/8838601 to your computer and use it in GitHub Desktop.
node_modules/
.vagrant/
dist/
module.exports = function (grunt) {
// Configure grunt
grunt.initConfig({
sprite:{
all: {
src: ['*.png'],
destImg: 'dist/icons.png',
destCSS: 'dist/icons.scss',
cssFormat: 'scss'
}
}
});
// Load up our dependencies
grunt.loadNpmTasks('grunt-spritesmith');
// Define our task
grunt.registerTask('default', ['sprite']);
};
{
"name": "gist-grunt-spritesmith-65",
"version": "0.1.0",
"description": "Proof of concept to reproduce https://github.com/Ensighten/grunt-spritesmith/pull/65 ",
"main": "Gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git@gist.github.com:8838601.git"
},
"author": "Todd Wolfson <todd@twolfson.com> (http://twolfson.com/)",
"license": "UNLICENSE",
"bugs": {
"url": "https://gist.github.com/8838601"
},
"homepage": "https://gist.github.com/8838601",
"devDependencies": {
"grunt": "0.4.2",
"grunt-spritesmith": "1.21.2"
}
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
# Update apt-get once
$update_apt_get = <<SCRIPT
if ! test -f .updated_apt_get; then
sudo apt-get update
touch .updated_apt_get
fi
SCRIPT
config.vm.provision "shell", inline: $update_apt_get
# https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os
$install_node = <<SCRIPT
if ! which node &> /dev/null; then
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
fi
SCRIPT
config.vm.provision "shell", inline: $install_node
$install_grunt_cli = <<SCRIPT
if ! which grunt &> /dev/null; then
sudo npm install -g grunt-cli
fi
SCRIPT
config.vm.provision "shell", inline: $install_grunt_cli
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment