Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Commit

Permalink
work on #35 - assets image test, shift module dependencies to main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Grupp committed Jan 27, 2015
1 parent b043491 commit ff3ff76
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
3 changes: 0 additions & 3 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ var MGenerator = yeoman.generators.Base.extend({
},

subgenerators: function () {
if (this.update) {
return;
}
this.composeWith('m:module', {
arguments: config.DEFAULT_MODULE,
options: {sample: 'start'}
Expand Down
5 changes: 0 additions & 5 deletions app/templates/_app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
'use strict';
angular.module('<%= answers.appModule %>', [
'ionic',
'ngCordova',
'ui.router',
// TODO: load other modules selected during generation

// your modules
'main'
]);
2 changes: 1 addition & 1 deletion module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var MGenerator = yeoman.generators.NamedBase.extend({
var moduleFolder = 'app/' + this.fileName + '/';
this.mkdir(moduleFolder);
this.template('_module.js', moduleFolder + this.fileName + '.js');
this.mkdir(moduleFolder + 'assets/');
this.copy('yo.png', moduleFolder + 'assets/yo@2x.png');
this.mkdir(moduleFolder + 'controllers/');
this.mkdir(moduleFolder + 'directives/');
this.mkdir(moduleFolder + 'services/');
Expand Down
5 changes: 4 additions & 1 deletion module/templates/_module.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
'use strict';
angular.module('<%= module %>', [
'ui.router'
'ionic',
'ngCordova',
'ui.router',
// TODO: load other modules selected during generation
])
.config(function ($stateProvider, $urlRouterProvider) {

Expand Down
Binary file added module/templates/yo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions template/templates/_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ <h1 class="title"><%= name %></h1>
</ion-header-bar>
<ion-content>
this is your <%= name %> template<br>
icons working?: <span class="ion-checkmark-circled"></span><% if(options.sample === 'start') {%><br>
{{someData.binding}}<% } %>
<ul>
<li>icons working?: <span class="ion-checkmark-circled"></span></li>
<% if(options.sample === 'start') {%> <li>{{someData.binding}} </li><% } %>
<li>images working?<br><img src="<%= moduleFolder%>/assets/yo@2x.png"></li>
</ion-content>
</ion-pane>

0 comments on commit ff3ff76

Please sign in to comment.