Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Commit

Permalink
Fix deprecated stylesheets & getUri
Browse files Browse the repository at this point in the history
Fix deprecated stylesheets & getUri. Updated dependencies
  • Loading branch information
oyarzun committed Apr 29, 2015
1 parent eaa2704 commit f916afb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
14 changes: 8 additions & 6 deletions lib/rst-preview-view.coffee
@@ -1,6 +1,7 @@
path = require 'path'
{Emitter, Disposable, CompositeDisposable} = require 'atom'
{$, $$$, ScrollView} = require 'atom-space-pen-views'
Grim = require 'grim'
_ = require 'underscore-plus'
{File} = require 'pathwatcher'
fs = require 'fs-plus'
Expand Down Expand Up @@ -48,11 +49,6 @@ class RstPreviewView extends ScrollView
onDidChangeRst: (callback) ->
@emitter.on 'did-change-rst', callback

on: (eventName) ->
if eventName is 'rst-preview:rst-changed'
Grim.deprecate("Use RstPreviewView::onDidChangeRst instead of the 'rst-preview:rst-changed' jQuery event")
super

subscribeToFilePath: (filePath) ->
@file = new File(filePath)
@emitter.emit 'did-change-title'
Expand Down Expand Up @@ -153,7 +149,7 @@ class RstPreviewView extends ScrollView
else
"Rst Preview"

getUri: ->
getURI: ->
if @file?
"rst-preview://#{@getPath()}"
else
Expand Down Expand Up @@ -244,3 +240,9 @@ class RstPreviewView extends ScrollView
codeBlock.append(EditorView.buildLineHtml({ tokens, text }))

html

if Grim.includeDeprecatedAPIs
RstPreviewView::on = (eventName) ->
if eventName is 'rst-preview:rst-changed'
Grim.deprecate("Use RstPreviewView::onDidChangeMarkdown instead of the 'rst-preview:rst-changed' jQuery event")
super
9 changes: 3 additions & 6 deletions package.json
@@ -1,23 +1,20 @@
{
"name": "rst-preview",
"version": "1.2.1",
"version": "1.2.2",
"main": "./lib/rst-preview",
"description": "Open a rendered version of the ReStructuredText in the current editor with `ctrl-shift-r`.",
"repository": "https://github.com/lsegal/atom-rst-preview",
"license": "MIT",
"engines": {
"atom": "*"
},
"activationEvents": [
"rst-preview:toggle"
],
"dependencies": {
"atom-space-pen-views": "^2.0.0",
"cheerio": "0.15.0",
"fs-plus": "^2.0.0",
"grim": "^1.0.0",
"grim": "^1.2.0",
"highlights": "^1.0.0",
"pathwatcher": "^3.0",
"pathwatcher": "^4.3",
"roaster": "^1.1.2",
"temp": "^0.8.1",
"underscore-plus": "^1.0.0",
Expand Down
File renamed without changes.

0 comments on commit f916afb

Please sign in to comment.