AdobeXD/plugin-docs

Offline Docs Building

Opened this issue · 8 comments

Hi,
Provide a method to build offline docs from this repo on local PC
as some people don't have internet connectivity to PC all the time
they unable to view the docs for reference
So provide instructions to build the docs the can be open from browser with out connectivity

Good idea. Building the docs is easy:

npm install
npm run book:install
npm run book:build

Then use a web server to open _book. I use http-server:

http-server _book

C:\Users\PramUkesh Venky\Documents\plugin-docs-master>npm run book:build

plugins@1.0.0 book:build C:\Users\PramUkesh Venky\Documents\plugin-docs-master
gitbook --timing --log=debug --debug build . $@

debug: 0.9% of time spent in "parse.book" (1 times) :
debug: > Total: 47ms | Average: 47ms
debug: > Min: 47ms | Max: 47ms
debug: ---------------------------
debug: 5.45s spent in non-mesured sections

Error: ENOENT: no such file or directory, scandir 'C:\Users\PramUkesh Venky\Documents\plugin-docs-master$@'
Error: ENOENT: no such file or directory, scandir 'C:\Users\PramUkesh Venky\Documents\plugin-docs-master$@'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plugins@1.0.0 book:build: gitbook --timing --log=debug --debug build . $@
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plugins@1.0.0 book:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\PramUkesh Venky\AppData\Roaming\npm-cache_logs\2018-10-21T14_40_03_604Z-debug.log

Executing
gitbook build
results in success
Why above error occurs ?
Do you have any idea

Executing
gitbook build
results in success
Why above error occurs ?
Do you have any idea

@PramUkesh are you still running into the issue mentioned above?

@dkstevekwak Yes It still gives error

C:\Users\PramUkesh\Documents\plugin-docs-master>npm run book:install

> plugins@1.0.0 book:install C:\Users\PramUkesh\Documents\plugin-docs-master
> gitbook install . $@

Error loading version latest: Error: Cannot find module 'npm'
    at throwNotFoundError (C:\Users\PramUkesh\.gitbook\versions\3.2.3\node_modules\global-npm\index.js:11:13)
    at C:\Users\PramUkesh\.gitbook\versions\3.2.3\node_modules\global-npm\index.js:39:5
    at Object.<anonymous> (C:\Users\PramUkesh\.gitbook\versions\3.2.3\node_modules\global-npm\index.js:41:3)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)

TypeError: Cannot read property 'commands' of null
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! plugins@1.0.0 book:install: `gitbook install . $@`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the plugins@1.0.0 book:install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\PramUkesh\AppData\Roaming\npm-cache\_logs\2018-11-27T12_09_34_356Z-debug.log

@PramUkesh Do you have npm installed on your machine? What does npm --version say?