create-ton 0.1.0 → 0.3.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 +22 -0
- package/dist/cli.js +29 -6
- package/dist/template/package.json +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2023-04-07
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Updated template dependencies: blueprint to 0.8.0, sandbox to 0.8.0, ton-core to 0.49.0
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed duplicate contract type question when using pnpm
|
|
18
|
+
|
|
19
|
+
## [0.2.0] - 2023-03-27
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- Added the ability to pass project name as a command line argument
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Dependencies of newly created projects are now installed using the package manager that is used to invoke create-ton
|
|
28
|
+
- Updated template dependencies' versions: blueprint to 0.6.1, sandbox to 0.7.0
|
|
29
|
+
|
|
8
30
|
## [0.1.0] - 2023-03-21
|
|
9
31
|
|
|
10
32
|
### Added
|
package/dist/cli.js
CHANGED
|
@@ -11,10 +11,13 @@ const inquirer_1 = __importDefault(require("inquirer"));
|
|
|
11
11
|
const chalk_1 = __importDefault(require("chalk"));
|
|
12
12
|
const PACKAGE_JSON = 'package.json';
|
|
13
13
|
async function main() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
console.log();
|
|
15
|
+
const name = process.argv.length > 2
|
|
16
|
+
? process.argv[2]
|
|
17
|
+
: (await inquirer_1.default.prompt({
|
|
18
|
+
name: 'name',
|
|
19
|
+
message: 'Project name',
|
|
20
|
+
})).name.trim();
|
|
18
21
|
if (name.length === 0)
|
|
19
22
|
throw new Error('Cannot initialize a project with an empty name');
|
|
20
23
|
const contractName = (await inquirer_1.default.prompt({
|
|
@@ -69,9 +72,29 @@ build
|
|
|
69
72
|
stdio: 'inherit',
|
|
70
73
|
cwd: name,
|
|
71
74
|
};
|
|
72
|
-
(
|
|
75
|
+
const pkgManager = (process.env.npm_config_user_agent ?? 'npm/').split(' ')[0].split('/')[0];
|
|
76
|
+
switch (pkgManager) {
|
|
77
|
+
case 'yarn':
|
|
78
|
+
(0, child_process_1.execSync)('yarn', execOpts);
|
|
79
|
+
break;
|
|
80
|
+
case 'pnpm':
|
|
81
|
+
(0, child_process_1.execSync)('pnpm install', execOpts);
|
|
82
|
+
break;
|
|
83
|
+
default:
|
|
84
|
+
(0, child_process_1.execSync)('npm install', execOpts);
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
73
87
|
console.log(`\n[3/${steps}] Creating your first contract...`);
|
|
74
|
-
|
|
88
|
+
let execCommand = 'npm';
|
|
89
|
+
switch (pkgManager) {
|
|
90
|
+
case 'yarn':
|
|
91
|
+
execCommand = 'yarn';
|
|
92
|
+
break;
|
|
93
|
+
case 'pnpm':
|
|
94
|
+
execCommand = 'pnpm';
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
(0, child_process_1.execSync)(`${execCommand} exec blueprint${pkgManager === 'pnpm' ? '' : ' --'} create ${contractName} --type ${variant}`, execOpts);
|
|
75
98
|
try {
|
|
76
99
|
(0, child_process_1.execSync)('git init', execOpts);
|
|
77
100
|
}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
"test": "jest"
|
|
7
7
|
},
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@ton-community/blueprint": "^0.
|
|
10
|
-
"@ton-community/sandbox": "^0.
|
|
9
|
+
"@ton-community/blueprint": "^0.8.0",
|
|
10
|
+
"@ton-community/sandbox": "^0.8.0",
|
|
11
11
|
"@ton-community/test-utils": "^0.2.0",
|
|
12
12
|
"@types/jest": "^29.5.0",
|
|
13
13
|
"@types/node": "^18.15.5",
|
|
14
14
|
"jest": "^29.5.0",
|
|
15
15
|
"prettier": "^2.8.6",
|
|
16
16
|
"ton": "^13.4.1",
|
|
17
|
-
"ton-core": "^0.
|
|
17
|
+
"ton-core": "^0.49.0",
|
|
18
18
|
"ton-crypto": "^3.2.0",
|
|
19
19
|
"ts-jest": "^29.0.5",
|
|
20
20
|
"ts-node": "^10.9.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ton",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Tool to quickly create TON projects",
|
|
6
6
|
"author": "TonTech",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/fs-extra": "^11.0.1",
|
|
22
22
|
"@types/inquirer": "^8.2.6",
|
|
23
|
-
"@types/node": "^18.15.
|
|
24
|
-
"prettier": "^2.8.
|
|
23
|
+
"@types/node": "^18.15.11",
|
|
24
|
+
"prettier": "^2.8.7",
|
|
25
25
|
"typescript": "^4.9.5"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|