/docs/dev_setup.md

https://github.com/WuTheFWasThat/vimflowy · Markdown · 84 lines · 48 code · 36 blank · 0 comment · 0 complexity · 67a1728b6c4275c512ce0341091f369e MD5 · raw file

  1. ## DEVELOPMENT SETUP
  2. For development, you'll want to run vimflowy locally.
  3. My aim is for setup to be painless, so let me know if anything goes awry.
  4. ### Installation
  5. With recent versions of node (6.x) and npm:
  6. git clone https://github.com/WuTheFWasThat/vimflowy.git
  7. cd vimflowy
  8. npm install
  9. ### Run
  10. Simply run:
  11. npm start
  12. After a short wait, you should see the app at `http://localhost:3000/`
  13. When source code changes, assets should be automatically (incrementally) recompiled.
  14. To use a different port, you can do
  15. npm start -- --port 2002
  16. For a full set of options, see
  17. npm start -- --help
  18. Note that you may make new documents simply by visiting
  19. `http://localhost:3000?doc=<documentname>#`
  20. NOTE: You may notice that the development version is a bit slow.
  21. If you're looking to run vimflowy for personal usage (not development), you'll want to compile the assets in production mode:
  22. npm run build
  23. npm run startprod
  24. Notably, you can run a SQLite backend, for persistence to your server.
  25. [See here for more info](docs/storage/SQLite.md).
  26. ### Tests
  27. To run unit tests automatically (when files change) from the development server, add the `test` flag:
  28. npm start -- --test
  29. To run a separate continuous process that monitors and runs tests when files change:
  30. npm run watchtest
  31. To run unit tests manually once (and get a more detailed report):
  32. npm test
  33. #### Typechecking
  34. To manually run typescript checking:
  35. npm run typecheck
  36. #### Linting
  37. To manually lint the project:
  38. npm run lint
  39. ### Profiling
  40. For profiling, you should use browser profiling when possible.
  41. However, though the results will be less realistic, you can also profile unit tests. Something like:
  42. mocha --prof --opts test/mocha.opts
  43. node-tick-processor *-v8.log > processed_log
  44. less processed_log
  45. ## Guidelines to contributing
  46. Just send a pull request. Remember to write tests when appropriate!
  47. For any questions, don't hesitate to submit an issue or contact me at [githubusername]@gmail.com. Let me know especially if you plan on adding new features! I'm happy to chat about design, give pointers for where to start reading code, etc.
  48. I've marked a number of github issues with the label `small_task`, which could be good places to start.