2016-03-13 07:27:32 +00:00
|
|
|
# Development
|
|
|
|
|
|
|
|
## Environment Setup
|
|
|
|
|
2017-11-14 13:05:01 +00:00
|
|
|
First, clone the project
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
```bash
|
2017-04-09 02:36:27 +00:00
|
|
|
git clone https://github.com/jiahaog/nativefier.git
|
|
|
|
cd nativefier
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
2017-11-14 13:05:01 +00:00
|
|
|
Install dependencies and build:
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
```bash
|
2017-11-14 13:05:01 +00:00
|
|
|
# macOS and Linux
|
2017-04-09 02:36:27 +00:00
|
|
|
npm run dev-up
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
# Windows
|
2017-11-14 13:05:01 +00:00
|
|
|
npm run dev-up-win
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
2017-11-14 13:05:01 +00:00
|
|
|
If dependencies are installed and you just want to re-build,
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
```bash
|
2017-04-09 02:36:27 +00:00
|
|
|
npm run build
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
2017-11-14 13:05:01 +00:00
|
|
|
You can set up a symbolic link so that running `nativefier` invokes your development version including your changes:
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
```bash
|
2017-04-09 02:36:27 +00:00
|
|
|
npm link
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
2017-11-14 13:05:01 +00:00
|
|
|
After doing so (and not forgetting to build with `npm run build`), you can run Nativefier with your test parameters:
|
2016-03-13 07:27:32 +00:00
|
|
|
|
|
|
|
```bash
|
2017-11-14 13:05:01 +00:00
|
|
|
nativefier <--your-awesome-new-flag>
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Or you can automatically watch the files for changes with:
|
|
|
|
|
|
|
|
```bash
|
2017-04-09 02:36:27 +00:00
|
|
|
npm run watch
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
|
|
|
```bash
|
2017-11-14 13:05:01 +00:00
|
|
|
# To run all tests (unit, end-to-end),
|
2017-04-09 02:36:27 +00:00
|
|
|
npm test
|
2017-11-14 13:05:01 +00:00
|
|
|
|
|
|
|
# To run only unit tests,
|
|
|
|
npm run jest
|
|
|
|
|
|
|
|
# To run only end-to-end tests,
|
|
|
|
npm run e2e
|
2016-03-13 07:27:32 +00:00
|
|
|
```
|