Skip to content

Commit c6ce4cb

Browse files
committed
restore init
1 parent ea83e34 commit c6ce4cb

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/bin/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const { compile } = require('../lib/compile');
88
const { verify } = require('../lib/verify');
99
const { deploy } = require('../lib/deploy');
1010
const { system } = require('../lib/system');
11+
const { init } = require('../lib/init');
1112
const chalk = require('chalk');
1213
const { showVersion } = require('yargs');
1314

@@ -168,9 +169,11 @@ yargs(hideBin(process.argv))
168169
}).alias('force', 'f')
169170
}, (argv) => {
170171

171-
console.log(_y(`Note: the "init" command has been deprecated!`));
172-
console.log("See how to integrate a frontend here:")
173-
console.log("https://docs.scrypt.io/how-to-integrate-a-frontend/")
172+
// console.log(_y(`Note: the "init" command has been deprecated!`));
173+
// console.log("See how to integrate a frontend here:")
174+
// console.log("https://docs.scrypt.io/how-to-integrate-a-frontend/")
175+
init(argv)
176+
174177
})
175178
.command(['version'], 'show version', {}, () => showVersion())
176179
.alias('h', 'help')

tests/test-all-commands.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,26 @@ npm run genprivkey
8484
cd ..
8585

8686

87+
chmod +x ../tests/helper-scripts/*.exp
88+
npm i -g @vue/cli
89+
90+
91+
echo "testing init React ..."
92+
rm -rf dapp-react
93+
npx create-react-app@latest dapp-react --template typescript
94+
cd dapp-react
95+
git init
96+
git add .
97+
git commit -am "Initial commit"
98+
npm i
99+
npm i -D ../../
100+
npx scrypt-cli init --force
101+
npx scrypt-cli compile
102+
cp ../../tests/replaced-files/react-index.tsx src/index.tsx
103+
cat src/index.tsx
104+
CI=true npm t
105+
cd ..
106+
87107
ls -la
88108

89109
cd ..

0 commit comments

Comments
 (0)