Git Product home page Git Product logo

Comments (12)

spboyer avatar spboyer commented on May 26, 2024

@sayedihashimi the subgenerators folders folders must be at the root directory, that is how yeoman subgenerators are structured. See angular as another example of this.

I'll check the errors asap

from generator-aspnet.

spboyer avatar spboyer commented on May 26, 2024

@sayedihashimi if we remove the .yo-rc.json file from being created, then the issue goes away. Getting the working directory has been an issue as it will always resolve to where the generator is running node from. i.e. process.cwd(). Angular project does not include this, is also documented here

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

@spboyer thanks for the info. In my case before invoking yo aspnet I have deleted the .yo-rc.json file. After running it the file automatically get's created. Is this happening on your machine as well or just mine?

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

@spboyer I figured it out https://github.com/OmniSharp/generator-aspnet/blob/master/app/index.js#L115 is causing the .yo-rc.json file to be created. I don't think saving that is valuable, so I'll just remove it. I guess we should doc somewhere the issue when .yo-rc.json is present.

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

@spboyer OK I have removed that line of code and released it under 0.0.23. I think it's working much better now. I tried a few generators and they worked good. I will keep playing with this and let you know if I find any issues.

@spboyer I have an existing blog post from @shirhatti that I need to post to the asp.net team blog. After I do that would you be interested in writing a follow up post that covers the sub-generators for that blog? You can place your twitter/email at the bottom along with your name as the author.

One question is it already possible to discover the available subgenerators with a command? I tried some different permutations and our existing help doesn't describe the subgenerators at all.

I think we can close this item now. Thanks a lot for putting this together.

from generator-aspnet.

spboyer avatar spboyer commented on May 26, 2024

@sayedihashimi I just need to add a usage file to each subgenerator folder and the help txt will be rendered in the --help option.

As soon as I get that PR in let me know what we need to do to update the post on the asp.net site. My email is @live.com.

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

@spboyer I just posted the first blog post on the generators at http://blogs.msdn.com/b/webdev/archive/2014/12/17/yeoman-generators-for-asp-net-vnext.aspx.

If you are interested you can author a blog post about the subgenerators and I will post it on the same blog (that is the official asp.net team blog). I'll add an intro stating that you are the author and you can include your email/twitter/whatever contact info at the bottom in your signature. I'll work with you on the content and review everything.

I prefer Windows Live Writer as that is how I publish to the blog but you can send me the post in whatever format/method you like. I can copy/paste into WLW.

from generator-aspnet.

spboyer avatar spboyer commented on May 26, 2024

@sayedihashimi I'll write that up. WLW doesn't support Ghost, I can post on my site or email you a doc.

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

@spboyer email is fine my email is sayedha @ mfst

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

Thanks a lot for your contributions, these are wonderful.

I've merged your latest changes with the help. I noticed the following issues in the latest build.

The following fail with an error message, the error message is similar in all cases and I've included a sample from one invocation. If these generators require a file name can we make that clear in the error message? Could we also make it more clear in the help that's provided via --help? If there are cases where we can default the name lets do that as well. For example HTMLPage can just create index.html by default. Then if users invoke it and want a different name they can just do a mv command.

  • yo aspnet:CoffeeScript
  • yo aspnet:GruntFile
  • yo aspnet:HTMLPage
  • yo aspnet:JSON
  • yo aspnet:MvcController
  • yo aspnet:MvcView
  • yo aspnet:TextFile

Error message

Sayeds-MacBook-Pro:MvcApplication sayedhashimi$ yo aspnet:JScript

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Did not provide required argument name!
    at NamedGenerator.argument (/Users/sayedhashimi/Documents/mycode/generator-aspnet/node_modules/yeoman-generator/lib/base.js:260:31)
    at NamedGenerator.module.exports.Base.extend.constructor (/Users/sayedhashimi/Documents/mycode/generator-aspnet/node_modules/yeoman-generator/lib/named-base.js:20:10)
    at NamedGenerator (/Users/sayedhashimi/Documents/mycode/generator-aspnet/script-base.js:8:31)
    at new NamedGenerator (/Users/sayedhashimi/Documents/mycode/generator-aspnet/JScript/index.js:7:13)
    at Environment.instantiate (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:270:10)
    at Environment.create (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:247:15)
    at Environment.run (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:306:24)
    at /usr/local/lib/node_modules/yo/cli.js:110:9
    at Environment.resolver.lookup (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:49:32)
    at init (/usr/local/lib/node_modules/yo/cli.js:86:7)

Another suggestion, can we make it such that the subgenerators handle file extensions better? For example if I invoke the MvcController with either of the commands.

yo aspnet:MvcController MyController

or

yo aspnet:MvcController MyController.cs

Should result in the same thing, MyController.cs being created. With the current implementation with yo aspnet:MvcController MyController.cs will result in a file named MyController.cs.cs.

from generator-aspnet.

spboyer avatar spboyer commented on May 26, 2024

@sayedihashimi sure, lets create a new issue on these few points.

from generator-aspnet.

sayedihashimi avatar sayedihashimi commented on May 26, 2024

Thanks @spboyer I've created #16 and #17

from generator-aspnet.

Related Issues (20)

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.