Last active
August 29, 2015 13:56
-
-
Save twolfson/8838601 to your computer and use it in GitHub Desktop.
Proof of concept to reproduce https://github.com/Ensighten/grunt-spritesmith/pull/65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules/ | |
.vagrant/ | |
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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