-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #417 from ember-admin/new-blueprints
New blueprints
- Loading branch information
Showing
31 changed files
with
301 additions
and
5,809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Ember from 'ember'; | ||
import AdminResolver from 'ember-cli-admin/admin-resolver'; | ||
import loadInitializers from 'ember/load-initializers'; | ||
import config from './config/environment'; | ||
|
||
var App; | ||
|
||
Ember.MODEL_FACTORY_INJECTIONS = true; | ||
|
||
App = Ember.Application.extend({ | ||
modulePrefix: config.modulePrefix, | ||
podModulePrefix: config.podModulePrefix, | ||
Resolver: AdminResolver | ||
}); | ||
|
||
loadInitializers(App, config.modulePrefix); | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function() { | ||
this.navigate("Dashboard", { route: "dashboard" }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Ember from 'ember'; | ||
import MetaRoute from 'ember-cli-admin/dsl/meta-route'; | ||
import config from './config/environment'; | ||
|
||
var Router = Ember.Router.extend({ | ||
location: config.locationType | ||
}); | ||
|
||
Router.map(function() { | ||
}); | ||
|
||
MetaRoute.map(Router, function() { | ||
this.route("dashboard", {path: "/"}); | ||
}); | ||
|
||
export default Router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import Ember from 'ember'; | ||
import BaseAdminRouteMixin from 'ember-cli-admin/mixins/routes/base'; | ||
|
||
var mainRoute = Ember.Route.extend(BaseAdminRouteMixin); | ||
export default mainRoute; | ||
export default Ember.Route.extend(BaseAdminRouteMixin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import 'bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap'; | ||
@import 'ember-cli-admin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{partial 'admin/index'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* jshint node: true */ | ||
|
||
module.exports = function(environment) { | ||
var ENV = { | ||
modulePrefix: '<%= modulePrefix %>', | ||
environment: environment, | ||
baseURL: '/', | ||
locationType: 'auto', | ||
EmberENV: { | ||
appName: '<%= adminAppName %>', | ||
titleLinksTo: '<%= titleLinksTo %>', | ||
FEATURES: { | ||
// Here you can enable experimental features on an ember canary build | ||
// e.g. 'with-controller': true | ||
} | ||
}, | ||
|
||
APP: { | ||
// Here you can pass flags/options to your application instance | ||
// when it is created | ||
} | ||
}; | ||
|
||
if (environment === 'development') { | ||
// ENV.APP.LOG_RESOLVER = true; | ||
// ENV.APP.LOG_ACTIVE_GENERATION = true; | ||
// ENV.APP.LOG_TRANSITIONS = true; | ||
// ENV.APP.LOG_TRANSITIONS_INTERNAL = true; | ||
// ENV.APP.LOG_VIEW_LOOKUPS = true; | ||
} | ||
|
||
if (environment === 'test') { | ||
// Testem prefers this... | ||
ENV.baseURL = '/'; | ||
ENV.locationType = 'none'; | ||
|
||
// keep test console output quieter | ||
ENV.APP.LOG_ACTIVE_GENERATION = false; | ||
ENV.APP.LOG_VIEW_LOOKUPS = false; | ||
|
||
ENV.APP.rootElement = '#ember-testing'; | ||
} | ||
|
||
if (environment === 'production') { | ||
|
||
} | ||
|
||
return ENV; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,14 @@ | ||
var processTextContent = require('ember-cli-admin/lib/proccess-text-content').processTextContent; | ||
|
||
module.exports = { | ||
description: 'Generates an app scaffold', | ||
beforeInstall: function(options) { | ||
var process = processTextContent.bind(this); | ||
process('app/app.js', | ||
{ | ||
replace: { | ||
'ember/resolver': "ember-cli-admin/admin-resolver", | ||
'Resolver: Resolver': 'Resolver: AdminResolver', | ||
'import Resolver': 'import AdminResolver' | ||
} | ||
}); | ||
process('app/templates/application.hbs', | ||
{ | ||
replace: { | ||
'<h2 id="title">Welcome to Ember.js</h2>\n\n{{outlet}}': "{{partial 'admin/index'}}" | ||
} | ||
}); | ||
process('app/router.js', | ||
{ | ||
insert: { | ||
"import config from './config/environment';": "\nimport MetaRoute from 'ember-cli-admin/dsl/meta-route';", | ||
"export default Router;" : "\nMetaRoute.map(Router, function() {\nthis.route(\"dashboard\", {path: \"/\"});});\n\texport default Router;" | ||
} | ||
}); | ||
var appName = "\n\t\t\tappName: '" + options.entity.name + "',"; | ||
process('config/environment.js', | ||
{ | ||
insert: { | ||
"EmberENV: {": appName | ||
} | ||
}); | ||
process('Brocfile.js', | ||
{ | ||
insert: { | ||
"EmberApp();": "\nvar pickFiles = require('broccoli-static-compiler');\nvar bootstrapFonts = pickFiles('bower_components/bootstrap-sass-official/assets/fonts/bootstrap', {\n\tsrcDir: '/',\n\tdestDir: '/assets/bootstrap'\n});\nvar mergeTrees = require('broccoli-merge-trees');" | ||
}, | ||
replace: { | ||
"module.exports = app.toTree();": "module.exports = mergeTrees([app.toTree(), bootstrapFonts]);" | ||
} | ||
}); | ||
description: 'Generates an admin app scaffold', | ||
locals: function(options) { | ||
var entity = options.entity; | ||
var adminAppName = entity.name; | ||
var titleLinksTo = entity.titleLinksTo || 'http://ember-admin.com'; | ||
|
||
} | ||
return { | ||
modulePrefix: this.project.name(), | ||
adminAppName: adminAppName, | ||
titleLinksTo: titleLinksTo, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@import 'bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap'; | ||
@import 'ember-cli-admin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var renameFile = require('ember-cli-admin/lib/proccess-text-content').renameFile; | ||
|
||
module.exports = { | ||
normalizeEntityName: function() {}, | ||
|
||
afterInstall: function() { | ||
renameFile.bind(this)('app/styles/app.css', 'app/styles/app.scss'); | ||
this.addBowerPackagesToProject([ | ||
{name: "bootstrap-sass-official", target: "3.2.0"}, | ||
{name: "typeahead.js", target: "0.10.5"}, | ||
{name: "jquery-ui-sortable", target: "git://github.com/ryantbrown/jquery-ui-sortable.git"}, | ||
{name: "jquery-ui-touch-punch", target: "git://github.com/cbier/bower-jquery-ui-touch-punch.git"} | ||
]); | ||
|
||
var self = this; | ||
return this.addPackagesToProject([ | ||
{name: "ember-cli-map", target: "0.2.2"}, | ||
{name: "ember-cli-bootstrap-datepicker", target: "0.4.0"}, | ||
{name: "broccoli-merge-trees", target: "0.1.4"}, | ||
{name: "broccoli-static-compiler", target: "0.1.4"}, | ||
{name: "ember-cli-sass", target: "^4.0.0"} | ||
]); | ||
]).then(function() { | ||
return self.addBowerPackagesToProject([ | ||
{name: "bootstrap-sass-official", target: "3.3.4"}, | ||
{name: "bootstrap-datepicker", target: "~1.4.0"}, | ||
{name: "typeahead.js", target: "0.10.5"}, | ||
{name: "jquery-ui-sortable", target: "*"}, | ||
{name: "jquery-ui-touch-punch-improved", target: "0.3.1"} | ||
]); | ||
}); | ||
} | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,6 @@ | ||
var path = require('path'); | ||
/*jshint node:true*/ | ||
|
||
module.exports = { | ||
description: 'Generates tableview controller for specified resource', | ||
fileMapTokens: function() { | ||
return { | ||
__path__: function(options) { | ||
if (options.pod) { | ||
return path.join(options.podPath, options.dasherizedModuleName); | ||
} | ||
return 'controllers'; | ||
}, | ||
__name__: function(options) { | ||
if (options.pod) { | ||
return "controller"; | ||
} | ||
return options.dasherizedModuleName; | ||
} | ||
}; | ||
} | ||
}; |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.