stdlib: rename js/react.#App to js/yarn.#Package

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2021-05-12 23:32:02 +00:00
committed by Solomon Hykes
parent 56ef4c1928
commit 16edfc4fec
6 changed files with 23 additions and 27 deletions

View File

@@ -0,0 +1,11 @@
{
"name": "test",
"main": "index.js",
"license": {
"type": "Apache-2.0",
"url": "https://opensource.org/licenses/apache2.0.php"
},
"scripts": {
"build": "mkdir -p ./build && echo output > ./build/test && touch .env && cp .env ./build/"
}
}

View File

@@ -0,0 +1,26 @@
package react
import (
"dagger.io/dagger"
"dagger.io/js/yarn"
"dagger.io/alpine"
"dagger.io/os"
)
TestData: dagger.#Artifact
TestReact: {
pkg: yarn.#Package & {
source: TestData
}
test: os.#Container & {
image: alpine.#Image & {
package: bash: "=5.1.0-r0"
}
mount: "/build": from: pkg.build
command: """
test "$(cat /build/test)" = "output"
"""
}
}