Remove old build system, document new

This commit is contained in:
Colin Caine 2017-10-02 10:02:15 +01:00
parent 26a8dd7273
commit 9c445a9c9d
4 changed files with 23 additions and 34 deletions

View file

@ -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"
}

View file

@ -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).

View file

@ -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 "$@"

View file

@ -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"
}