Skip to content

Commit

Permalink
Merge pull request #129 from rpkamp/typescript
Browse files Browse the repository at this point in the history
Overhaul to 5.0
  • Loading branch information
rpkamp authored Jul 14, 2019
2 parents d0ed219 + 6984ca3 commit 9cb51d7
Show file tree
Hide file tree
Showing 80 changed files with 4,846 additions and 5,781 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
steps:
- prepare
- run:
name: Build
command: make build-dev
name: Test
command: make test

build:
executor: node
Expand Down
11 changes: 0 additions & 11 deletions .eslintrc.js

This file was deleted.

15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ONESKY_PROJECT_ID=60763

help: ## Show help
@echo
@echo "Usage: make [target]"
Expand All @@ -19,4 +21,15 @@ build: ## Build and package as mbt.zip for Chrome Web Store
rm -f dist/webpack-manifest.json dist/entrypoints.json dist/tests.js
(cd dist/ && zip -r ../mbt.zip *)

.PHONY: install build-dev build
test:
node_modules/.bin/jest --config=./jest.config.js

translations-download:
bash scripts/translations-download.sh ${ONESKY_PROJECT_ID} nl messages.json src/_locales/nl/messages.json
bash scripts/translations-download.sh ${ONESKY_PROJECT_ID} de messages.json src/_locales/de/messages.json
bash scripts/translations-download.sh ${ONESKY_PROJECT_ID} en messages.json src/_locales/en/messages.json

translations-upload:
bash scripts/translations-upload.sh ${ONESKY_PROJECT_ID} en src/_locales/en/messages.json

.PHONY: install build-dev build test translations-download translations-upload
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,12 @@ tick "Developer mode" and click "Load unpacked extension...". In the file window
If you want to build for production mode and pack it up into a zip file run `make build` instead.

## Running tests locally
To run the tests locally, first run
To run the tests locally, run

```bash
make build-dev
```

and then point your browser to

```bash
file:///path/to/minimal-bookmarks-tree/tests/index.html
make test
```

The tests will run on that webpage.

## Translations

Translations for minimal bookmarks tree are managed using [OneSky][oneskyapp]. Please feel free to suggest alternate translations and/or languages!
Expand Down
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
"roots": [
"<rootDir>/src",
"<rootDir>/tests",
"<rootDir>/node_modules/@types"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
};
Loading

0 comments on commit 9cb51d7

Please sign in to comment.