Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Support debug builds; build refactoring #279

Merged
merged 11 commits into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,9 @@ You can build and run the current code locally as follows.

2. Ensure you have all the required build tools with `npm install` (you will need [Node.js](https://nodejs.org/)).

3. Run the build script to build one or all of the extensions:
3. Run the tests and build script to create versions of the extension for all browsers with `npm run build:all`.

- `npm run build:firefox`
- `npm run build:chrome`
- `npm run build:opera`
- `npm run build:all`

The built versions of the extension are placed in the `build/<browser>/` directories and ZIP files for each will be created in the root of the checked-out repository.
The built versions of the extension are placed in `build/<browser>/` directories and ZIP files for each will be created in the root of the checked-out repository.

4. To load and use the extension locally in your browser...
- **Firefox:** either:
Expand All @@ -132,13 +127,13 @@ Some further info on the test/build process:

- Automated tests are run as a pre-requisite part of the build process; you can also run them with `npm test`.

- You can remove the `build/<browser>/` directories and ZIP files with `npm run clean:<browser>` and `npm run clean:all`, as with the build scripts above.
- You can remove the `build/<browser>/` directories and ZIP files for all browsers with `npm run clean:builds`.

- Because the process of rasterising the SVG to variously-sized PNGs is slow, the PNGs are cached so they only need to be re-generated when the SVG changes. You can clean out the cache with `npm run clean:cache`.
- Because the process of rasterising the SVG to variously-sized PNGs is slow, the PNGs are cached so they only need to be re-generated when the SVG changes. They are cached in the `build/png-cache/` directory.

- The `pre-commit` hook is used to ensure only code that passes tests is committed (it does this by running a build, which, in turn, runs the tests). [Husky](https://github.com/typicode/husky) manages this so that a build is run before you are asked for a commit message.

- The `build:chrome:test` script is provided for making an alpha/beta/test build for Chrome, which is the same as a normal build, but the extension is retitled to "Landmarks (test version)". A separate extension listing is required for publishing test versions in the Chrome Web Store. For Firefox Add-ons, a version number such as "2.1.0beta1" can be used and the built package can be uploaded to the extension's beta channel.
- For advanced use, you can run the build script directly (which bypasses the tests, beware) with `node scripts/build.js --help`.

### Test pages

Expand Down
Loading