2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Harry Wolff 2014-02-25 23:58:00 -05:00
parent edfc98f65f
commit 2295c9470b
14 changed files with 49544 additions and 21 deletions

3
.bowerrc Normal file
View file

@ -0,0 +1,3 @@
{
"directory": "core/shared/vendor"
}

View file

@ -54,6 +54,10 @@ var path = require('path'),
files: ['core/clientold/tpl/**/*.hbs'],
tasks: ['handlebars']
},
emberTemplates: {
files: 'core/client/templates/**/*.hbs',
tasks: ['emberTemplates']
},
sass: {
files: ['<%= paths.adminOldAssets %>/sass/**/*'],
tasks: ['sass:admin']
@ -68,6 +72,12 @@ var path = require('path'),
],
tasks: ['concat']
},
'concat-ember': {
files: [
'core/client/**/*.js'
],
tasks: ['concat:dev-ember']
},
livereload: {
files: [
// Theme CSS
@ -298,6 +308,19 @@ var path = require('path'),
}
},
// ### Config for grunt-ember-templates
// Compiles handlebar templates for ember
emberTemplates: {
compile: {
options: {
templateBasePath: /core\/client\/templates/
},
files: {
"core/built/scripts/templates-ember.js": "core/client/templates/**/*.hbs"
}
}
},
// ### Config for grunt-groc
// Generate documentation from code
groc: {
@ -415,6 +438,19 @@ var path = require('path'),
]
}
},
'dev-ember': {
files: {
'core/built/scripts/vendor-ember.js': [
'core/shared/vendor/jquery/jquery.js',
'core/shared/vendor/handlebars/handlebars.js',
'core/shared/vendor/ember/ember.js'
],
'core/built/scripts/ghost-dev-ember.js': [
'core/client/**/*.js'
]
}
},
prod: {
files: {
'core/built/scripts/ghost.js': [
@ -840,7 +876,7 @@ var path = require('path'),
grunt.registerTask('prod', 'Build CSS, JS & templates for production', ['sass:compress', 'handlebars', 'concat', 'uglify']);
// When you just say 'grunt'
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'concat']);
grunt.registerTask('default', 'Build CSS, JS & templates for development', ['update_submodules', 'sass:compress', 'handlebars', 'emberTemplates:compile', 'concat']);
};
module.exports = configureGrunt;

7
bower.json Normal file
View file

@ -0,0 +1,7 @@
{
"name": "ghost",
"dependencies": {
"handlebars": "~1.1.2",
"ember": "~1.4.0"
}
}

View file

@ -1 +0,0 @@
#Ember goes here

14
core/client/app.js Executable file
View file

@ -0,0 +1,14 @@
/*global Ember */
var App = Ember.Application.create({
/**
* These are debugging flags, they are useful during development
*/
LOG_ACTIVE_GENERATION: true,
LOG_MODULE_RESOLVER: true,
LOG_TRANSITIONS: true,
LOG_TRANSITIONS_INTERNAL: true,
LOG_VIEW_LOOKUPS: true,
rootElement: '#ember-app' // tells ember to inject this app into element with selector #ember-app
});

9
core/client/router.js Executable file
View file

@ -0,0 +1,9 @@
/*global App */
App.Router.map(function () {
'use strict';
this.resource('posts');
this.resource('post', {path: 'post/:id'}, function () {
this.route('edit');
});
});

View file

@ -0,0 +1,3 @@
<h2 id='title'>Welcome to Ghost on Ember.js</h2>
{{outlet}}

File diff suppressed because one or more lines are too long

View file

@ -31,23 +31,11 @@
<link rel="stylesheet" href="{{asset "css/screen.css" ghost="true"}}">
</head>
<body class="{{bodyClass}}{{update_notification classOnly="true"}}">
{{#unless hideNavbar}}
{{> navbar}}
{{/unless}}
<main role="main" id="main">
{{update_notification}}
<div id="ember-app"></div>
<aside id="notifications" class="notifications">
{{> notifications}}
</aside>
{{{body}}}
</main>
<div id="modal-container"></div>
<div class="modal-background fade"></div>
{{{ghost_script_tags}}}
<script src="/ghost/scripts/vendor-ember.js"></script>
<script src="/ghost/scripts/templates-ember.js"></script>
<script src="/ghost/scripts/ghost-dev-ember.js"></script>
</body>
</html>

41803
core/shared/vendor/ember/ember.js vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,7 @@ var testUtils = require('../utils'),
should = require('should'),
// Stuff we are testing
gdPath = "../../client/assets/vendor/showdown/extensions/ghostdown.js",
gdPath = "../../clientold/assets/vendor/showdown/extensions/ghostdown.js",
ghostdown = require(gdPath);
describe("Ghostdown showdown extensions", function () {

View file

@ -11,7 +11,7 @@ var testUtils = require('../utils'),
// Stuff we are testing
Showdown = require('showdown'),
github = require('../../shared/vendor/showdown/extensions/github'),
ghostdown = require('../../client/assets/vendor/showdown/extensions/ghostdown'),
ghostdown = require('../../clientold/assets/vendor/showdown/extensions/ghostdown'),
converter = new Showdown.converter({extensions: [ghostdown, github]});
describe("Showdown client side converter", function () {

View file

@ -60,6 +60,7 @@
"devDependencies": {
"blanket": "~1.1.5",
"grunt": "~0.4.1",
"grunt-ember-templates": "~0.4.18",
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-compress": "~0.5.2",