daml/templates
Stefano Baghino 42adfdc857
Get rid of deprecated components (#12167)
* Get rid of deprecated components

Removes:
- mentions of the Node.js bindings
- mentions of the Scala bindings
- usage of the Scala codegen as an SDK tool
- Java bindings "reactive components"

changelog_begin
The Node.js bindings are no longer supported as part of the Daml SDK
The Scala bindings are no longer supported as part of the Daml SDK
The Java bindings reactive components are no longer supported as part of the Daml SDK
The `daml codegen` command has dropped support for Scala
changelog_end

* Fix typo noticed by @cocreature

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Address https://github.com/digital-asset/daml/pull/12167#issuecomment-995714093

* Remove quickstart-scala from the SDK tarballs

* Fix failing codegen test

* Address https://github.com/digital-asset/daml/pull/12167#pullrequestreview-833991243

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-16 16:55:19 +00:00
..
copy-trigger rewrite trigger docs to follow gsg (#10509) 2021-08-17 13:28:07 +00:00
create-daml-app daml-react: allow for React 17 (#11463) 2021-11-01 15:29:42 +01:00
create-daml-app-test-resources Multiplex multiple virtual query streams through a single web socket (#10221) 2021-10-29 09:20:33 +01:00
empty-skeleton language: add an empty template for the daml assistant. (#6102) 2020-05-26 15:27:10 +02:00
quickstart-java Migrate leftover scenario in quickstart to DAML Script (#7338) 2020-09-08 13:15:45 +02:00
skeleton Stop using controller can syntax in skeleton template (#10799) 2021-09-08 15:28:12 +02:00
BUILD.bazel Get rid of deprecated components (#12167) 2021-12-16 16:55:19 +00: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 gitignores to templates (#2159) 2019-07-16 14:59:08 +01:00
gsg-trigger.patch fix gsg-trigger template (#10611) 2021-08-18 14:49:30 +02: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.