From 0239c7d38638b32ea9e023783ae00e65597d7293 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Thu, 13 Nov 2014 18:02:26 -0800 Subject: [PATCH] Update structure of the docs a bit --- docs/upgrading/upgrading-your-package.md | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/docs/upgrading/upgrading-your-package.md b/docs/upgrading/upgrading-your-package.md index 55e40890c..a59b322d3 100644 --- a/docs/upgrading/upgrading-your-package.md +++ b/docs/upgrading/upgrading-your-package.md @@ -22,9 +22,7 @@ TODO: image of deprecations in DepCop ## Views -### The Old - -Previous to 1.0, views in packages were baked into Atom core. These views were based on jQuery and `space-pen`. They look something like this: +Previous to 1.0, views in packages were baked into Atom core. These views were based on jQuery and `space-pen`. They looked something like this: ```coffee {$, TextEditorView, View} = require 'atom' @@ -75,29 +73,32 @@ SelectListView `Workspace` and `WorkspaceView` are _no longer provided_ in any capacity. They should be unnecessary -#### jQuery +### Adding the module dependencies -If you do not need `space-pen`, you can require jQuery directly. In your `package.json` add this to the `dependencies` object: - -```js -"jquery": "^2" -``` - -#### NPM dependencies +To use the new views, you need to specify a couple modules in your package dependencies in your `package.json` file: ```js { "dependencies": { - "jquery": "^2" // if you want to include jquery directly "space-pen": "^3" "atom-space-pen-views": "^0" } } ``` -#### Converting your views +`space-pen` bundles jQuery. If you do not need `space-pen`, you can require jQuery directly. -Sometimes it should be as simple as converting the requires at the top of each view page. In the case of our above example, you can just convert them to the following: +```js +{ + "dependencies": { + "jquery": "^2" + } +} +``` + +### Converting your views + +Sometimes it is as simple as converting the requires at the top of each view page. In the case of our above example, you can just convert them to the following: ```coffee {$, View} = require 'space-pen'