| /** |
| * Eclipse Donate Grunt File |
| * |
| * Copyright (c) 2015 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christopher Guindon (Eclipse Foundation)- initial API and implementation |
| * Eric Poirier (Eclipse Foundation) |
| */ |
| module.exports = function(grunt) { |
| // Initializing the configuration object |
| grunt.initConfig({ |
| // Task configuration |
| copy: { |
| main: { |
| files: [ |
| // includes files within path |
| { |
| expand: true, |
| cwd: 'bower_components/solstice-assets/images/eclipse_org/donate', |
| src: ['**'], |
| dest: 'images/', |
| filter: 'isFile' |
| } |
| ] |
| } |
| }, |
| less: { |
| development: { |
| options: { |
| compress: true, |
| // minifying the result |
| }, |
| files: { |
| // compiling styles.less into styles.css |
| "./assets/public/stylesheets/credit.min.css": "./bower_components/solstice-assets/stylesheets/_components/eclipse_org/donate/credit.less", |
| "./assets/public/stylesheets/donorlist.min.css": "./bower_components/solstice-assets/stylesheets/_components/eclipse_org/donate/donorlist.less", |
| "./assets/public/stylesheets/improve.min.css": "./bower_components/solstice-assets/stylesheets/_components/eclipse_org/donate/improve.less", |
| "./assets/public/stylesheets/support.min.css": "./bower_components/solstice-assets/stylesheets/_components/eclipse_org/donate/support.less" |
| } |
| } |
| }, |
| uglify: { |
| options: { |
| mangle: true |
| // Use if you want the names of your functions and variables |
| // unchanged. |
| }, |
| js_files: { |
| files: { |
| './assets/public/javascript/scripts.min.js': './assets/src/javascript/scripts.js', |
| } |
| }, |
| }, |
| concat: { |
| options: { |
| //separator: ';', |
| }, |
| js_donate: { |
| src: ['./bower_components/range-slider/dist/rangeslider.min.js', './assets/public/javascript/scripts.min.js'], |
| dest: './assets/public/javascript/scripts.min.js', |
| }, |
| css_donate: { |
| src: ['./bower_components/range-slider/dist/rangeslider.css', './assets/public/stylesheets/improve.min.css'], |
| dest: './assets/public/stylesheets/improve.min.css', |
| }, |
| }, |
| watch: { |
| js_files: { |
| files: ['./assets/src/javascript/scripts.js'], |
| tasks: ['uglify:js_files', 'concat:js_donate'] |
| }, |
| less: { |
| files: ['./assets/src/stylesheets/**/*.less', |
| './bower_components/solstice-assets/less/*.less', |
| './bower_components/solstice-assets/**/*.less' |
| ], |
| tasks: ['less','concat:css_donate'], |
| options: { |
| livereload: true |
| // reloads the browser |
| } |
| }, |
| } |
| }); |
| // Plugin loading |
| grunt.loadNpmTasks('grunt-contrib-concat'); |
| grunt.loadNpmTasks('grunt-contrib-watch'); |
| grunt.loadNpmTasks('grunt-contrib-copy'); |
| grunt.loadNpmTasks('grunt-contrib-less'); |
| grunt.loadNpmTasks('grunt-contrib-uglify'); |
| // Task definition |
| grunt.registerTask('default', ['watch']); |
| grunt.registerTask('init', ['copy','watch']); |
| }; |