Skip to content

Commit

Permalink
Added some scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adriandelgg committed Jan 19, 2022
1 parent 7d35b25 commit 90a4077
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 14 deletions.
3 changes: 1 addition & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "backend",
"version": "1.0.0",
"license": "MIT",
"main": "build/index.js",
"author": "Adrian Delgado",
"scripts": {
"start": "node build/index.js",
"dev": "nodemon --ignore './tests' index.ts",
"build": "tsc -p ."
},
"author": "Adrian Delgado",
"dependencies": {
"bcrypt": "^5.0.1",
"body-parser": "^1.19.0",
Expand Down
7 changes: 2 additions & 5 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ async function setup() {

process.chdir(appPath);

await fs.rm(path.join(appPath, "./bin"), {
recursive: true,
force: true
});
console.log("\x1b[35mRemoved unnecessary bin directory.\x1b[0m");
await fs.rm(path.join(appPath, "./bin/index.js"));
console.log("\x1b[35mRemoved unnecessary create-eth script.\x1b[0m");

console.log("Installing packages. This might take a couple of minutes.");
const install = runCommand(`yarn install`);
Expand Down
5 changes: 5 additions & 0 deletions bin/installDeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
[ -d backend ] && cd backend && yarn install && cd ..
[ -d frontend ] && cd frontend && yarn install && cd ..
[ -d hardhat ] && cd hardhat && yarn install && cd ..
find . -type f -name .example.env -execdir mv {} .env ";"
1 change: 0 additions & 1 deletion frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"private": true,
"name": "frontend",
"license": "MIT",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand All @@ -20,6 +21,7 @@
"react-toggle-dark-mode": "^1.0.4"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.0",
"@types/lodash": "^4.14.175",
"@types/node": "^17.0.8",
"@types/react": "17.0.38",
Expand Down
25 changes: 25 additions & 0 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,16 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.0.tgz#7f698254aadf921e48dda8c0a6b304026b8a9323"
integrity sha512-JLo+Y592QzIE+q7Dl2pMUtt4q8SKYI5jDrZxrozEQxnGVOyYE+GWK9eLkwTaeN9DDctlaRAQ3TBmzZ1qdLE30A==

"@tailwindcss/typography@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.0.tgz#47886ec46ac41e1211d24fea05301046d9b30906"
integrity sha512-1p/3C6C+JJziS/ghtG8ACYalbA2SyLJY27Pm33cVTlAoY6VQ7zfm2H64cPxUMBkVIlWXTtWHhZcZJPobMRmQAA==
dependencies:
lodash.castarray "^4.4.0"
lodash.isplainobject "^4.0.6"
lodash.merge "^4.6.2"
lodash.uniq "^4.5.0"

"@tsconfig/node10@^1.0.7":
version "1.0.8"
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9"
Expand Down Expand Up @@ -2368,11 +2378,26 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"

lodash.castarray@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115"
integrity sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=

lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=

lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==

lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=

long@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "create-eth-ts-dapp",
"description": "A template for building Full-Stack Blockchain Dapps using Next.js (React), TypeScript, Tailwind CSS, Hardhat, Solidity, and many more!",
"version": "1.1.42",
"version": "1.1.43",
"author": "Adrian Delgado",
"license": "MIT",
"bin": "./bin/index.js",
Expand All @@ -16,10 +16,12 @@
},
"homepage": "https://github.com/adriandelgg/create-eth-ts-dapp#readme",
"scripts": {
"dev": "concurrently \"cd ./hardhat && npx hardhat node\" \"cd ./frontend && npm run dev\" \"cd ./backend && yarn dev\"",
"hardhat": "cd ./hardhat && hh node",
"frontend": "cd ./frontend && npm run dev",
"postinstall": "cd backend && yarn install && cd ../frontend && yarn install && cd ../hardhat && yarn install"
"dev": "concurrently \"[ -d hardhat ] && cd ./hardhat && npx hardhat node && cd ..\" \"[ -d frontend ] && cd ./frontend && yarn dev && cd ..\" \"[ -d backend ] && cd ./backend && echo 'Please enable MongoDB server (mongod)' && yarn dev\"",
"hardhat": "cd ./hardhat && npx hardhat node",
"frontend": "cd ./frontend && yarn dev",
"backend": "cd ./backend && yarn dev",
"installdeps": "./bin/installDeps.sh",
"postinstall": "./bin/installDeps.sh"
},
"devDependencies": {
"concurrently": "^6.2.1"
Expand Down

0 comments on commit 90a4077

Please sign in to comment.