I have been using the yeoman webapp generator. And I think it's great!
Now I want to persuade the company where I work to use it, too. Only they work with php files.
So now I am trying to get grunt-php working with yo webapp generator.
But after spending lots of hours adjusting gruntfile.js, I give up.
Does anyone know how to get the webapp generator working with the yeoman webapp generator?
Related
I need to test that all CSS/SCSS files in a project have been successfully minified in the build process of a .Net MVC App, or at least test that they are valid CSS.
Currently, the project is built in VSO/VSTS, and syntax errors in the CSS will not fail the build, and the app is deployed with broken CSS.
I know very little about .Net apps, I know that the main project is ProjectName.Web, the tests are ProjectName.Web.Test, and if I want to test something, I create a corresponding "-Test" class in the ".Test" project, but where would I put a test for minification of files? The files are bundled in ProjectName.Web/App_Data/BundleConfig, and use BundleTransformer to minify the files, how do I check it worked correctly after build?
Any pointers are welcome!
Here is a link to de-minify css. I would recommend you de-minify it, identify the problems, then minify it again. Usually they are small things. If you can post the deminified code then I would be happy to help.
In particular, I have a project I generated using the command line dotnet new angular and would like to add SASS to it. I already know quite a nice way using gulp, one file at a time, but I believe the backbone for client-side management here is WebPack. This is where I run out of pauses between questions.
Plus I see no webpack artefacts in the project, so I could have had a look around and gone with some trial and error, trying to get WebPack to do 'SASS work' for me.
I just started to learn how to build a webpage with the Symfony2 framework.
I'm used to use Grunt tasks provided by the Yeoman generator, to handle caching, minifying, concatenating etc.
Now I know, that Symfony has his own solutions too, namely: the asset() helper, and Assetic.
From what I know, the yeoman tasks and the Symfony methods seems to be incompatible.
With the symfony {{ asset('asset-src-path') }} syntax, the yeoman tasks just won't work.
Should I just throw out the whole yeoman thing, and use the Symfony helper functions and filters?
I would prefer yeoman, I'm used to it and I like preprocessing the assets for the prod. site.
Note: I have to use the assetic() helper so I can work with url rewriting.
As far as I can tell, there's no easy way to achieve what I wanted.
Luckily, there's no real reason to wrestle with this problem, since - as I mentioned in my question - Symfony has Assetic, which is a great solution.
Note that I did try out a yeoman+symfony solution in a project, which ultimately worked, but I think it really doesn't worth the effort.
Cheers
Yeoman doesn't do any of the stuff you mention, it's simply a configurable generator. All yeoman does is prompt the developer with a few options and then it just downloads, tweaks than dumps a whole bunch of files to a folder. It's run one time — it's just for scaffolding other tools.
Grunt is a task runner built in Node.js. It's somewhat like yeoman in that it automates repetition but it takes over where yeoman leaves off. Whereas yeoman is run at the start of the project and never run again (generally), grunt is run continuously while you develop. The big difference here is that yeoman's generators and grunts tasks barely touch each other — yeoman isn't built for grunt and vice versa. A yeoman generator may create a nicely configured Gruntfile.js, for instance, but it's up to the developer to augment this Gruntfile.js to suit new needs.
Symfony2 is a web framework written in PHP. You can use yeoman to scaffold a Symofny2 app, and Grunt to do certain tasks (although Symfony2 ships with it's own task-runner, Grunt is excellent at front-end still). Symfony2 is a very rich, dynamic constellation of modules that is geared at dealing with HTTP requests and responses (among other things). You can write a yeoman generator that wires Grunt into Symfony2, or you can use Symfony2's console component to run your tasks.
All three are flexible but they are not interchangeable: they are all concerned with different things.
This applies to your linked question: Yeoman vs UrlRouting
In Yeoman,
I want to work on "file1.html", "file2.html" and have them generated as "file1/index.html" and "file2/index.html". How do I do this?
EDIT:
I think I finally understood the various tools and where Yeoman stood. I was expecting something which Yeoman was not supposed to do. Yeoman is a good tool to scaffold your project. For instance, I really like how I can use a Yeoman Generator such as generator-jekyllrb to scaffold your yeoman powered project in Jekyll.
There are lots of other generators. Check them out. Life of a Web Designer is way easier these days.
I am working to setup a build server using Team City to build and deploy asp.net web applications to a staging site with transformed web.configs automatically. Everything is working except that the code that ends up on the website (the aspx files) have the HTML in them when you open them in notepad.
Before all of this I was using web deployment projects with websites, and the code was compiled. If you opened one after it was deployed, it said it was a marker file.
I have tried some tutorials on how this process should work, but the code always ends up in an editable state (the html).
My question is:
What do I need to do to get MSBUILD from the command line to ultimately have precompiled code on the webs server?
Any suggestions, links, pointers, or ideas would be very helpful to me.
You need to invoke the aspnet_compiler tool to do this. There are some limitations or complications depending on exactly what you need to do for things like strong-naming. The MSDN article here has pointers.
I used to have MSBuild project steps that did this, but we decided to drop precompiling because our clients want to integrate our product into their internal portals, and precompiling made things complicated for them.
Are you using MS Web Deploy? I use it regularly for automated deployments from my Team City Build server to dev, staging, QA, etc. And I'm transforming configurations as well.
If you want to check out this alternative you can follow the excellent guide by Troy Hunt:
http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_26.html