Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant run any task #1

Open
imtiazwazir opened this issue Jun 16, 2013 · 5 comments
Open

Cant run any task #1

imtiazwazir opened this issue Jun 16, 2013 · 5 comments

Comments

@imtiazwazir
Copy link

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

@ThatRendle
Copy link
Owner

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

@imtiazwazir
Copy link
Author

yeah

@ThatRendle
Copy link
Owner

Could you post your Gruntfile so I can try it please?
On 17 Jun 2013 21:47, "imtiazwazir" [email protected] wrote:

yeah


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

@imtiazwazir
Copy link
Author

'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
Copy link
Author

here you go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants