sourcey / spectacle

Beautiful static documentation generator for OpenAPI/Swagger 2.0
https://sourcey.com/spectacle
Other
1.28k stars 338 forks source link

New release including changes merged in #224 #225

Open jordanmaguire opened 3 years ago

jordanmaguire commented 3 years ago

224 has a lot of useful fixes in it.

Right now I can use it with yarn add 'spectacle-docs@https://github.com/sourcey/spectacle#3257da500b8a2483b6ad3356e50fe00b65bb6a6f'

Are there any plans to do a release?

matiasmelendi commented 3 years ago

A release of the latest changes would be super useful. I'm experiencing an issue with Cheerio that prevents me to generate docs and pulling the commit in the above comment solved it.

More details on the issue:

cjgordon commented 3 years ago

I'm experiencing this same scenario:

Full Error Message:


 Running "concat:foundation_css" (concat) task

 Running "sass:scss" (sass) task

 Running "concat:css" (concat) task

 Running "cssmin:minify" (cssmin) task
 >> 2 files created. 148.07 kB ? 117.88 kB

 Running "concat:js" (concat) task

 Running "uglify:js" (uglify) task
 >> 1 file created 6.8 kB ? 2.96 kB

 Running "clean:html" (clean) task
 >> 0 paths cleaned.

 Running "compile-handlebars:compile" (compile-handlebars) task

 Running "predentation" task

 Running "prettify:index" (prettify) task
 >> Destination not written because dest file was empty.
 All tasks complete
 "
 string(6156) "Task error: TypeError: cheerio is not a function
     at Object.markdown (/usr/lib/node_modules/spectacle-docs/app/lib/common.js:29:18)
     at Object.module.exports (/usr/lib/node_modules/spectacle-docs/app/helpers/md.js:14:21)
     at Object.wrapper (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)
     at eval (eval at createFunctionContext (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:9:137)
     at Object.prog [as fn] (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:268:12)
     at Object.<anonymous> (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js:29:22)
     at Object.wrapper (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js:15:19)
     at Object.eval [as main] (eval at createFunctionContext (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:19:47)
     at main (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:208:32)
     at Object.ret (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:212:12)
     at Object.ret [as swagger/operation] (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:519:21)
     at Object.invokePartialWrapper [as invokePartial] (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:88:46)
     at eval (eval at createFunctionContext (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:262:23), <anonymous>:8:31)
     at prog (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/runtime.js:268:12)
     at execIteration (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:51:19)
     at Object.<anonymous> (/usr/lib/node_modules/spectacle-docs/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js:61:13)
 Task error: Error: ENOENT: no such file or directory, open '/tmp/spectacle-1951VedPEJ5nq5ua/index.html'

Interestingly rolling back to 1.0.7 doesn't seen to resolve the issue. Will report back if I find a solution.

Edit: Updated to node 14. No improvement.

On digging around further I found that this only occurs on my latest docker image I use to build the project. The only change is:

FROM ubuntu:18.04 to FROM ubuntu:20.04

Rolling back to my previous image works with v1.1.0.

spectacle-docs@https://github.com/sourcey/spectacle#3257da500b8a2483b6ad3356e50fe00b65bb6a6f works on either.

KevinColemanInc commented 2 years ago

+1. Same issue on my m1 macbook. version is ^1.1.0 and node v14.15.0

regressing to the above commit fixes the issue for me.

{
  "name": "...",
  "version": "1.0.0",
  "description": "",
  "main": "",
  "scripts": {
    "gen": "spectacle -d swagger.yaml"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "cheerio": "^1.0.0-rc.10",
    "spectacle-docs": "git://github.com/sourcey/spectacle#3257da500b8a2483b6ad3356e50fe00b65bb6a6f"
  }
}
aeaston commented 2 years ago

Actually, without the updates to node-sass dependency, this is broken on recent versions of node, and Node 12 is about to EOL. If we could publish the latest version, that would be super helpful.