Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix stylus includes #1609

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ export default class Generator extends Base {

this.scriptExt = answers.transpiler === 'ts' ? 'ts' : 'js';
this.templateExt = answers.markup;
this.styleExt = answers.stylesheet === 'sass' ? 'scss' : answers.stylesheet;

var styleExt = {sass: 'scss', stylus: 'styl'}[answers.stylesheet];
this.styleExt = styleExt ? styleExt : answers.stylesheet;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be shortened to something like

this.styleExt = answers.stylesheet === 'sass' ? 'scss' :
  answers.stylesheet === 'stylus' ? 'styl' :
  answers.stylesheet;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem, any way


cb();
}.bind(this));
Expand Down
1 change: 0 additions & 1 deletion app/templates/client/app/app(stylus).styl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<% } %>
// Component styles are injected through grunt
// injector
@import "account/login/login"
@import "admin/admin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file doesn't exists

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh you're right, curious, it used to exist. Anyway, if you're going to remove this, it should be in a separate commit, and you should do the same change for the SCSS and LESS files.

@import "main/main"
// endinjector