generator-angular
generator-angular copied to clipboard
feat(build): add Jade support
Added new --jade option to generator that will create jade templates (http://jade-lang.com/)
so many changes. @gonzaloruizdevilla can you rebase and merge conflicts please (again i think)(sorry)?
Done. It was small conflict in app/index.js
. In the PR, Bootstrap js dependencies are stored in a list before appending them to the html or jade index file. In the original file, they are passed directly as parameter to the function appendScripts.
can you fix the failing test?
Please note that the build is failing because my fork project is "generator-angularexpress" and is the express suffix that is responsible for the failure. Mocha tests in my local machine and run in a folder named "generator-angular" pass without problem.
From TravisCi log:
[email protected] test /home/travis/build/gonzaloruizdevilla/generator-angularexpress mocha
That folder is responsible of the failing test.
I have added another commit to the PR. I have modified de .travis.yml file to ensure that the working folder has the same name as the generator. This way the generator can be correctly tested, independently of the repo name.
I've added @passy recommendations and also jshinted the files. I've added a new commit 48eaaa2 to the PR that fixes a small issue with the tests of AngularJs services.
can you pull the travis fix out and submit that as a new pr and then merge/rebase please?
why were the view files moved?
I concluded that files inside templates/common/root
are copied as they are, without modifications, and the files that are manipulated like index.html
are stored inside templates/common
. Maybe this was a wrong assumption?
no i feel like you are right. what i did in my test branch (https://github.com/eddiemonge/generator-angular/tree/jade_support/templates) was create a new folder to hold these so they didnt clutter up other folders
Does it put all generated HTML files in yeoman.app
directory? Wouldn't .tmp
be better?
@szimek I agree with your suggestion, I'm going look at it.
@gonzaloruizdevilla If you do change destination path to .tmp
, remember to add '.tmp/**/*.html'
to livereload.files
config as well.
@szimek livereload should still look at the app/*/.jade but the tasks would be jade. it shouldnt watch the tmp folder for html files
@eddiemonge I'm a bit lost :) Will livereload work correctly with jade files having the following config:
watch: {
jade: {
files: ['<%= yeoman.app %>/views/**/*.jade'],
tasks: ['jade:server']
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: ['lots of other stuff', '<%= yeoman.app %>/views/**/*.jade']
}
}
Will jade:server
task always be executed before livereload reloads the page?
it will if you remove the jade files from livereload. the watch command triggers it automatically. the livereload
target is a bit misleading as its really a bucket to catch everything else
So if livereload
target is set, it automatically turns livereload for all other targets and additionally for any files listed in its files
option?
Sorry you need to set livereload to true in that target
Got it. Thanks!
Hey guys, awesome work here. Is there any chance this will make it into a future release?
Great work guys! I'm excited to use this!
Im scared of this one but Im still meaning to get to it
This may be a far-future goal, but might it be a good idea to simplify the build process a bit so that stuff like this, and other small custom tasks, can be inserted by users? It'd be neat if there was an easy way to customize angular generator with my own initialization questions like "Would you like to use Jade?".
@zakdances those are currently hidden behind a flag.
I do want to land this PR or one like it but got to get to other things first. This is a bug one keeping me from using this generator in my own work so it is a high personal priority but not as high on the project priority. That seems odd, I should change that.
ping @eddiemonge
also needs to fix merge conflict.
Is this still a thing? I'd love to see this in my work.
this needs all the comments addressed, conflicts resolved, commits squashed. It might be better to do it as a new PR with all these changes.
I'll try to find some time to work in a new PR. I'll close this one when the new one is ready.
Is there any update on the status of this PR?