Skip to content

Commit

Permalink
Merge pull request #119 from sCrypt-Inc/restore_init
Browse files Browse the repository at this point in the history
Restore init
  • Loading branch information
zhfnjust authored Jun 26, 2024
2 parents ea83e34 + 32653a4 commit 823a76d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrypt-cli",
"version": "0.1.75",
"version": "0.1.76",
"description": "CLI tool for creating and managing sCrypt projects.",
"bin": {
"scrypt": "./src/bin/index.js",
Expand Down
9 changes: 6 additions & 3 deletions src/bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { compile } = require('../lib/compile');
const { verify } = require('../lib/verify');
const { deploy } = require('../lib/deploy');
const { system } = require('../lib/system');
const { init } = require('../lib/init');
const chalk = require('chalk');
const { showVersion } = require('yargs');

Expand Down Expand Up @@ -168,9 +169,11 @@ yargs(hideBin(process.argv))
}).alias('force', 'f')
}, (argv) => {

console.log(_y(`Note: the "init" command has been deprecated!`));
console.log("See how to integrate a frontend here:")
console.log("https://docs.scrypt.io/how-to-integrate-a-frontend/")
// console.log(_y(`Note: the "init" command has been deprecated!`));
// console.log("See how to integrate a frontend here:")
// console.log("https://docs.scrypt.io/how-to-integrate-a-frontend/")
init(argv)

})
.command(['version'], 'show version', {}, () => showVersion())
.alias('h', 'help')
Expand Down
20 changes: 20 additions & 0 deletions tests/test-all-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,26 @@ npm run genprivkey
cd ..


chmod +x ../tests/helper-scripts/*.exp
npm i -g @vue/cli


echo "testing init React ..."
rm -rf dapp-react
npx create-react-app@latest dapp-react --template typescript
cd dapp-react
git init
git add .
git commit -am "Initial commit"
npm i
npm i -D ../../
npx scrypt-cli init --force
npx scrypt-cli compile
cp ../../tests/replaced-files/react-index.tsx src/index.tsx
cat src/index.tsx
CI=true npm t
cd ..

ls -la

cd ..
Expand Down

0 comments on commit 823a76d

Please sign in to comment.