Skip to content

Commit ce0b623

Browse files
committed
Merge pull request #155 from eleven-labs/fix-none-ui
Right value for none UI Framework
2 parents 3671db4 + 83a3e7d commit ce0b623

13 files changed

+8
-19
lines changed

app/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,12 @@ var GulpAngularGenerator = yeoman.generators.Base.extend({
6969
}
7070

7171
this.props = props;
72+
this.config.set('props', this.props);
7273

7374
done();
7475
}.bind(this));
7576
},
7677

77-
saveSettings: function() {
78-
if (this.skipConfig) {
79-
return ;
80-
}
81-
82-
this.config.set('props', this.props);
83-
this.config.forceSave();
84-
},
85-
8678
// Format props to template values
8779
formatProps: require('./src/format'),
8880

app/src/format.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,12 @@ module.exports = function () {
5656
return 'src/assets/images/' + listTechs[value].logo;
5757
});
5858

59-
// Select partials relative to props.ui
60-
var uiFileKey = this.props.ui.key === 'ui-bootstrap' ? 'bootstrap' : this.props.ui.key;
61-
6259
this.partialCopies = {};
6360

64-
var navbarPartialSrc = 'src/components/navbar/__' + uiFileKey + '-navbar.html';
61+
var navbarPartialSrc = 'src/components/navbar/__' + this.props.ui.key + '-navbar.html';
6562
this.partialCopies[navbarPartialSrc] = 'src/components/navbar/navbar.html';
6663

67-
var routerPartialSrc = 'src/app/main/__' + uiFileKey + '.html';
64+
var routerPartialSrc = 'src/app/main/__' + this.props.ui.key + '.html';
6865
if(this.props.router.module !== null) {
6966
this.partialCopies[routerPartialSrc] = 'src/app/main/main.html';
7067
}
@@ -107,7 +104,7 @@ module.exports = function () {
107104

108105
this.styleCopies = {};
109106

110-
var styleAppSrc = 'src/app/__' + uiFileKey + '-index.' + this.props.cssPreprocessor.extension;
107+
var styleAppSrc = 'src/app/__' + this.props.ui.key + '-index.' + this.props.cssPreprocessor.extension;
111108
this.styleCopies[styleAppSrc] = 'src/app/index.' + this.props.cssPreprocessor.extension;
112109

113110
// There is 2 ways of dealing with vendor styles
@@ -130,7 +127,7 @@ module.exports = function () {
130127
}
131128

132129
if(this.isVendorStylesPreprocessed && this.props.ui.name !== null) {
133-
var styleVendorSource = 'src/app/__' + uiFileKey + '-vendor.' + this.props.cssPreprocessor.extension;
130+
var styleVendorSource = 'src/app/__' + this.props.ui.key + '-vendor.' + this.props.cssPreprocessor.extension;
134131
this.styleCopies[styleVendorSource] = 'src/app/vendor.' + this.props.cssPreprocessor.extension;
135132
}
136133
};

0 commit comments

Comments
 (0)