Skip to content

Instantly share code, notes, and snippets.

@webdev1001
Forked from tomfuertes/config.diff
Last active August 29, 2015 14:11
Show Gist options
  • Save webdev1001/227d88a1e8fdd66e1825 to your computer and use it in GitHub Desktop.
Save webdev1001/227d88a1e8fdd66e1825 to your computer and use it in GitHub Desktop.
diff --git a/Gruntfile.js b/Gruntfile.js
index 53fe849..80ce14a 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -56,6 +56,16 @@ module.exports = function (grunt) {
max_jshint_notifications: 5
}
},
+ uncss: {
+ gettingStarted: {
+ options: {
+ stylesheets: ['../../vendor/assets/bower_components/bootstrap/dist/css/bootstrap.css']
+ },
+ files: {
+ 'app/assets/stylesheets/builds/getting-started.css': ['tmp/grunt/getting-started.html']
+ }
+ }
+ },
watch: {
lib: {
options: {
@@ -100,6 +110,9 @@ module.exports = function (grunt) {
},
cleanGit: {
command: 'git clean -fdx -- tmp public'
+ },
+ gettingStarted: {
+ command: 'curl -o tmp/grunt/getting-started.html http://localhost:3000/getting_started'
}
}
});
@@ -110,6 +123,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-shell');
+ grunt.loadNpmTasks('grunt-uncss');
// grunt.loadNpmTasks('grunt-notify');
// Default task.
@@ -124,5 +138,11 @@ module.exports = function (grunt) {
'jshint'
]);
+ // Auto format files
+ grunt.registerTask('gettingStarted', [
+ 'shell:gettingStarted',
+ 'uncss:gettingStarted'
+ ]);
+
};
diff --git a/app/assets/stylesheets/getting_started.scss b/app/assets/stylesheets/getting_started.scss
index f0ffc83..16733ab 100644
--- a/app/assets/stylesheets/getting_started.scss
+++ b/app/assets/stylesheets/getting_started.scss
@@ -1,5 +1,5 @@
/*
- *= require bootstrap/dist/css/bootstrap.css
+ *= require builds/getting-started.css
*= require_self
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment