diff --git a/.ember-cli b/.ember-cli new file mode 100644 index 000000000..ee64cfed2 --- /dev/null +++ b/.ember-cli @@ -0,0 +1,9 @@ +{ + /** + Ember CLI sends analytics information by default. The data is completely + anonymous, but there are times when you might want to disable this behavior. + + Setting `disableAnalytics` to true will prevent any data from being sent. + */ + "disableAnalytics": false +} diff --git a/.jshintrc b/.jshintrc index 4a0855de1..495a5e546 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,33 +1,38 @@ { - "node": false, - "browser": true, - "bitwise": true, - "curly": true, - "eqeqeq": true, - "forin": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "noempty": true, - "nonew": true, - "plusplus": true, - "regexp": true, - "undef": true, - "unused": true, - "indent": 4, - "esnext": true, - "quotmark": "single", - "globals": { - "Ember": true, - "Em": true, - "DS": true, - "$": true, - "SimpleAuth": true, - "validator": true, - "ic": true, - "NProgress": true, - "moment": true - }, - "predef": ["-Notification"] + "predef": [ + "document", + "window", + "-Promise", + "$", + "validator", + "ic", + "SimpleAuth", + "NProgress", + "moment" + ], + "browser": true, + "boss": true, + "curly": true, + "debug": false, + "devel": true, + "eqeqeq": true, + "evil": true, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "nomen": false, + "onevar": false, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": false, + "eqnull": true, + "esnext": true, + "unused": true } diff --git a/Brocfile.js b/Brocfile.js new file mode 100644 index 000000000..f9c0bf43b --- /dev/null +++ b/Brocfile.js @@ -0,0 +1,38 @@ +/* global require, module */ + +var EmberApp = require('ember-cli/lib/broccoli/ember-app'); + +var app = new EmberApp( + { + sourcemaps: {enabled: false} //see https://github.com/ember-cli/ember-cli/issues/2912 + } +); + +app.import('bower_components/loader.js/loader.js'); +app.import('bower_components/jquery/dist/jquery.js'); +app.import('bower_components/ic-ajax/dist/globals/main.js'); +app.import('bower_components/ember-load-initializers/ember-load-initializers.js'); +app.import('bower_components/validator-js/validator.js'); +app.import('bower_components/codemirror/lib/codemirror.js'); +app.import('bower_components/codemirror/addon/mode/overlay.js'); +app.import('bower_components/codemirror/mode/markdown/markdown.js'); +app.import('bower_components/codemirror/mode/gfm/gfm.js'); +app.import('bower_components/showdown-ghost/src/showdown.js'); +app.import('bower_components/moment/moment.js'); +app.import('bower_components/keymaster/keymaster.js'); +app.import('bower_components/device/lib/device.js'); +app.import('bower_components/jquery-ui/ui/jquery-ui.js'); +app.import('bower_components/jquery-file-upload/js/jquery.fileupload.js'); +app.import('bower_components/fastclick/lib/fastclick.js'); +app.import('bower_components/nprogress/nprogress.js'); +app.import('bower_components/ember-simple-auth/simple-auth.js'); +app.import('bower_components/ember-simple-auth/simple-auth-oauth2.js'); +app.import('bower_components/google-caja/html-css-sanitizer-bundle.js'); +app.import('bower_components/nanoscroller/bin/javascripts/jquery.nanoscroller.js'); + +app.import('vendor/showdown/extensions/ghostgfm.js'); +app.import('vendor/showdown/extensions/ghostimagepreview.js'); +app.import('vendor/showdown/extensions/ghostfootnotes.js'); +app.import('vendor/showdown/extensions/ghosthighlight.js'); + +module.exports = app.toTree(); diff --git a/app/adapters/base.js b/app/adapters/base.js index 82f406387..c01977f9d 100644 --- a/app/adapters/base.js +++ b/app/adapters/base.js @@ -1,3 +1,4 @@ +import DS from 'ember-data'; import ghostPaths from 'ghost/utils/ghost-paths'; var BaseAdapter = DS.RESTAdapter.extend({ diff --git a/app/adapters/embedded-relation-adapter.js b/app/adapters/embedded-relation-adapter.js index 49d0662b4..21ad3b12c 100644 --- a/app/adapters/embedded-relation-adapter.js +++ b/app/adapters/embedded-relation-adapter.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import BaseAdapter from 'ghost/adapters/base'; // EmbeddedRelationAdapter will augment the query object in calls made to diff --git a/app/app.js b/app/app.js index c34986087..5ec7df6ce 100755 --- a/app/app.js +++ b/app/app.js @@ -1,19 +1,20 @@ +import Ember from 'ember'; import Resolver from 'ember/resolver'; import loadInitializers from 'ember/load-initializers'; import 'ghost/utils/link-view'; import 'ghost/utils/text-field'; import configureApp from 'ghost/config'; +import config from './config/environment'; Ember.MODEL_FACTORY_INJECTIONS = true; var App = Ember.Application.extend({ - modulePrefix: 'ghost', - Resolver: Resolver.default + modulePrefix: config.modulePrefix, + podModulePrefix: config.podModulePrefix, + Resolver: Resolver }); - -// Runtime configuration of Ember.Application configureApp(App); -loadInitializers(App, 'ghost'); +loadInitializers(App, config.modulePrefix); export default App; diff --git a/app/components/gh-activating-list-item.js b/app/components/gh-activating-list-item.js index 64226dc00..1c384d991 100644 --- a/app/components/gh-activating-list-item.js +++ b/app/components/gh-activating-list-item.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var ActivatingListItem = Ember.Component.extend({ tagName: 'li', classNameBindings: ['active'], diff --git a/app/components/gh-codemirror.js b/app/components/gh-codemirror.js index 904a38332..bc80e77e8 100644 --- a/app/components/gh-codemirror.js +++ b/app/components/gh-codemirror.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /*global CodeMirror */ import MarkerManager from 'ghost/mixins/marker-manager'; diff --git a/app/components/gh-dropdown-button.js b/app/components/gh-dropdown-button.js index 245907b03..8d47b17d4 100644 --- a/app/components/gh-dropdown-button.js +++ b/app/components/gh-dropdown-button.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import DropdownMixin from 'ghost/mixins/dropdown-mixin'; var DropdownButton = Ember.Component.extend(DropdownMixin, { diff --git a/app/components/gh-dropdown.js b/app/components/gh-dropdown.js index a28b1d414..707bad0b9 100644 --- a/app/components/gh-dropdown.js +++ b/app/components/gh-dropdown.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import DropdownMixin from 'ghost/mixins/dropdown-mixin'; var GhostDropdown = Ember.Component.extend(DropdownMixin, { diff --git a/app/components/gh-file-upload.js b/app/components/gh-file-upload.js index 5f0cc2707..5366bc8c4 100644 --- a/app/components/gh-file-upload.js +++ b/app/components/gh-file-upload.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var FileUpload = Ember.Component.extend({ _file: null, diff --git a/app/components/gh-form.js b/app/components/gh-form.js index 70f7accc5..4259425b3 100644 --- a/app/components/gh-form.js +++ b/app/components/gh-form.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var Form = Ember.View.extend({ tagName: 'form', attributeBindings: ['enctype'], diff --git a/app/components/gh-input.js b/app/components/gh-input.js index 88dc5b6dd..4c32d3ff7 100644 --- a/app/components/gh-input.js +++ b/app/components/gh-input.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import TextInputMixin from 'ghost/mixins/text-input'; var Input = Ember.TextField.extend(TextInputMixin); diff --git a/app/components/gh-markdown.js b/app/components/gh-markdown.js index f949e5d71..e19052047 100644 --- a/app/components/gh-markdown.js +++ b/app/components/gh-markdown.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import uploader from 'ghost/assets/lib/uploader'; var Markdown = Ember.Component.extend({ diff --git a/app/components/gh-modal-dialog.js b/app/components/gh-modal-dialog.js index 143bb631c..9334ad9ca 100644 --- a/app/components/gh-modal-dialog.js +++ b/app/components/gh-modal-dialog.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var ModalDialog = Ember.Component.extend({ didInsertElement: function () { this.$('.js-modal-container, .js-modal-background').addClass('fade-in open'); diff --git a/app/components/gh-navitem-url-input.js b/app/components/gh-navitem-url-input.js index 7cdb15ea0..83c12a925 100644 --- a/app/components/gh-navitem-url-input.js +++ b/app/components/gh-navitem-url-input.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; function joinUrlParts(url, path) { if (path[0] !== '/' && url.slice(-1) !== '/') { path = '/' + path; diff --git a/app/components/gh-navitem.js b/app/components/gh-navitem.js index 9ee14f71d..70a72bab4 100644 --- a/app/components/gh-navitem.js +++ b/app/components/gh-navitem.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var NavItemComponent = Ember.Component.extend({ classNames: 'navigation-item', diff --git a/app/components/gh-notification.js b/app/components/gh-notification.js index 3d94947ec..f81a5e2fe 100644 --- a/app/components/gh-notification.js +++ b/app/components/gh-notification.js @@ -1,3 +1,5 @@ +import Ember from 'ember'; + var NotificationComponent = Ember.Component.extend({ classNames: ['js-bb-notification'], diff --git a/app/components/gh-notifications.js b/app/components/gh-notifications.js index 273cccbcf..0d764f3db 100644 --- a/app/components/gh-notifications.js +++ b/app/components/gh-notifications.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var NotificationsComponent = Ember.Component.extend({ tagName: 'aside', classNames: 'notifications', diff --git a/app/components/gh-popover-button.js b/app/components/gh-popover-button.js index 1bc58ec05..748437921 100644 --- a/app/components/gh-popover-button.js +++ b/app/components/gh-popover-button.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import DropdownButton from 'ghost/components/gh-dropdown-button'; var PopoverButton = DropdownButton.extend({ diff --git a/app/components/gh-role-selector.js b/app/components/gh-role-selector.js index 0ffa133de..20a5e7554 100644 --- a/app/components/gh-role-selector.js +++ b/app/components/gh-role-selector.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import GhostSelect from 'ghost/components/gh-select'; var RolesSelector = GhostSelect.extend({ diff --git a/app/components/gh-select.js b/app/components/gh-select.js index 69dfdbabd..f053bc342 100644 --- a/app/components/gh-select.js +++ b/app/components/gh-select.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; // GhostSelect is a solution to Ember.Select being evil and worthless. // (Namely, this solves problems with async data in Ember.Select) // Inspired by (that is, totally ripped off from) this JSBin diff --git a/app/components/gh-tab-pane.js b/app/components/gh-tab-pane.js index 6ede3bb75..c930e62b6 100644 --- a/app/components/gh-tab-pane.js +++ b/app/components/gh-tab-pane.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; // See gh-tabs-manager.js for use var TabPane = Ember.Component.extend({ classNameBindings: ['active'], diff --git a/app/components/gh-tab.js b/app/components/gh-tab.js index 5c9faa0d9..d2d20d515 100644 --- a/app/components/gh-tab.js +++ b/app/components/gh-tab.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; // See gh-tabs-manager.js for use var Tab = Ember.Component.extend({ tabsManager: Ember.computed(function () { diff --git a/app/components/gh-tabs-manager.js b/app/components/gh-tabs-manager.js index 566699320..438997199 100644 --- a/app/components/gh-tabs-manager.js +++ b/app/components/gh-tabs-manager.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /** Heavily inspired by ic-tabs (https://github.com/instructure/ic-tabs) diff --git a/app/components/gh-textarea.js b/app/components/gh-textarea.js index fbbe45ea2..ae4b53f4b 100644 --- a/app/components/gh-textarea.js +++ b/app/components/gh-textarea.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import TextInputMixin from 'ghost/mixins/text-input'; var TextArea = Ember.TextArea.extend(TextInputMixin); diff --git a/app/components/gh-trim-focus-input.js b/app/components/gh-trim-focus-input.js index c6873628e..b75f4f984 100644 --- a/app/components/gh-trim-focus-input.js +++ b/app/components/gh-trim-focus-input.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /*global device*/ var TrimFocusInput = Ember.TextField.extend({ focus: true, diff --git a/app/components/gh-uploader.js b/app/components/gh-uploader.js index d19875bf3..75dc86cb6 100644 --- a/app/components/gh-uploader.js +++ b/app/components/gh-uploader.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import uploader from 'ghost/assets/lib/uploader'; var PostImageUploader = Ember.Component.extend({ diff --git a/app/components/gh-url-preview.js b/app/components/gh-url-preview.js index 3e71002cf..cc4610528 100644 --- a/app/components/gh-url-preview.js +++ b/app/components/gh-url-preview.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /* Example usage: {{gh-url-preview prefix="tag" slug=theSlugValue tagName="p" classNames="description"}} diff --git a/app/config-dev.js b/app/config-dev.js index 7f38a287f..33da76efa 100644 --- a/app/config-dev.js +++ b/app/config-dev.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; function configureApp(App) { if (!App instanceof Ember.Application) { return; diff --git a/app/config-prod.js b/app/config-prod.js index 7e408dd9d..e4f53d03e 100644 --- a/app/config-prod.js +++ b/app/config-prod.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; function configureApp(App) { if (!App instanceof Ember.Application) { return; diff --git a/app/controllers/application.js b/app/controllers/application.js index ef92105d0..028e238bd 100644 --- a/app/controllers/application.js +++ b/app/controllers/application.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var ApplicationController = Ember.Controller.extend({ // jscs: disable hideNav: Ember.computed.match('currentPath', /(error|signin|signup|setup|forgotten|reset)/), diff --git a/app/controllers/editor/edit.js b/app/controllers/editor/edit.js index d8cb1d1d6..6762b3210 100644 --- a/app/controllers/editor/edit.js +++ b/app/controllers/editor/edit.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import EditorControllerMixin from 'ghost/mixins/editor-base-controller'; var EditorEditController = Ember.Controller.extend(EditorControllerMixin); diff --git a/app/controllers/editor/new.js b/app/controllers/editor/new.js index 1d1bfab9b..ce48087cf 100644 --- a/app/controllers/editor/new.js +++ b/app/controllers/editor/new.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import EditorControllerMixin from 'ghost/mixins/editor-base-controller'; var EditorNewController = Ember.Controller.extend(EditorControllerMixin, { diff --git a/app/controllers/error.js b/app/controllers/error.js index 8ff18ebb8..d7a0e8ff6 100644 --- a/app/controllers/error.js +++ b/app/controllers/error.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var ErrorController = Ember.Controller.extend({ code: Ember.computed('content.status', function () { return this.get('content.status') > 200 ? this.get('content.status') : 500; diff --git a/app/controllers/feature.js b/app/controllers/feature.js index 4f99ec29d..4acc795b3 100644 --- a/app/controllers/feature.js +++ b/app/controllers/feature.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, { init: function () { var promise; diff --git a/app/controllers/forgotten.js b/app/controllers/forgotten.js index dcc043310..ed1bc2ac2 100644 --- a/app/controllers/forgotten.js +++ b/app/controllers/forgotten.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; diff --git a/app/controllers/modals/copy-html.js b/app/controllers/modals/copy-html.js index 9d5fcabe5..161e65baf 100644 --- a/app/controllers/modals/copy-html.js +++ b/app/controllers/modals/copy-html.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var CopyHTMLController = Ember.Controller.extend({ generatedHTML: Ember.computed.alias('model.generatedHTML') diff --git a/app/controllers/modals/delete-all.js b/app/controllers/modals/delete-all.js index ea6ba9563..4d83e235e 100644 --- a/app/controllers/modals/delete-all.js +++ b/app/controllers/modals/delete-all.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var DeleteAllController = Ember.Controller.extend({ actions: { confirmAccept: function () { diff --git a/app/controllers/modals/delete-post.js b/app/controllers/modals/delete-post.js index 1a5bcea46..56b08db5d 100644 --- a/app/controllers/modals/delete-post.js +++ b/app/controllers/modals/delete-post.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var DeletePostController = Ember.Controller.extend({ actions: { confirmAccept: function () { diff --git a/app/controllers/modals/delete-tag.js b/app/controllers/modals/delete-tag.js index e77ced827..0657743bf 100644 --- a/app/controllers/modals/delete-tag.js +++ b/app/controllers/modals/delete-tag.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var DeleteTagController = Ember.Controller.extend({ postInflection: Ember.computed('model.post_count', function () { return this.get('model.post_count') > 1 ? 'posts' : 'post'; diff --git a/app/controllers/modals/delete-user.js b/app/controllers/modals/delete-user.js index 5dfbd52c3..2f8e39bda 100644 --- a/app/controllers/modals/delete-user.js +++ b/app/controllers/modals/delete-user.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var DeleteUserController = Ember.Controller.extend({ userPostCount: Ember.computed('model.id', function () { var promise, diff --git a/app/controllers/modals/invite-new-user.js b/app/controllers/modals/invite-new-user.js index b7309b9f2..dd54b976e 100644 --- a/app/controllers/modals/invite-new-user.js +++ b/app/controllers/modals/invite-new-user.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var InviteNewUserController = Ember.Controller.extend({ // Used to set the initial value for the dropdown authorRole: Ember.computed(function () { diff --git a/app/controllers/modals/leave-editor.js b/app/controllers/modals/leave-editor.js index b5526ae3d..0f01f14d8 100644 --- a/app/controllers/modals/leave-editor.js +++ b/app/controllers/modals/leave-editor.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var LeaveEditorController = Ember.Controller.extend({ args: Ember.computed.alias('model'), diff --git a/app/controllers/modals/signin.js b/app/controllers/modals/signin.js index 27bd8904c..dc6d2b6d7 100644 --- a/app/controllers/modals/signin.js +++ b/app/controllers/modals/signin.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ValidationEngine from 'ghost/mixins/validation-engine'; export default Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, { diff --git a/app/controllers/modals/transfer-owner.js b/app/controllers/modals/transfer-owner.js index e684c6ab7..afd416e3b 100644 --- a/app/controllers/modals/transfer-owner.js +++ b/app/controllers/modals/transfer-owner.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var TransferOwnerController = Ember.Controller.extend({ actions: { confirmAccept: function () { diff --git a/app/controllers/modals/upload.js b/app/controllers/modals/upload.js index 64c3f9e0e..c2cdf42b2 100644 --- a/app/controllers/modals/upload.js +++ b/app/controllers/modals/upload.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var UploadController = Ember.Controller.extend({ acceptEncoding: 'image/*', diff --git a/app/controllers/post-settings-menu.js b/app/controllers/post-settings-menu.js index d1c5adec3..ca17fa4b1 100644 --- a/app/controllers/post-settings-menu.js +++ b/app/controllers/post-settings-menu.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /* global moment */ import {parseDateString, formatDate} from 'ghost/utils/date-formatting'; import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller'; diff --git a/app/controllers/post-tags-input.js b/app/controllers/post-tags-input.js index 8f5d08b32..66946151d 100644 --- a/app/controllers/post-tags-input.js +++ b/app/controllers/post-tags-input.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var PostTagsInputController = Ember.Controller.extend({ tagEnteredOrder: Ember.A(), diff --git a/app/controllers/posts.js b/app/controllers/posts.js index f9119ac0d..9bd26f1fa 100644 --- a/app/controllers/posts.js +++ b/app/controllers/posts.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import PaginationControllerMixin from 'ghost/mixins/pagination-controller'; function publishedAtCompare(item1, item2) { diff --git a/app/controllers/posts/post.js b/app/controllers/posts/post.js index 40f655176..dd8551217 100644 --- a/app/controllers/posts/post.js +++ b/app/controllers/posts/post.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var PostController = Ember.Controller.extend({ isPublished: Ember.computed.equal('model.status', 'published'), classNameBindings: ['model.featured'], diff --git a/app/controllers/reset.js b/app/controllers/reset.js index 481c1847f..b500d083e 100644 --- a/app/controllers/reset.js +++ b/app/controllers/reset.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; diff --git a/app/controllers/settings.js b/app/controllers/settings.js index 0b7b9a648..5dbd81765 100644 --- a/app/controllers/settings.js +++ b/app/controllers/settings.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var SettingsController = Ember.Controller.extend({ needs: ['feature'], diff --git a/app/controllers/settings/app.js b/app/controllers/settings/app.js index 1179eaef3..58b974f7d 100644 --- a/app/controllers/settings/app.js +++ b/app/controllers/settings/app.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /*global alert */ var appStates, diff --git a/app/controllers/settings/code-injection.js b/app/controllers/settings/code-injection.js index 2b87c9d14..f396f8737 100644 --- a/app/controllers/settings/code-injection.js +++ b/app/controllers/settings/code-injection.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var SettingsCodeInjectionController = Ember.Controller.extend({ actions: { save: function () { diff --git a/app/controllers/settings/general.js b/app/controllers/settings/general.js index 729c8960c..7c76cb700 100644 --- a/app/controllers/settings/general.js +++ b/app/controllers/settings/general.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var SettingsGeneralController = Ember.Controller.extend({ selectedTheme: null, diff --git a/app/controllers/settings/labs.js b/app/controllers/settings/labs.js index fcbfc4826..8db0e4c5a 100644 --- a/app/controllers/settings/labs.js +++ b/app/controllers/settings/labs.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var LabsController = Ember.Controller.extend(Ember.Evented, { needs: ['feature'], diff --git a/app/controllers/settings/navigation.js b/app/controllers/settings/navigation.js index b68779a44..d1bebe4a8 100644 --- a/app/controllers/settings/navigation.js +++ b/app/controllers/settings/navigation.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var NavigationController, NavItem; diff --git a/app/controllers/settings/tags.js b/app/controllers/settings/tags.js index 7b8b34d52..00bfb2a5b 100644 --- a/app/controllers/settings/tags.js +++ b/app/controllers/settings/tags.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import PaginationMixin from 'ghost/mixins/pagination-controller'; import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller'; import boundOneWay from 'ghost/utils/bound-one-way'; diff --git a/app/controllers/settings/users/index.js b/app/controllers/settings/users/index.js index c647bd2b1..a2893fd58 100644 --- a/app/controllers/settings/users/index.js +++ b/app/controllers/settings/users/index.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import PaginationControllerMixin from 'ghost/mixins/pagination-controller'; var UsersIndexController = Ember.ArrayController.extend(PaginationControllerMixin, { diff --git a/app/controllers/settings/users/user.js b/app/controllers/settings/users/user.js index c9e690689..edb60a371 100644 --- a/app/controllers/settings/users/user.js +++ b/app/controllers/settings/users/user.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import SlugGenerator from 'ghost/models/slug-generator'; import isNumber from 'ghost/utils/isNumber'; import boundOneWay from 'ghost/utils/bound-one-way'; diff --git a/app/controllers/setup.js b/app/controllers/setup.js index 1126a9c70..2d2ae3526 100644 --- a/app/controllers/setup.js +++ b/app/controllers/setup.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; diff --git a/app/controllers/signin.js b/app/controllers/signin.js index aa5ddc9c8..36462c8d1 100644 --- a/app/controllers/signin.js +++ b/app/controllers/signin.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ValidationEngine from 'ghost/mixins/validation-engine'; var SigninController = Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, { diff --git a/app/controllers/signup.js b/app/controllers/signup.js index 5ad838921..70b6d8f6c 100644 --- a/app/controllers/signup.js +++ b/app/controllers/signup.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import ajax from 'ghost/utils/ajax'; import ValidationEngine from 'ghost/mixins/validation-engine'; diff --git a/app/helpers/gh-blog-url.js b/app/helpers/gh-blog-url.js index d7e0d9688..3158b000e 100644 --- a/app/helpers/gh-blog-url.js +++ b/app/helpers/gh-blog-url.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var blogUrl = Ember.HTMLBars.makeBoundHelper(function () { return Ember.String.htmlSafe(this.get('config.blogUrl')); }); diff --git a/app/helpers/gh-count-characters.js b/app/helpers/gh-count-characters.js index 64effde58..7834c35be 100644 --- a/app/helpers/gh-count-characters.js +++ b/app/helpers/gh-count-characters.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var countCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) { var el = document.createElement('span'), length, diff --git a/app/helpers/gh-count-down-characters.js b/app/helpers/gh-count-down-characters.js index 923331fcc..6a8c3930a 100644 --- a/app/helpers/gh-count-down-characters.js +++ b/app/helpers/gh-count-down-characters.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var countDownCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) { var el = document.createElement('span'), content, diff --git a/app/helpers/gh-count-words.js b/app/helpers/gh-count-words.js index c650172b9..19b2e5e11 100644 --- a/app/helpers/gh-count-words.js +++ b/app/helpers/gh-count-words.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import counter from 'ghost/utils/word-count'; var countWords = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) { diff --git a/app/helpers/gh-format-html.js b/app/helpers/gh-format-html.js index a21751435..691e8edaa 100644 --- a/app/helpers/gh-format-html.js +++ b/app/helpers/gh-format-html.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /* global html_sanitize*/ import cajaSanitizers from 'ghost/utils/caja-sanitizers'; diff --git a/app/helpers/gh-format-markdown.js b/app/helpers/gh-format-markdown.js index 49024a29c..d1b5c79cb 100644 --- a/app/helpers/gh-format-markdown.js +++ b/app/helpers/gh-format-markdown.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; /* global Showdown, html_sanitize*/ import cajaSanitizers from 'ghost/utils/caja-sanitizers'; diff --git a/app/helpers/gh-format-timeago.js b/app/helpers/gh-format-timeago.js index db1fdcd1f..9fbe51d9d 100644 --- a/app/helpers/gh-format-timeago.js +++ b/app/helpers/gh-format-timeago.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; var formatTimeago = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) { if (!arr || !arr.length) { return; diff --git a/app/helpers/gh-path.js b/app/helpers/gh-path.js index c08b91821..6121c76cf 100644 --- a/app/helpers/gh-path.js +++ b/app/helpers/gh-path.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; // Handlebars Helper {{gh-path}} // Usage: Assume 'http://www.myghostblog.org/myblog/' // {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/) diff --git a/app/index.html b/app/index.html index 3af77c74c..71a6d0b77 100644 --- a/app/index.html +++ b/app/index.html @@ -7,6 +7,8 @@