- Clone this project with
git clone --recursive https://github.com/thomaswp/sef-logging.git
- Note the
--recursive
flag: it is necessarily to clone submodules. If you forget you can usegit submodule update --init --recursive
after cloning. - This will take a moment, as it needs to clone Snap as well.
- Note the
- Install Node.js. If you already have Node.js install, make sure it and npm are up to date (since older versions of npm may cause issues).
- Install dependencies:
npm install
- Create an sef-config file in
sef\snap\libraries\
based onsef-config.example.js
pointing to "../../build/logging.js". This allows snap to find the extension that you are developing, which is currently bundled inbuild/logging/js
.
- Run
npm run dev
: This runs webpack on both this repo and on SEF (in case you need to make updates to SEF). - Run a webhost and go to
sef\snap
. Snap should now show logging in the console.
- The
sef/snap
folder should be a stand-alone, deployable, client-only webpage that can be hosted on any web server. - If using only the
snap
folder, you should copybuild/your-module.js
to thesnap/libraries
folder and updatesnap/libraries/sef-config.js
to point to that library (instead of the build directory in the root folder).