123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- module.exports = function(grunt)
- {
- grunt.initConfig({
- pkg: grunt.file.readJSON('package.json'),
-
-
- watch: {
- myscss: {
- files: ['scss/**/*.scss'],
- tasks: ['sass:dist'],
- options: {
- spawn: false,
- },
- },
- },
-
- //end watch -this watches ccustom.scss and evokes sass:dist which puts custome css in public/css
-
-
- sass: { // Begin Sass Plugin
- dist: {
- options: {
- sourcemap: 'none'
- }, //end dist
- files: [{ expand: true,cwd: 'scss', src: ['**/*.scss'], dest: 'public/css', ext: '.css' }]
- },
- // one ) this task targets custom.sass with this target dist converts scss to custom.css
- dist2: {
- options: {
- sourcemap: 'none'
- },
- files: [{ expand: true,cwd: 'vendor/twbs/bootstrap/scss', src: ['**/*.scss'], dest: 'bootstrapCss', ext: '.css' }]
- },// two) converts scss to css at location bootstrapCss
-
- dist3: {
- options: {
- sourcemap: 'none'
- },
- files: [{ expand: true,cwd: 'fontawesome', src: ['**/*.scss'], dest: 'public/css', ext: '.css' }]
- }// three) this one can leave out
-
-
-
- }, //end sass main
-
-
-
-
- concat: {
- options: {
- separator: '/* */\n',
- },
- dist: {
- src: ['bootstrapCss/bootstrap.css', 'bootstrapCss/bootstrap-grid.css', 'bootstrapCss/bootstrap-reboot.css'],
- dest: 'public/css/bootstrap.css',
- },
- },//end concat -this combines the 3 bootstrap in to one.
-
-
-
-
- });// end config
- //load plugins
-
- grunt.loadNpmTasks('grunt-contrib-jshint');
- // grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-less');
- grunt.loadNpmTasks('grunt-contrib-cssmin');
- grunt.loadNpmTasks('grunt-contrib-sass');
- grunt.loadNpmTasks('grunt-contrib-copy');
- grunt.loadNpmTasks('grunt-contrib-watch');
- grunt.loadNpmTasks('grunt-browser-sync');
-
- grunt.loadNpmTasks('grunt-contrib-concat');
-
- //source of scss is scss and custom.css is in public css
- grunt.registerTask('run', 'Log something', function() {
- grunt.log.write('i am running ').ok();
- });
-
- grunt.registerTask('do1', ['sass:dist']);
- grunt.registerTask('do2', [ 'sass:dist2' ]);
-
- grunt.registerTask('do3', ['concat:dist']);
- grunt.registerTask('do4', [ 'sass:dist3' ]);
-
-
-
- grunt.registerTask('myscss', ['watch']);
- grunt.registerTask('default', function(){
- grunt.log.writeln('Hello from Grunt via grunt.');
- });
- };//end main file
|