Git Product home page Git Product logo

Comments (5)

travis-hilterbrand avatar travis-hilterbrand commented on September 20, 2024

I'm not able to reproduce this issue. I use this plugin nearly everyday in a project so it's up to date.

Can you post the gruntfile that you are using?

from grunt-file-creator.

dhay-alan avatar dhay-alan commented on September 20, 2024

Hi, Thanks for your quick response, here is my snippet of grunt file,

module.exports = function(grunt) {
  grunt.initConfig({

    "file-creator": {
      "basic": {
        files: {
          "client/web.config.js": function(fs, fd, done) {
            fs.writeSync(fd, 'some basic text');
            done();
          }
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-file-creator');
  grunt.registerTask('dev', ["file-creator"]);
}

from grunt-file-creator.

travis-hilterbrand avatar travis-hilterbrand commented on September 20, 2024

Thank you for providing the gruntfile! I was able to reproduce the problem.

It appears that you are running the task with the command "grunt dev -v" with the -v standing for verbose. For some reason, the options parsing does not work in verbose mode.

As a workaround, everything should work correctly if you run normally using "grunt dev". I'll look into why this error is occurring tonight and hopefully will have a real fix by tomorrow.

from grunt-file-creator.

travis-hilterbrand avatar travis-hilterbrand commented on September 20, 2024

The fix requires changing the options format in the gruntfile to:

"file-creator": {
      "basic": {
        "client/web.config.js": function(fs, fd, done) {
          fs.writeSync(fd, 'some basic text');
          done();
        }
      }
    }

This is not a breaking change - the old options format is still supported but will encounter an error when verbose mode is used.

See the commit comments for more details.

from grunt-file-creator.

dhay-alan avatar dhay-alan commented on September 20, 2024

Thanks Travis, I appreciate your work. Will use your fix. :)

from grunt-file-creator.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.