Skip to content

configuration #1

@CharltonC

Description

@CharltonC

Hi I tried the configuration you specified however it didn't quite work. Perhaps I am missing something? If you can kindly point it out it would be much appreciated.

My folder hierarchy is as follows:

  • node_modules // containing all the grunt plugins
  • package.json // (1) please refer to below for actual code
  • Project A
    • node_modules
      • grunt-collection
        • package.json // (2) please refer to below for actual code
      • load-grunt-parent-tasks
    • GruntFile.js // please refer to below for actual code
    • package.json // (3) please refer to below for actual code

package.json (1)

{
"name": "template",
"version": "0.0.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-sass": "~0.8.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-autoprefixer": "~2.0.0",
"grunt-banner": "~0.2.3",
"grunt-browser-sync": "~1.5.3",
"grunt-ftp-upload": "~0.1.1",
"grunt-ftp-deploy": "~0.1.9",
"grunt-contrib-jasmine": "~0.6.5"
}
}

package.json (2)

{
"name": "template",
"version": "0.0.0",
"description": "",
"devDependencies": {
"load-grunt-parent-tasks": "~0.1.1"
}
}

package.json (3)

{
"version": "0.0.0",
"description": "",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-sass": "~0.8.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-autoprefixer": "~2.0.0",
"grunt-banner": "~0.2.3",
"grunt-browser-sync": "~1.5.3",
"grunt-ftp-upload": "~0.1.1",
"grunt-ftp-deploy": "~0.1.9",
"grunt-contrib-jasmine": "~0.6.5"
},
"keywords": ["gruntcollection"]
}

GruntFile.js

module.exports = function(grunt){

require('load-grunt-parent-tasks')(grunt, {
    config: 'package.json',
    pattern: 'grunt-*',
    scope: 'dependencies',
    module: 'grunt-collection'
});

grunt.initConfig({
     pkg : grunt.file.readJSON('package.json'),
     /*
     * grunt plugin config in here
     */
}); 

grunt.loadNpmTasks("grunt-collection");

grunt.registerTask("mon", ["browserSync", "watch"]);

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions