swagger-routes icon indicating copy to clipboard operation
swagger-routes copied to clipboard

Split apiSpecs into separate module

Open james-skinner-deltatre opened this issue 3 years ago • 0 comments

At the moment the src/apiSpecs file is intended for testing only, yet it accounts for almost all of the dependencies of this module.

The upshot is we are pulling in modules like expect which has a shed load of its own dependencies into our production builds.

Ideally we could split the apiSpecs out somehow so this is not the case. Cant think of a really elegant solution but some ideas:

  1. Set the dependencies only needed for this file as optionalDependencies - then consumers can chose not to install. Don't really like this one as I don't know how other modules would use optional dependencies
  2. Move apiSpecs into a subdirectory with its own package.json - then somehow just do a local install on this dir if needed
  3. Move apiSpecs into a totally separate repo - bit of a hassle

james-skinner-deltatre avatar Jan 25 '22 11:01 james-skinner-deltatre