Code mostly stolen from create-vite
Inspired by https://github.com/bjoluc/jspsych-builder, except this just use vite.
Make sure Node.js is installed.
Run the following command in the terminal.
# Use locally cached version
npm create @pcllab/exp
# Use latest version
npm create @pcllab/exp@latestAlso works with other package managers if installed.
# These always use latest version
yarn create @pcllab/exp
pnpm create @pcllab/expYou can directly specify project name and template.
| option | values |
|---|---|
-t, --template |
js, ts |
# npm 6.x
npm create @pcllab/exp my-exp --template ts
# npm 7+, extra double-dash is needed:
npm create @pcllab/exp my-exp -- --template ts
# yarn
yarn create @pcllab/exp my-exp --template ts
# pnpm
pnpm create @pcllab/exp my-exp --template tsInstall all dependencies as dev dependencies.
Install all dependencies as dev dependencies.
Install all dependencies as dev dependencies.
Only the final bundled file needs to be installed by end users.
# install dependencies
pnpm
# Stub dist once, no need to watch or rebuild
pnpm dev
# Run
node ./dist/index.mjsWe use changesets
https://github.com/changesets/changesets/blob/main/docs/intro-to-using-changesets.md
pnpm changeset
The release.yml workflow will create pull request to version the package.
Merging the pull request will cause an automatic publish to NPM.
The release workflow will stop working. Update the Github secret NPM_TOKEN for the environment specified by release.yml. Or just publish to npm manually.