diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..5af7433 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +14.17.3 \ No newline at end of file diff --git a/README.md b/README.md index 2212910..be4b3cf 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ Starts the Svelte application in development mode (hot reload watching for file Builds the app for production, creating a single executable will all assets bundled. It correctly bundles Svelte in production mode and optimizes the build for the best performance. +### `yarn test` + +Runs go test and jest. Go test will fail without the `assets.go` file that is run during code generation, so `go generate` runs first. Frontend and backend tests can be run individually with `yarn svelte:test` or yarn `go:test` respectively. + ### `node ./scripts/setupTypeScript.js` Uses the Svelte Template provided script to add typescript to the frontend project diff --git a/package.json b/package.json index 9b3e630..12050d0 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,15 @@ { - "name": "svelte-app", + "name": "svelte-lorca-template", "version": "1.0.0", - "private": true, + "private": false, "scripts": { "start": "npm run svelte:build & npm run svelte:start & npm run go:start", "dev": "npm run svelte:dev & npm run go:start", "build": "npm run svelte:build && npm run go:generate && npm run go:build", + "test": "npm run go:generate && npm run go:test && npm run svelte:test", "go:start": "go run serve_debug.go main.go -tags debug", "go:generate": "go generate", + "go:test": "go generate && go test ./...", "go:build": "go build", "svelte:build": "rollup -c", "svelte:dev": "rollup -c -w",