@agoric/create-dapp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +23 -0
- package/package.json +52 -0
- package/src/create-dapp.js +17 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Create Agoric Dapp
|
|
2
|
+
|
|
3
|
+
To make a new Agoric Dapp in the `foo` subdirectory, you can use:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
$ yarn create @agoric/dapp foo
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
or:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ npm create @agoric/dapp foo
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
or:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
$ pnpm create @agoric/dapp foo
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Each of the above commands are shorthand for installing the `agoric` package, then running `agoric init foo`.
|
|
22
|
+
|
|
23
|
+
Please see the [Getting Started website](https://agoric.com/documentation/getting-started/) for information.
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agoric/create-dapp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Create an Agoric Javascript smart contract application",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-dapp": "src/create-dapp.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "node ./scripts/get-sdk-package-names.js > src/sdk-package-names.js",
|
|
14
|
+
"test": "ava",
|
|
15
|
+
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
|
|
16
|
+
"test:xs": "exit 0",
|
|
17
|
+
"integration-test": "ava --config .ava-integration-test.config.js",
|
|
18
|
+
"lint-fix": "yarn lint:eslint --fix",
|
|
19
|
+
"lint": "run-s --continue-on-error lint:*",
|
|
20
|
+
"lint:types": "tsc -p jsconfig.json",
|
|
21
|
+
"lint:eslint": "eslint ."
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"ava": "^5.2.0",
|
|
25
|
+
"c8": "^7.13.0",
|
|
26
|
+
"dd-trace": "^3.3.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"agoric": "^0.21.2-u12.0"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/Agoric/agoric-sdk"
|
|
35
|
+
},
|
|
36
|
+
"author": "Agoric",
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/Agoric/agoric/agoric-sdk"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
|
|
42
|
+
"ava": {
|
|
43
|
+
"files": [
|
|
44
|
+
"test/**/test-*.js"
|
|
45
|
+
],
|
|
46
|
+
"timeout": "2m",
|
|
47
|
+
"workerThreads": false
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#! /usr/bin/env node
|
|
2
|
+
/* global process */
|
|
3
|
+
import { spawnSync } from 'child_process';
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
|
|
6
|
+
const require = createRequire(import.meta.url);
|
|
7
|
+
|
|
8
|
+
const agoricCli = require.resolve('.bin/agoric');
|
|
9
|
+
|
|
10
|
+
const proc = spawnSync(agoricCli, ['init', ...process.argv.slice(2)], {
|
|
11
|
+
stdio: 'inherit',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (proc.error) {
|
|
15
|
+
throw proc.error;
|
|
16
|
+
}
|
|
17
|
+
process.exit(proc.status);
|