- Copy or move a file called
src/mermaid-config-template.js
tosrc/mermaid-config.js
- Populate all constants therein.
To run the code in your development environment:
- Clone this repo
- Ensure you are running the most recent LTS version of node. The nvm version manager is recommended.
- Run
npm install
- Run
npm install -g bower
- Run
bower install
Now with all dependencies installed
- Start the development server
gulp local
- Point your browser to http://localhost:8888
To build minified version:
- Run
npm run prod
In Chrome, a hard refresh bypasses service workers as per the service worker spec. As such, if you hard refresh a page when offline, the page request will ignore service workers and make a network request.
Additionally, if the application is online, and a hard refresh occurs in any state of the app, the current page will bypass the service worker and will no longer be controlled by the service worker. If going offline immediately after an online hard refresh, the service worker will not control requests and network errors will occur when navigating.
Chrome Dev Tools allow for offline simulation. However, if visiting an offline page by checking "offline" in Chrome Dev Tools, there is an initial period where navigator.onLine will still return true. For true offline testing, it is best to test by disconnecting from your internet connection.