Skip to content

esdoc breaks if no README.md present #432

@22a

Description

@22a

The latest release, v1.0.0-alpha.3, breaks if README.md is not present. Surely esdoc should not be dependent on a project having a readme and naming it README.md.

Input data for reproducing

Installation

yarn add [email protected] esdoc-standard-plugin --dev

Configuration

{
  "source": "./lib",
  "destination": "./esdoc",
  "plugins": [{
    "name": "esdoc-standard-plugin"
  }]
}

Usage

./node_modules/.bin/esdoc

Exception output

Log

// write into here
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open './README.md'
    at Error (native)
    at Object.fs.openSync (fs.js:640:18)
    at Object.fs.readFileSync (fs.js:508:33)
    at Function._generateForIndex (/Users/peter/<<PATH>>/<<REPO_NAME>>/node_modules/esdoc/out/src/ESDoc.js:325:44)
    at Function.generate (/Users/peter/<<PATH>>/<<REPO_NAME>>/node_modules/esdoc/out/src/ESDoc.js:130:25)
    at ESDocCLI.exec (/Users/peter/<<PATH>>/<<REPO_NAME>>/node_modules/esdoc/out/src/ESDocCLI.js:71:23)
    at Object.<anonymous> (/Users/peter/<<PATH>>/<<REPO_NAME>>/node_modules/esdoc/out/src/ESDocCLI.js:182:7)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)

Temporary Fix

touch README.md

Your environment

  • OS type and version: macOS v 10.12.5
  • Node.js version: 6.10.0
  • ESDoc version: v1.0.0-alpha.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions