WebClipper
Setup
https://nodejs.org/en/download/
1. Install npm --(Note: on windows, you also need to add "%appdata%\npm" to your PATH)
2. Install the WebClipper packages
From the root of this project, run:
$ npm install
3. Build and Test
The default command to build and test:
$ npm run build
or
$ npm run build -- --<arg>
- Compiles LESS and TypeScript into /build
- Bundles the JavaScript modules together into /build/bundles
- Exports all the needed files to /target
4. Running in chrome
- In chrome, open chrome://extensions/
- Enable developer mode (upper right toggle)
- Click on "load unpacked" and select the target/chrome folder
- On subsequent builds, you don't have to go through this flow again. Simply refreshing the page should update the add-in
4. Running in edge
- In edge, go to about://flags
- Enable developer mode
- Restart edge
- Click on top right "...", then Extensions
- Click on load extension and select the target\edge\OneNoteWebClipper\edgeextension\manifest\extension
- On subsequent builds, you need to go through steps (4) and (5) again
5. Looking at console output
Set the "enable_console_logging" local storage entry to true
Congratulations!
At this point you should see the tests passing, and see the packaged code in the target
folder
Other useful commands
Clean
$ npm run clean
Removes all of the generated files from build