A few suggestions for changes to our default package.json for new plugin packages (as outlined in this repo's README).
version: The default from npm init is 1.0.0. I could be wrong, but I think we want to set the major version to 0 to start with and then use changesets to increment the version when it becomes stable/publishable. If we start with v1 then when we do the first 'major' release via changesets, it will increment to 2.
author: This isn't crucial, but I think we should list the initial author for each of our packages (even though packages will likely have multiple contributors over time). This should be one person, and can just be a name or can also include a URL (github profile?) and/or email.
main: According to the docs, this defaults to "index.js" in the root directory, which doesn't exist in our case, so we should change it to one of the index files in the dist directory (e.g. "dist/index.js").
repository: We should specify our git repo and the specific directory for the package (since the package.json file isn't in the root directory).
devDependencies: We might want to move the "@jspsych/config" dependency from "dependencies" into "devDependencies", since I think it is only needed when using the package via "npm install".
peerDependencies: We could use this to signal compatibility with core jsPsych versions and/or with the lookit-jspsychinit package (which itself tracks compatibility with core jsPsych versions).
bugs: This is another non-crucial field, but the docs say it can be useful for contributors and is used by the npm bugs command.
homepage: We don't have the lookit-jspsych docs set up yet, but when we do we should link to them here.
A few suggestions for changes to our default
package.json
for new plugin packages (as outlined in this repo's README).npm init
is 1.0.0. I could be wrong, but I think we want to set the major version to 0 to start with and then use changesets to increment the version when it becomes stable/publishable. If we start with v1 then when we do the first 'major' release via changesets, it will increment to 2.dist
directory (e.g."dist/index.js"
).npm bugs
command.See here for an example
package.json
file for a jsPsych plugin package: https://github.com/jspsych/jsPsych/blob/main/packages/plugin-audio-button-response/package.jsonAnd here's an example of a new lookit-jspsych plugin showing my proposed changes: