trustroots icon indicating copy to clipboard operation
trustroots copied to clipboard

Put gulp in fire

Open nicksellen opened this issue 4 years ago • 0 comments

From https://github.com/Trustroots/trustroots/issues/791

The idea is to remove gulp. It doesn't really need replacing with anything either, as mostly the build/test tools we use have their own standalone versions, and the scripts in package.json are mostly sufficient to run them.

A lot of stuff is done via gulp:

  • for dev
    • configure environment
    • run main server with nodemon
    • run worker (aka agenda) with nodemon
    • build less/css
    • build angular templates
    • build fontella font(s)
    • run webpack for main code
    • run webpack for service worker code
    • run tests
    • watch file changes for most of the above to re-run commands on change
  • for prod
    • build assets
    • run server
    • run worker

A general idea for post-gulp world:

  • rely more on build/test tools for file watching (webpack, jest - depending on https://github.com/Trustroots/trustroots/pull/1147, mocha), as they can do it more fine grained than the current manual configuration approach
  • move as much into webpack (+ dev server with hot reloading and nice overlay errors) as possible (less/css, fonts, angular templates, frontend linting)
  • not so sure about the server, linting as part of server running? not sure that's normally done, maybe keep to standalone server linting script (esw or similar), let's see...

That kind of thing anyway...

Related issues

  • [ ] Simplify gulp by removing separate prod/dev scripts #854
  • [ ] Update Mocha #712
  • [ ] Test framework deps #778
  • [x] Add Prettier - an opinionated code formatter #932
  • [x] Refactor eslint out from Gulpfile #990 (already merged, but related/relevant)

nicksellen avatar Dec 13 '19 14:12 nicksellen