The inline docs examples are built using Webpack: each index.jsx file inside a folder within the examples directory in the document root will be compiled into JS and HTML files (bearing the same name as that folder) within the docs-src/examples directory.
These generated files are excluded from the repository, but they will be created every time grunt docs is executed; to run Jekyll without rebuilding examples, use grunt jekyll directly.
To enable better development convenience when authoring new inline examples, the npm run docs-dev task is provided; this uses parallelshell to run Jekyll's watcher in parallel with the examples webpack build in watch-mode, so that any code changes to examples/ get automatically compiled into docs-src/examples/, and finally rendered into the generated docs/ folder.
Many thanks to @mzgoddard for helping me resolve confusion around this build configuration!
Closes #92
The inline docs examples are built using Webpack: each
index.jsx
file inside a folder within theexamples
directory in the document root will be compiled into JS and HTML files (bearing the same name as that folder) within thedocs-src/examples
directory.These generated files are excluded from the repository, but they will be created every time
grunt docs
is executed; to run Jekyll without rebuilding examples, usegrunt jekyll
directly.To enable better development convenience when authoring new inline examples, the
npm run docs-dev
task is provided; this uses parallelshell to run Jekyll's watcher in parallel with the examples webpack build in watch-mode, so that any code changes toexamples/
get automatically compiled intodocs-src/examples/
, and finally rendered into the generateddocs/
folder.Many thanks to @mzgoddard for helping me resolve confusion around this build configuration!