-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(build): add Jade support #420
base: master
Are you sure you want to change the base?
feat(build): add Jade support #420
Conversation
so many changes. @gonzaloruizdevilla can you rebase and merge conflicts please (again i think)(sorry)? |
Done. It was small conflict in |
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:
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. |
}; | ||
|
||
Generator.prototype.createIndexHtml = function createIndexHtml() { | ||
this.write(path.join(this.appPath, 'index.html'), this.indexFile); | ||
if(this.env.options.jade) { | ||
this.write(path.join(this.appPath, 'index.jade'), this.indexFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you just alter the file name? Something like var indexFile = 'index.' + this.env.options.jade ? 'jade' : 'html';
Added new --jade option to generator that will create Jade templates (http://jade-lang.com/)
can you pull the travis fix out and submit that as a new pr and then merge/rebase please? |
}; | ||
|
||
function spacePrefix(jade, block){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like all these functions should go in the utils file
why were the view files moved? |
I concluded that files inside |
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 |
@szimek I agree with your suggestion, I'm going look at it. |
@gonzaloruizdevilla If you do change destination path to |
@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 |
it will if you remove the jade files from livereload. the watch command triggers it automatically. the |
So if |
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? |
Added new --jade option to generator that will create jade templates (http://jade-lang.com/)