diff --git a/package.json b/package.json index 1c49e4d5..2daed783 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "scripts": { "build": "webpack", "clean": "rm -rf build", - "test": "npm run build" + "test": "npm run build", + "update-buildsystem": "rm -rf src/node_modules; npm run clean" }, "author": "Colin Caine" } diff --git a/readme.md b/readme.md index 2e7845b8..0796d6ec 100644 --- a/readme.md +++ b/readme.md @@ -8,13 +8,32 @@ Replace ff's default control mechanism with one modelled on the one true editor, ``` git clone https://github.com/cmcaine/tridactyl.git -cd tridactyl/src +cd tridactyl npm install -./make +npm run build # or add the `npm bin` to your path and just run webpack directly ``` Addon is built in tridactyl/build. Load it as a temporary addon in firefox with `about:debugging` or the `web-ext` CLI (`web-ext run -s build --firefox path/to/nightly/firefox`). The addon may work in older versions of Firefox, but it's targetting Firefox 57+. +If you're updating from the older buildsystem, run this as well: + +``` +npm run update-buildsystem +``` + +### Development loop + +``` +npm run build -- -w & +web-ext run -s build --firefox path/to/nightly/firefox +``` + +This will compile and deploy your files each time you save them. + +### Committing + +A pre-commit hook is added by `npm install` that simply runs `npm test`. If you know that your commit doesn't break the tests you can commit with `git commit -n` to ignore the hooks. If you're making a PR, travis will check your build anyway. + ### Documentation Ask in `#tridactyl` on [matrix.org](https://riot.im/app/#/room/#tridactyl:matrix.org), freenode, or [gitter](https://gitter.im/tridactyl/Lobby). diff --git a/src/make b/src/make deleted file mode 100755 index e79a8d7e..00000000 --- a/src/make +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Stop on error. -set -e - -target=../build -rm -rf $target/* -mkdir -p $target - -# Links manifest.json into build dir -ln -sr manifest.json $target - -# Web-accessible resources must be copied rather than linked. -cp -r static $target - -# See tsconfig.json. Pass '-w' to watch for changes. -PATH=node_modules/.bin:"$PATH" -tsc "$@" diff --git a/src/package.json b/src/package.json deleted file mode 100644 index 0946fd81..00000000 --- a/src/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "tridactyl", - "version": "0.1.0", - "description": "Vimperator/Pentadactyl successor", - "dependencies": {}, - "devDependencies": { - "web-ext-types": "0.3.1" - }, - "scripts": { - "test": "./make" - }, - "author": "Colin Caine" -}