daml/templates
Stephen Russett ddb6083119
Add /log and navigator.log to default gitignore (#13944)
* Add /log and navigator.log to default gitIgnore

ensures that by default, log files are visible to git when creating a daml project with the daml cli.
Based on conversation from: https://discuss.daml.com/t/daml-cli-logs-folder-navigator-log-should-be-gitgnored/4587

changelog_begin
changelog_end
2022-05-24 11:22:56 +00:00
..
copy-trigger Drop parties from daml templates (#12953) 2022-02-15 17:21:32 +00:00
create-daml-app update daml.com URLs (#13226) 2022-03-09 18:15:40 +00:00
create-daml-app-test-resources Support getting started guide on Daml Hub (#12878) 2022-02-11 16:41:07 +00:00
empty-skeleton Drop parties from daml templates (#12953) 2022-02-15 17:21:32 +00:00
quickstart-java Make quickstart-java template work with canton sandbox. (#12453) 2022-01-18 11:49:52 +00:00
skeleton Document user management support in Navigator (#13085) 2022-02-25 16:11:51 +01:00
BUILD.bazel Further copyright updates (#12249) 2022-01-04 16:32:17 +01:00
default-dlint.yaml fix template dot-files (#10342) 2021-07-21 11:20:33 +02:00
default-gitattributes Apply new logo to create-daml-app template (#9105) 2021-03-12 13:20:31 +01:00
default-gitignore Add /log and navigator.log to default gitignore (#13944) 2022-05-24 11:22:56 +00:00
gsg-trigger.patch Fix dependencies for create-daml-app (#13089) 2022-02-25 15:25:50 +00:00
NO_AUTO_COPYRIGHT fix template dot-files (#10342) 2021-07-21 11:20:33 +02:00
README.txt Daml case and logo (#8433) 2021-01-08 12:50:15 +00:00

These are template projects for `daml new`.

Testing the create-daml-app template
====================================

While automated integration tests for the create-daml-app template are being built,
we have the following manual testing procedure.
Note that this is for testing against the head of the daml repo.
For testing against a released SDK, you can skip past the package.json step and use
`daml` instead of `daml-head` after installing the released version.


First, build the SDK from head using the `daml-sdk-head` command.
This gives an executable Daml assistant called `daml-head` in your path.

Next, instantiate the `create-daml-app` template as follows:

```
daml-head new create-daml-app --template create-daml-app
cd create-daml-app
```

Crucially, you'll need to add a package.json file at the root of the project for testing
(this is not required when using the released SDK).
It should look as follows, with the dummy paths here replaced by relative paths to locally
built TypeScript libraries.
(These need to be built from head using Bazel:
```
bazel build //language-support/ts/daml-types
bazel build //language-support/ts/daml-ledger
bazel build //language-support/ts/daml-react```)

package.json:
{
    "resolutions": {
        "@daml/types": "file:path/to/daml-types/npm_package",
        "@daml/ledger": "file:path/to/daml-ledger/npm_package",
        "@daml/react": "file:path/to/daml-react/npm_package"
    },
    "private": true,
    "workspaces": [
        "daml.js",
        "ui"
    ]
}

Now you can continue to build and run the project as described in create-daml-app/README.md,
using `daml-head` instead of `daml`.
Specifically, you should run the following in the root directory:
```
daml-head build
daml-head codegen js .daml/dist/create-daml-app-0.1.0.dar -o daml.js
daml-head start
```

Then in another terminal, navigate to `create-daml-app/ui/` and run:
```
yarn install
yarn start
```
And check that the app works.

Finally, terminate both the `daml start` and `yarn start` processes and run
`yarn test` from the `ui` directory. All tests should pass.