Comments (12)
@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.
@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.
@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.
@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.
@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.
@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.
@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.
@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.
@spboyer email is fine my email is sayedha @ mfst
from generator-aspnet.
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.
@sayedihashimi sure, lets create a new issue on these few points.
from generator-aspnet.
Thanks @spboyer I've created #16 and #17
from generator-aspnet.
Related Issues (20)
- Remove 'usersecrets` subgenerator for RC HOT 1
- Update Docker template content for 2017RC HOT 1
- Update global.json generator/template for VS2017 RC HOT 1
- How to create controller in vscode using yo HOT 2
- [Possible Bug] Can't seem to run Yeoman generate project on Heroku HOT 10
- Can find project.json inside of new project HOT 18
- Log off should be Logout in mvc template
- Cant project in visual studio HOT 2
- The target "Restore" does not exist in the project HOT 2
- The specified framework 'Microsoft.NETCore.App', version '1.0.4' was not found HOT 5
- Subgenerators are not available HOT 5
- Can not bundle Js and css file in aspcore/angular2 HOT 2
- How to install previous generators HOT 1
- Bower is deprecated HOT 3
- double '<' character in csproj files HOT 1
- Error when using --version-current HOT 2
- Upgrade project templates to .NET Core 2.0 HOT 2
- Can't install generator-aspnet
- Sematic UI template - Index.cshtml content still has "ASP.NET MVC 5" or "ASP.NET 6" naming reference HOT 1
- Deprecate generator-aspnet package HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generator-aspnet.