Created
July 23, 2016 20:07
-
-
Save JamesVanWaza/dc2f1ab0664a58a35fa62f4cda190265 to your computer and use it in GitHub Desktop.
Bootstrap Gruntfile and SCSS File
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
/*jslint node: true */ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
php: { | |
dist: { | |
options: { | |
port: '?' | |
} | |
} | |
}, //php | |
sass: { | |
options: { | |
/** Only use include_paths if extracting elements from Node_Modules */ | |
includePaths: ['node_modules/bootstrap-sass/assets/stylesheets'] | |
}, //options | |
dist: { | |
options: { | |
outputStyle: 'expanded', | |
sourceMap: false | |
}, | |
files: { | |
'css/style.css': 'scss/style.scss' | |
} | |
} | |
}, // sass | |
watch: { | |
options: { | |
livereload: true, | |
dateFormat: function(time) { | |
grunt.log.writeln('The watch finished in ' + time + 'ms at ' + (new Date()).toString()); | |
grunt.log.writeln('Waiting for more changes...'); | |
} //date format function | |
}, //options | |
scripts: { | |
files: ['*.js', 'js/*.js'] | |
}, // scripts | |
//Live Reload of SASS | |
sass: { | |
files: 'scss/**/*.scss', | |
tasks: ['sass'] | |
}, //sass, | |
css: { | |
files: '**/*.scss', | |
tasks: ['sass'], | |
options: { | |
livereload: true, | |
}, | |
}, //css | |
html: { | |
files: ['*.html'] | |
}, //html | |
all: { | |
files: '{,**/}*.js', | |
tasks: ['jshint'] | |
} //all | |
}, //watch | |
postcss: { | |
options: { | |
processors: [ | |
require('autoprefixer')({ | |
browsers: 'last 2 versions' | |
}) | |
] | |
} | |
}, //post css | |
jshint: { | |
options: { | |
reporter: require('jshint-stylish') | |
}, | |
target: ['*.js', 'js/*.js'], | |
all: ['*.js', 'js/*.js'] | |
} //jshint | |
}); | |
require('load-grunt-tasks')(grunt); | |
grunt.registerTask('default', ['sass', 'openport:watch.options.livereload:35729', 'watch', 'force:jshint', 'php', 'autoupdate']); | |
}; |
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
@import 'includes/variables'; | |
@import 'includes/webfonts'; | |
@import 'bootstrap'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment