Code Monkey home page Code Monkey logo

derny's Introduction

derny

Use markdown to communicate multi-file situations to other people without shuffling around zip files

Installation

$ npm install --global derny

Usage

$ derny list

$ derny list --interactive

$ derny load https://www.github.com/RyanCavanaugh/derny/issues/51438

Example


## File Listing From (abcd)

* 


derny's People

Contributors

ryancavanaugh avatar

Watchers

 avatar

derny's Issues

Sample

Let's talk about what an example might look like!

๐Ÿ—Ž lib/tests.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const github_renderer_1 = require("./github-renderer");
const files = [
    { fileName: "foo/bar.txt", content: "What a nice\rDay\r\n for a visit!" },
    { fileName: "miscc", content: "" },
    { fileName: "miscc2/blah", content: "This is a great utiltity, wouldn`t you say?" },
];
function sanity() {
    const s = github_renderer_1.default.renderFiles(files, { wrap: true });
    const f = github_renderer_1.default.parse(s);
    if (f === undefined)
        throw new Error("Failed to parse self");
    if (f.length !== files.length) {
        throw new Error(`File length was wrong - got ${f.length}, expected ${files.length}`);
    }
    for (let i = 0; i < f.length; i++) {
        if (f[i].content !== files[i].content) {
            throw new Error(`Expected "${f[i].content}" to be ${files[i].content}"`);
        }
        if (f[i].fileName !== files[i].fileName) {
            throw new Error(`Expected "${f[i].fileName}" to be ${files[i].fileName}"`);
        }
    }
    console.log("Sanity check passed");
}
sanity();

๐Ÿ—Ž package.json

{
  "name": "derny",
  "version": "1.0.0",
  "description": "Read and write multiple files in markdown",
  "main": "lib/index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "prepublishOnly": "tsc"
  },
  "bin": {
    "derny": "lib/index.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/RyanCavanaugh/derny.git"
  },
  "keywords": [
    "markdown"
  ],
  "author": "Ryan Cavanaugh <[email protected]>",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/RyanCavanaugh/derny/issues"
  },
  "homepage": "https://github.com/RyanCavanaugh/derny#readme",
  "dependencies": {
    "@octokit/rest": "^15.9.4",
    "commander": "^2.16.0",
    "fs-extra": "^6.0.1",
    "glob": "^7.1.2",
    "lodash": "^4.17.10"
  },
  "devDependencies": {
    "@types/fs-extra": "^5.0.4",
    "@types/glob": "^5.0.35",
    "@types/lodash": "^4.14.111",
    "@types/node": "^10.5.2",
    "typescript": "^3.0.0-dev.20180707"
  }
}

Then some more chatter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.