Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

rdd

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdd - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

test/index.js

4

bin/usage.txt

@@ -9,3 +9,5 @@ Usage: rdd [file] [options]

-o, --open BROWSER Open the rendered Markdown file in the specified browser.
-p, --port PORT Set the port to serve the rendered file. Default: 8888.
Uses your default browser if not specified.
-p, --port PORT Set the port to serve the rendered file. Serves on port
8888 if not specified.
-h, --help Print this message.
{
"name": "rdd",
"version": "0.0.2",
"description": "Preview your `README.md` locally as it would appear on Github, with changes reflected on-the-fly. Great for Readme Driven Development.",
"version": "0.1.0",
"description": "Preview your `README.md` locally as it would appear on Github, with changes reflected on-the-fly. Useful for Readme Driven Development.",
"author": "Lim Yuan Qing",

@@ -24,3 +24,6 @@ "license": "MIT",

"browserify": "^10.2.1",
"istanbul": "^0.3.14",
"jshint": "^2.7.0",
"nightmare": "^1.8.1",
"tape": "^4.0.0",
"uglify-js": "^2.4.23"

@@ -35,3 +38,4 @@ },

"bundle": "browserify client.js | uglifyjs --output bundle.js",
"build": "npm run lint && npm run bundle"
"test": "npm run bundle && rm -rf coverage && istanbul cover -- tape test/*.js --verbose",
"build": "npm run lint && npm test"
},

@@ -38,0 +42,0 @@ "keywords": [

# rdd.js [![npm Version](http://img.shields.io/npm/v/rdd.svg?style=flat)](https://www.npmjs.org/package/rdd) [![Build Status](https://img.shields.io/travis/yuanqing/rdd.svg?style=flat)](https://travis-ci.org/yuanqing/rdd)
> Preview your `README.md` locally as it would appear on Github, with changes reflected on-the-fly. Great for [Readme Driven Development](http://tom.preston-werner.com/2010/08/23/readme-driven-development.html).
> Preview your `README.md` locally as it would appear on Github, with changes reflected on-the-fly. Useful for [Readme Driven Development](http://tom.preston-werner.com/2010/08/23/readme-driven-development.html).

@@ -17,3 +17,3 @@ ## Quick start

Here we’re using the `-o` flag to open our rendered page in the browser. The page will be updated automatically when we change `README.md`.
Here we’re using the `-o` flag to open the rendered page in our default web browser. The page will be updated automatically when we change `README.md`.

@@ -31,3 +31,5 @@ ## Usage

-o, --open BROWSER Open the rendered Markdown file in the specified browser.
-p, --port PORT Set the port to serve the rendered file. Default: 8888.
Uses your default browser if not specified.
-p, --port PORT Set the port to serve the rendered file. Serves on port
8888 if not specified.
-h, --help Print this message.

@@ -34,0 +36,0 @@ ```

@@ -5,7 +5,7 @@ 'use strict';

var fs = require('fs');
var gaze = require('gaze');
var Gaze = require('gaze');
var hljs = require('highlight.js');
var http = require('http');
var Remarkable = require('remarkable');
var shoe = require('shoe');
var hljs = require('highlight.js');

@@ -33,21 +33,28 @@ var md = new Remarkable('full', {

var watcher;
var watch = function(stream) {
var gaze = new Gaze(file);
gaze.on('changed', function() {
render(file, stream);
});
gaze.on('deleted', function() {
close();
cb(file + ': No such file');
});
return gaze;
};
var close = function() {
server.close();
watcher.close();
};
var sock = shoe(function(stream) {
render(file, stream);
gaze(file, function(err, watcher) {
if (err) {
return cb(err);
}
watcher.on('changed', function() {
render(file, stream);
});
watcher.on('deleted', function() {
server.close();
watcher.close();
cb(file + ': No such file');
});
});
watcher = watch(stream);
});
sock.install(server, '/rdd');
return server;
return close;

@@ -54,0 +61,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc