| /** |
| * Eclipse Downloads Grunt File |
| * |
| * Copyright (c) 2016 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: |
| * Eric Poirier (Eclipse Foundation) - initial API and implementation |
| */ |
| module.exports = function(grunt) { |
| // Initializing the configuration object |
| grunt.initConfig({ |
| // Task configuration |
| less: { |
| development: { |
| options: { |
| compress: true, |
| // minifying the result |
| }, |
| files: { |
| // compiling styles.less into styles.css |
| "./public/stylesheets/neon.min.css": "./bower_components/solstice-assets/stylesheets/eclipse_org/neon/neon.less", |
| "./public/stylesheets/neon-fonts.min.css": "./bower_components/solstice-assets/stylesheets/eclipse_org/neon/fonts.less", |
| } |
| } |
| }, |
| concat: { |
| css_download: { |
| src: ['./public/stylesheets/neon.min.css',"./public/stylesheets/neon-fonts.min.css"], |
| dest: './public/stylesheets/neon.min.css', |
| }, |
| }, |
| uglify: { |
| options: { |
| mangle: false |
| // Use if you want the names of your functions and variables |
| // unchanged. |
| }, |
| js_files: { |
| files: { |
| './public/javascript/neon.min.js': './src/javascript/neon.js', |
| } |
| }, |
| }, |
| watch: { |
| js_files: { |
| files: ['./src/javascript/neon.js'], |
| tasks: ['uglify:js_files'] |
| }, |
| less: { |
| files: ['./src/stylesheets/**/*.less', |
| './bower_components/solstice-assets/less/*.less', |
| './bower_components/solstice-assets/**/*.less', |
| ], |
| tasks: ['less','concat'], |
| options: { |
| livereload: true |
| // reloads the browser |
| } |
| }, |
| } |
| }); |
| // Plugin loading |
| grunt.loadNpmTasks('grunt-contrib-concat'); |
| grunt.loadNpmTasks('grunt-contrib-watch'); |
| grunt.loadNpmTasks('grunt-contrib-less'); |
| grunt.loadNpmTasks('grunt-contrib-uglify'); |
| // Task definition |
| grunt.registerTask('default', ['watch']); |
| }; |