Consider separating pubsweet into pubsweet-generator and pubsweet-scripts
This is following the example of create-react-app, which is installed globally and generates an app when run on the command line.
The app generated by
create-react-app contains just one dev dependency (
react-scripts) and several npm scripts which each invoke
react-scripts to perform a certain function (
start = start the web server,
test = run tests,
build = compile the app for production). The
react-scripts package.json also contains all the dev dependencies needed for serving/testing/compiling, such as eslint, babel, etc.
pubsweet was separated in this way, users could update the global generator (named
pubsweet-cli, perhaps, or
pubsweet-generator, possibly using Yeoman if appropriate), while keeping a specific version of the app-specific dependency (named
pubsweet-scripts, say) installed locally.
Instead of calling
pubsweet run to start the app, user would call
npm run(which would call
pubsweet-scripts run. using the version of
pubsweet-scripts inside the app's dependencies).