From d9b7d114010461589974cace4111ddaa1a5784c9 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 09:10:45 +0100 Subject: [PATCH 1/6] deps: ember-cli-node-assets@0.1.3 no issue - allows easy switching of `bower` dependencies to `npm` dependencies --- ghost/admin/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/admin/package.json b/ghost/admin/package.json index 615a592d5d..bd5e5e1393 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -42,6 +42,7 @@ "ember-cli-jshint": "1.0.4", "ember-cli-mirage": "0.1.13", "ember-cli-mocha": "0.10.4", + "ember-cli-node-assets": "0.1.3", "ember-cli-pretender": "0.6.0", "ember-cli-release": "0.2.8", "ember-cli-selectize": "0.5.5", From e3167c9afd36e300b20196fd259da097ddf3ebd7 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 09:28:40 +0100 Subject: [PATCH 2/6] deps: ember@2.6.1 no issue - bugfix release: https://github.com/emberjs/ember.js/releases/tag/v2.6.1 --- ghost/admin/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/bower.json b/ghost/admin/bower.json index a8b31bed4b..b9704dcae8 100644 --- a/ghost/admin/bower.json +++ b/ghost/admin/bower.json @@ -4,7 +4,7 @@ "blueimp-md5": "2.3.0", "codemirror": "5.15.2", "devicejs": "0.2.7", - "ember": "2.6.0", + "ember": "2.6.1", "ember-cli-shims": "0.1.1", "ember-cli-test-loader": "0.2.2", "ember-mocha": "0.8.11", From 0dccda345ec1d29a7982649ff1100645d64fc4f9 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 09:29:49 +0100 Subject: [PATCH 3/6] deps: ember-cli-shims@0.1.3 --- ghost/admin/bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/bower.json b/ghost/admin/bower.json index b9704dcae8..888c74d114 100644 --- a/ghost/admin/bower.json +++ b/ghost/admin/bower.json @@ -5,7 +5,7 @@ "codemirror": "5.15.2", "devicejs": "0.2.7", "ember": "2.6.1", - "ember-cli-shims": "0.1.1", + "ember-cli-shims": "0.1.3", "ember-cli-test-loader": "0.2.2", "ember-mocha": "0.8.11", "Faker": "3.1.0", From 1650069bcb62315398d0dd2c87d811d74bce542a Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 09:25:51 +0100 Subject: [PATCH 4/6] deps: codemirror@5.16.0 as npm module --- ghost/admin/bower.json | 1 - ghost/admin/ember-cli-build.js | 22 +++++++++++++--------- ghost/admin/package.json | 1 + 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ghost/admin/bower.json b/ghost/admin/bower.json index 888c74d114..7cbdf8923a 100644 --- a/ghost/admin/bower.json +++ b/ghost/admin/bower.json @@ -2,7 +2,6 @@ "name": "ghost", "dependencies": { "blueimp-md5": "2.3.0", - "codemirror": "5.15.2", "devicejs": "0.2.7", "ember": "2.6.1", "ember-cli-shims": "0.1.3", diff --git a/ghost/admin/ember-cli-build.js b/ghost/admin/ember-cli-build.js index 61f8f8181b..6aa219692f 100644 --- a/ghost/admin/ember-cli-build.js +++ b/ghost/admin/ember-cli-build.js @@ -41,6 +41,19 @@ module.exports = function (defaults) { }, hinting: false, fingerprint: disabled, + nodeAssets: { + codemirror: { + import: [ + 'lib/codemirror.js', + 'lib/codemirror.css', + 'theme/xq-light.css', + 'mode/htmlmixed/htmlmixed.js', + 'mode/xml/xml.js', + 'mode/css/css.js', + 'mode/javascript/javascript.js', + ] + } + }, 'ember-cli-selectize': { theme: false } @@ -65,11 +78,6 @@ module.exports = function (defaults) { app.import('bower_components/jquery-file-upload/js/jquery.fileupload-image.js'); app.import('bower_components/google-caja/html-css-sanitizer-bundle.js'); app.import('bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.js'); - app.import('bower_components/codemirror/lib/codemirror.js'); - app.import('bower_components/codemirror/mode/htmlmixed/htmlmixed.js'); - app.import('bower_components/codemirror/mode/xml/xml.js'); - app.import('bower_components/codemirror/mode/css/css.js'); - app.import('bower_components/codemirror/mode/javascript/javascript.js'); app.import('bower_components/password-generator/lib/password-generator.js'); app.import('bower_components/blueimp-md5/js/md5.js'); @@ -78,9 +86,5 @@ module.exports = function (defaults) { app.import(app.bowerDirectory + '/jquery-deparam/jquery-deparam.js', {type: 'test'}); } - // 'dem Styles - app.import('bower_components/codemirror/lib/codemirror.css'); - app.import('bower_components/codemirror/theme/xq-light.css'); - return app.toTree(); }; diff --git a/ghost/admin/package.json b/ghost/admin/package.json index bd5e5e1393..a1c0ab56f3 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -28,6 +28,7 @@ "bower": "1.7.9", "broccoli-asset-rev": "2.4.3", "chalk": "1.1.3", + "codemirror": "5.16.0", "csscomb": "3.1.8", "ember-ajax": "2.4.1", "ember-cli": "2.6.2", From 8192d6fd64d475f4439df1cc928a5fc2b7f470ed Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 09:48:38 +0100 Subject: [PATCH 5/6] deps: jquery-deparam@0.5.2 as npm module --- ghost/admin/bower.json | 1 - ghost/admin/ember-cli-build.js | 5 ++++- ghost/admin/package.json | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghost/admin/bower.json b/ghost/admin/bower.json index 7cbdf8923a..2ff359bbdf 100644 --- a/ghost/admin/bower.json +++ b/ghost/admin/bower.json @@ -10,7 +10,6 @@ "Faker": "3.1.0", "fastclick": "1.0.6", "google-caja": "6005.0.0", - "jquery-deparam": "0.5.1", "jquery-file-upload": "9.12.3", "jquery-ui": "1.11.4", "jqueryui-touch-punch": "furf/jquery-ui-touch-punch#4bc009145202d9c7483ba85f3a236a8f3470354d", diff --git a/ghost/admin/ember-cli-build.js b/ghost/admin/ember-cli-build.js index 6aa219692f..40be0e9f8f 100644 --- a/ghost/admin/ember-cli-build.js +++ b/ghost/admin/ember-cli-build.js @@ -52,6 +52,10 @@ module.exports = function (defaults) { 'mode/css/css.js', 'mode/javascript/javascript.js', ] + }, + 'jquery-deparam': { + enabled: EmberApp.env() === 'test', + import: ['jquery-deparam.js'] } }, 'ember-cli-selectize': { @@ -83,7 +87,6 @@ module.exports = function (defaults) { if (app.env === 'test') { app.import(app.bowerDirectory + '/jquery.simulate.drag-sortable/jquery.simulate.drag-sortable.js', {type: 'test'}); - app.import(app.bowerDirectory + '/jquery-deparam/jquery-deparam.js', {type: 'test'}); } return app.toTree(); diff --git a/ghost/admin/package.json b/ghost/admin/package.json index a1c0ab56f3..5f5940bb95 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -73,6 +73,7 @@ "grunt-contrib-jshint": "1.0.0", "grunt-jscs": "3.0.1", "grunt-shell": "1.3.0", + "jquery-deparam": "0.5.2", "liquid-fire": "0.23.1", "liquid-tether": "1.1.1", "loader.js": "4.0.10", From 861d79299f9c4a8249667de205e619e6785656e1 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 29 Jun 2016 10:23:45 +0100 Subject: [PATCH 6/6] convert bower deps to npm deps no issue - convert moment + moment-timezone to npm dependencies - convert password-generator to npm dependency - convert keymaster.js to npm dependency - convert blueimp-md5 to npm dependency --- ghost/admin/bower.json | 4 ---- ghost/admin/ember-cli-build.js | 16 ++++++++++++---- ghost/admin/package.json | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ghost/admin/bower.json b/ghost/admin/bower.json index 2ff359bbdf..d445f5185f 100644 --- a/ghost/admin/bower.json +++ b/ghost/admin/bower.json @@ -1,7 +1,6 @@ { "name": "ghost", "dependencies": { - "blueimp-md5": "2.3.0", "devicejs": "0.2.7", "ember": "2.6.1", "ember-cli-shims": "0.1.3", @@ -16,10 +15,7 @@ "jquery.simulate.drag-sortable": "0.1.0", "keymaster": "1.6.3", "lodash": "3.7.0", - "moment": "2.13.0", - "moment-timezone": "0.5.4", "normalize.css": "3.0.3", - "password-generator": "2.0.2", "pretender": "1.1.0", "rangyinputs": "1.2.0", "selectize": "~0.12.1", diff --git a/ghost/admin/ember-cli-build.js b/ghost/admin/ember-cli-build.js index 40be0e9f8f..2abbf7a50f 100644 --- a/ghost/admin/ember-cli-build.js +++ b/ghost/admin/ember-cli-build.js @@ -42,6 +42,9 @@ module.exports = function (defaults) { hinting: false, fingerprint: disabled, nodeAssets: { + 'blueimp-md5': { + import: ['js/md5.js'] + }, codemirror: { import: [ 'lib/codemirror.js', @@ -56,6 +59,15 @@ module.exports = function (defaults) { 'jquery-deparam': { enabled: EmberApp.env() === 'test', import: ['jquery-deparam.js'] + }, + moment: { + import: ['moment.js'] + }, + 'moment-timezone': { + import: ['builds/moment-timezone-with-data.js'] + }, + 'password-generator': { + import: ['lib/password-generator.js'] } }, 'ember-cli-selectize': { @@ -71,8 +83,6 @@ module.exports = function (defaults) { app.import('bower_components/showdown-ghost/src/extensions/ghostimagepreview.js'); app.import('bower_components/showdown-ghost/src/extensions/footnotes.js'); app.import('bower_components/showdown-ghost/src/extensions/highlight.js'); - app.import('bower_components/moment/moment.js'); - app.import('bower_components/moment-timezone/builds/moment-timezone-with-data.js'); app.import('bower_components/keymaster/keymaster.js'); app.import('bower_components/devicejs/lib/device.js'); app.import('bower_components/jquery-ui/jquery-ui.js'); @@ -82,8 +92,6 @@ module.exports = function (defaults) { app.import('bower_components/jquery-file-upload/js/jquery.fileupload-image.js'); app.import('bower_components/google-caja/html-css-sanitizer-bundle.js'); app.import('bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.js'); - app.import('bower_components/password-generator/lib/password-generator.js'); - app.import('bower_components/blueimp-md5/js/md5.js'); if (app.env === 'test') { app.import(app.bowerDirectory + '/jquery.simulate.drag-sortable/jquery.simulate.drag-sortable.js', {type: 'test'}); diff --git a/ghost/admin/package.json b/ghost/admin/package.json index 5f5940bb95..1a2de820fe 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -25,6 +25,7 @@ }, "devDependencies": { "bluebird": "3.4.1", + "blueimp-md5": "2.3.0", "bower": "1.7.9", "broccoli-asset-rev": "2.4.3", "chalk": "1.1.3", @@ -80,6 +81,8 @@ "lodash": "4.13.1", "matchdep": "1.0.1", "moment": "2.13.0", + "moment-timezone": "0.5.4", + "password-generator": "2.0.2", "top-gh-contribs": "2.0.4", "walk-sync": "^0.2.6" },