This example shows how to use viewport-uploader with webpack.
~/.vpconfig.json
yet see the section Create Environment Config and make sure it contains at least a DEV Confluence environment.
This example contains a basic theme setup, including a page.vm
for the templating, styles and scripts to edit functionality and appearance of your theme and a webpack configuration to bundle and upload the code.
git clone git@github.com:K15t/viewport-uploader.git
cd example/basic
yarn install
Start development mode with automatic rebuilds. Once the webpack build has finished the theme will be uploaded to the specified Confluence environment.
VPRT_ENV=DEV yarn watch
Build and upload a development build (eg contains source maps) to your Confluence instance.
VPRT_ENV=DEV yarn upload:dev
Specify a PROD environment in your ~/.vpconfig.json
first.
VPRT_ENV=PROD yarn upload:prod
The configuration for the upload can be found in the webpack.config.js
. For further information on how the upload works see the Viewport Uploader API Documentation.