You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_SETUP.md 1.4KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Setup
  2. At webpack we use `yarn` to execute commands.
  3. If you already have `yarn` installed, do: `yarn setup`. This will complete all required steps.
  4. If not, do: `npm run setup`, the setup will also install `yarn` for you.
  5. That's all.
  6. ## Setup manually
  7. ### Setup your local webpack repository
  8. ```bash
  9. git clone https://github.com/webpack/webpack.git
  10. cd webpack
  11. npm install -g yarn
  12. yarn
  13. yarn link
  14. yarn link webpack
  15. ```
  16. ### To run the entire test suite use
  17. ```bash
  18. yarn test
  19. ```
  20. ### To run only integration tests use
  21. ```bash
  22. yarn test:integration
  23. ```
  24. or in watch mode
  25. ```bash
  26. yarn test:integration --watch
  27. ```
  28. ### To run only unit tests use
  29. ```bash
  30. yarn test:unit
  31. ```
  32. or in watch mode
  33. ```bash
  34. yarn test:unit --watch
  35. ```
  36. ### To update Jest snapshots use
  37. ```bash
  38. yarn test:update-snapshots
  39. ```
  40. ### To run code formatter (prettier) run
  41. ```bash
  42. yarn pretty
  43. ```
  44. ### To run all linters use
  45. This performs linting on:
  46. * eslint (code-lint script)
  47. * schema + dependencies (jest-lint script)
  48. * types (type-lint script)
  49. * format + generated files (special-lint script)
  50. ```bash
  51. yarn lint
  52. ```
  53. ### To run only the typechecker use
  54. ```bash
  55. yarn type-lint
  56. ```
  57. or incremental (in watch mode)
  58. ```bash
  59. yarn type-lint --watch
  60. ```
  61. ### To update all examples use
  62. ```bash
  63. yarn build:examples
  64. ```
  65. ### To update a specific example use
  66. ```bash
  67. cd examples/<path to example>
  68. node build.js
  69. ```