Small world! I'm currently building a stand alone webpage that uses cytoscape.js to display shiny reactivity dependencies. Cytoscape.js is a very smooth network library!
src folder. I store the output bundle in the ./inst folder to be able to be found as an external file in the R package bundle (
I have many scripts that I have found to be useful inside my ./package.json file. This allows me to type
yarn watch or
yarn lint-all without having to populate my
$PATH for a local project. For more complicated scripts, I've made executable files in the ./bin folder. I have the package.json field
"private": true, as there is no intention of releasing it as a yarn/npm package.
Given that all dependencies are in the package.json (paired with a yarn.lock file), anyone who downloads the repo and calls
yarn install in the base folder will be able to
yarn build the javascirpt bundle or
yarn watch for changes during development.
Always commit linted code:
Sometimes extra libraries do not have a local package.json file. To keep these non-standard dependencies, the napa package can be used to install git repos using a commitish tag. leaflet.extras does this with three packages. I used full commit tags rather than the branch name only to enforce explicit version control. You can install an unpublished, standard package (such as a fork with extra changes) using a github commitish tag instead of a version in the dependency. leaflet.extras does this with seven packages.
import $ from "jquery", but to explicitly import the jquery.slim.js file in the ./dist folder of jquery,
import $ from "jquery/dist/jquery.slim".
Down the road, I imagine that shinyreactlog could be an htmlwidget. If so, the bundled code could be placed in the (standard practice) folder of
Inside your ui.R file, include the bundle file with:
I have briefly touched on MANY difficult topics. If you would like more information on any of them, I'd be happy to expand on any of them!
Please let me know if you have any more questions!