Coder Social home page Coder Social logo

Comments (13)

shama avatar shama commented on June 3, 2024

It used to do this but that was changed (along with everything else I wrote for some reason?).
See 069f175#L0L191

from generator-gruntplugin.

addyosmani avatar addyosmani commented on June 3, 2024

Sorry, @shama. That's completely our fault. We'll work to get this resolved shortly.

@stepenplusplus some of the changes made in 069f175 to resolve exceptions in Grunt plugin scaffolding reverted some important updates we need to bring back in based on grunt-init-gruntplugin. See 24af108 for where @shama first started bringing these in.

Do you think you'll have time to review the diffs and see what we can do about this? If not, I'll try to prioritise some time on this after 1.0 ships.

We'll be working more closely together with the Grunt team on evolving generator-gruntplugin back to the level of functionality init used to offer and any help at all would be massively appreciated.

from generator-gruntplugin.

stephenplusplus avatar stephenplusplus commented on June 3, 2024

Of course, I'll take a look as soon as I can.

from generator-gruntplugin.

stephenplusplus avatar stephenplusplus commented on June 3, 2024

First, of course, I'm sorry if I blew out any of the work you did. Coming to this repository, it was hard for me to detect exactly what the game plan was. I thought I was taking a Grunt thing, and making it into a Yeoman thing. More specifically, using the Yeoman prompts and the Yeoman templating system/conventions.

I'm happy to fix anything I busted, but it would help me a lot to know what specifically should be brought back. And, better yet, if my "Make it work!" commit was actually making it not work, should we just roll back?

from generator-gruntplugin.

addyosmani avatar addyosmani commented on June 3, 2024

I recall the reason we merged in 'Make it work' being that the existing build wasn't functioning with the latest version of Yeoman at the time. How would this sound as a plan for the next release? In branch:

  • Roll back to the commit before 'Make it work'
  • Bring in the deltas after 'Make it work' (including updating deps)
  • Patch any issues causing the generator to not correctly run (this may end up using some of the work from your original PR, @stephenplusplus)

This will give us a generator that has @shama's modifications but is up to date and just works out of the box.

@stephenplusplus do you think you might have time to try getting this done?

from generator-gruntplugin.

addyosmani avatar addyosmani commented on June 3, 2024

@cowboy I updated this generator to support quoted strings in the author field and brought it inline with changes to other generators more recently. Testing it with a like-for-like transcript from grunt-init-gruntplugin it appears to now support the same input that project did.

I'll be doing the same for all of the other grunt-init template conversions shortly. My apologies for us dropping the ball on not shipping those in a completely stable state from the get-go. I accept responsibility for that.

More notes if interested:

I initially tried just using prompts.packageJSON() as per @shama's original PR, however found that it wasn't able to pick up all of the prompt fields. Yeoman generally favours using templates over inline JSON stringification so I'm string encoding the author input and extending the generator to input all the same fields grunt-init-gruntplugin did.

from generator-gruntplugin.

cowboy avatar cowboy commented on June 3, 2024

FWIW, it's a mistake to generate JSON via anything other than a JSON serializer. Period.

from generator-gruntplugin.

cowboy avatar cowboy commented on June 3, 2024

See http://stackoverflow.com/a/1732454/142339 for more.

from generator-gruntplugin.

addyosmani avatar addyosmani commented on June 3, 2024

I'll take another look at just JSON serialising prompt input shortly. It would at minimum avoid this issue cropping up on other fields.

from generator-gruntplugin.

hueitan avatar hueitan commented on June 3, 2024

Does this a still issue on the current latest version ?

from generator-gruntplugin.

eddiemonge avatar eddiemonge commented on June 3, 2024

It should be fixed as of 0.0.6

--edited. s/shouldn't/should be/

from generator-gruntplugin.

addyosmani avatar addyosmani commented on June 3, 2024

Yeah. This was fixed.

from generator-gruntplugin.

hueitan avatar hueitan commented on June 3, 2024

Ok thanks @eddiemonge @addyosmani

from generator-gruntplugin.

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.