diff --git a/package-lock.json b/package-lock.json index d025a3e..4ea66ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scrypt-cli", - "version": "0.1.75", + "version": "0.1.76", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "scrypt-cli", - "version": "0.1.75", + "version": "0.1.76", "license": "MIT", "dependencies": { "axios": "^1.3.6", diff --git a/package.json b/package.json index 3b1bb3b..e171019 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/bin/index.js b/src/bin/index.js index b09e50d..c70fc05 100755 --- a/src/bin/index.js +++ b/src/bin/index.js @@ -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'); @@ -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') diff --git a/tests/test-all-commands.sh b/tests/test-all-commands.sh index e398b2e..ddec3f6 100644 --- a/tests/test-all-commands.sh +++ b/tests/test-all-commands.sh @@ -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 ..