update dev notes

This commit is contained in:
Anton Lavrenov
2019-01-19 10:13:03 -05:00
parent 366abc0a79
commit e0f2e99320

View File

@@ -133,31 +133,25 @@ See file `resources/nodejs-demo.js` for example.
See [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md). See [CHANGELOG.md](https://github.com/konvajs/konva/blob/master/CHANGELOG.md).
# Dev environment
Before doing all dev stuff make sure you have node installed. After that, run `npm install` in the main directory to install the node module dependencies.
Run `gulp -T` to see all build options.
## Building the Konva Framework ## Building the Konva Framework
To build a development version of the framework, run `gulp dev-build`. To run a full build, which also produces the minified version run `gulp build`. To make a full build run `npm run build`. The command will compile all typescript files, combine then into one bundle and run minifier.
If you add a file in the src directory, be sure to add the filename to the sourceFiles array variable in `gulpfile.js`.
## Testing ## Testing
Konva uses Mocha for testing. Konva uses Mocha for testing.
* If you need run test only one time run `gulp test`. * If you need run test only one time run `npm run test`.
* While developing it is easy to use `gulp` default task with watch. Just run it and go to [http://localhost:8080/test/runner.html](http://localhost:8080/test/runner.html). After src file change konva-dev.js will be automatically created, so you just need refresh test the page. * While developing it is easy to use `npm start`. Just run it and go to [http://localhost:8080/test/runner.html](http://localhost:8080/test/runner.html). If you need changed typescript sources you have to run `npm run build`.
TODO: add watcher for typescript changes.
Konva is covered with hundreds of tests and well over a thousand assertions. Konva is covered with hundreds of tests and well over a thousand assertions.
Konva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test. Konva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test.
## Generate documentation ## Generate documentation
Run `gulp api` which will build the documentation files and place them in the `api` folder. Run `npx gulp api` which will build the documentation files and place them in the `api` folder.
# Pull Requests # Pull Requests