ThatRendle / brackets-grunt

A Brackets extension to run Grunt tasks
MIT License
21 stars 8 forks source link

Cant run any task #1

Open imtiazwazir opened 11 years ago

imtiazwazir commented 11 years ago

project->grunt task is grayed out and f6 also not working grunt version 4 brackets sprint 26

ThatRendle commented 11 years ago

Do you have a Gruntfile.js in the root of the open project?

imtiazwazir commented 11 years ago

yeah

ThatRendle commented 11 years ago

Could you post your Gruntfile so I can try it please? On 17 Jun 2013 21:47, "imtiazwazir" notifications@github.com wrote:

yeah

— Reply to this email directly or view it on GitHubhttps://github.com/markrendle/brackets-grunt/issues/1#issuecomment-19573554 .

imtiazwazir commented 11 years ago

'use strict';

var path = require('path'); var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;

var folderMount = function folderMount(connect, point) { return connect.static(path.resolve(point)); };

//Wrapper Funciton module.exports = function(grunt) {

//Project Configration
grunt.initConfig({

    pkg: grunt.file.readJSON("package.json"),

    requirejs: {
      compile: {
        options: {
          baseUrl: "<%= pkg.js.dev %>",
          mainConfigFile: "<%= pkg.js.dev %>/main.js",
          dir: "<%= pkg.js.pro %>",
          optimize: "uglify2",

          done: function(done, output) {
            var duplicates = require('rjs-build-analysis').duplicates(output);

            if (duplicates.length > 0) {
              grunt.log.subhead('Duplicates found in requirejs build:');
              grunt.log.warn(duplicates);
              done(new Error('r.js built duplicate modules, please check the excludes option.'));
            }

            done();
          },

          uglify2: {
        output: {
            beautify: false
        },
        compress: {
            sequences: false,
            global_defs: {
                DEBUG: false
            }
        },
        warnings: true,
        mangle: false
        }
        }
      }
    },

    less: {
        development: {
            options: {

            },

            files: {
                "<%= pkg.css.pro %>/style.css": ["<%= pkg.css.dev %>/bootstrap/bootstrap.less", "<%= pkg.css.dev %>/bootstrap/responsive.less"],
            }
        },

        production: {
            options: {
                yuicompress: true
            },

            files: {
                "<%= pkg.css.pro %>/style.css": ["<%= pkg.css.dev %>/bootstrap/bootstrap.less", "<%= pkg.css.dev %>/bootstrap/responsive.less"],
            }
        }
    },

livereload: {
  port: 35729 // Default livereload listening port.
},

connect: {
  livereload: {
    options: {
      port: 9001,
      middleware: function(connect, options) {
        return [lrSnippet, folderMount(connect, options.base)]
      }
    }
  }
},

regarde: {
  watch: {
    files: ["<%= pkg.css.dev %>/**/**.less", "index.html", "<%= pkg.js.dev %>/**/**.js", "<%= pkg.js.dev %>/**/**/**.js", "<%= pkg.js.dev %>/*.js"],
    tasks: ["less:development", "livereload", "requirejs"]
  }
}

});

//Load Plugins
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-connect");

grunt.loadNpmTasks("grunt-contrib-livereload"); grunt.loadNpmTasks("grunt-regarde");

//Default Tasks grunt.registerTask("default", ["livereload-start", "connect", "regarde"]);

};

imtiazwazir commented 11 years ago

here you go