Skip to content

Commit

Permalink
Showing 106 changed files with 1,298 additions and 1,711 deletions.
57 changes: 57 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

# Function to check the last command for errors
check_last_command() {
if [ $? -ne 0 ]; then
echo "An error occurred. Exiting."
exit 1
fi
}

# Step 1: Add all changes and commit
echo "Adding all changes..."
git add .
check_last_command

echo "Committing changes with message 'Y2024'..."
git commit -am "Y2024"
check_last_command

# Step 2: Push changes to the master branch
echo "Pushing changes to the master branch..."
git push origin master
check_last_command

# Step 3: Navigate to the package directory
echo "Navigating to package directory 'packages/create-mernjs-app'..."
cd packages/create-mernjs-app
check_last_command

# Step 4: Bump the version (patch, minor, or major)
# Update the version here as per your need
echo "Updating the package version..."
npm version patch # Use npm version minor or npm version major as needed
check_last_command

# Step 5: Ensure you are logged into npm
echo "Checking npm login status..."
npm whoami &> /dev/null
if [ $? -ne 0 ]; then
echo "You are not logged in to npm. Please login:"
npm login
check_last_command
fi

# Step 6: Publish the package
echo "Publishing the package to npm..."
npm publish --access public
check_last_command

echo "Package published successfully!"

# Step 7: Push the version bump commit and tag to the remote repository
echo "Pushing version bump commit and tag to the remote repository..."
git push origin master --follow-tags
check_last_command

echo "All done!"
Binary file removed templates/app/electronjs-boilerplate.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/app/electronjs-boilerplate/electron.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
const START_URL = 'http://localhost:3000';
const START_URL = 'http://localhost:8080';

const createWindow = async () => {
const isDev = (await import('electron-is-dev')).default;
20 changes: 10 additions & 10 deletions templates/app/electronjs-boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
"main": "electron.js",
"private": true,
"scripts": {
"web": "react-scripts start",
"web": "PORT=8080 react-scripts start",
"build": "react-scripts build",
"production": "npm run build && electron-builder build -wml",
"dev": "concurrently \"cross-env BROWSER=none npm run web\" \"wait-on http://localhost:3000 && nodemon --exec electron .\"",
"dev": "concurrently \"cross-env BROWSER=none npm run web\" \"wait-on http://localhost:8080 && nodemon --exec electron .\"",
"lint": "eslint .",
"lint:fix": "eslint --fix --ext .js,.jsx .",
"upgrade": "npx npm-check-updates && npx npm-check-updates -u",
@@ -17,11 +17,11 @@
"dependencies": {
"@hookform/error-message": "^2.0.1",
"@reduxjs/toolkit": "^2.2.5",
"axios": "^1.6.8",
"axios": "^1.7.2",
"history": "^5.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.52.0",
"react-redux": "^9.1.2",
"react-router-dom": "^6.23.1",
"react-scripts": "^5.0.1",
@@ -34,15 +34,15 @@
"devDependencies": {
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"electron": "^30.0.0",
"electron": "^31.0.2",
"electron-builder": "^24.13.3",
"electron-is-dev": "^3.0.1",
"eslint": "^9.2.0",
"eslint": "^9.5.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-react": "^7.34.1",
"nodemon": "^3.1.0",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3",
"eslint-plugin-react": "^7.34.3",
"nodemon": "^3.1.4",
"prettier": "^3.3.2",
"tailwindcss": "^3.4.4",
"wait-on": "^7.2.0"
},
"browserslist": {
Binary file removed templates/app/expo-boilerplate.zip
Binary file not shown.
36 changes: 18 additions & 18 deletions templates/app/expo-boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"dev": "expo start --web",
"test": "jest --watchAll",
"upgrade": "npx npm-check-updates && npx npm-check-updates -u"
},
@@ -16,29 +16,29 @@
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@react-navigation/native": "^6.1.17",
"expo": "~51.0.5",
"expo-font": "~12.0.5",
"expo": "~51.0.14",
"expo-font": "~12.0.7",
"expo-linking": "~6.3.1",
"expo-router": "^3.5.12",
"expo-splash-screen": "~0.27.4",
"expo-router": "^3.5.16",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.4",
"expo-system-ui": "~3.0.6",
"expo-web-browser": "~13.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.1",
"react-native-gesture-handler": "~2.16.2",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "~3.31.1",
"react-native-web": "~0.19.11"
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.74.2",
"react-native-gesture-handler": "~2.17.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "~3.32.0",
"react-native-web": "~0.19.12"
},
"devDependencies": {
"@babel/core": "^7.24.5",
"@types/react": "~18.2.0",
"@babel/core": "^7.24.7",
"@types/react": "~18.3.3",
"jest": "^29.7.0",
"jest-expo": "~51.0.1",
"react-test-renderer": "18.2.0",
"typescript": "^5.4.5"
"jest-expo": "~51.0.2",
"react-test-renderer": "18.3.1",
"typescript": "^5.5.2"
},
"overrides": {
"react-refresh": "~0.14.0"
Binary file removed templates/app/fastifyjs-mongodb-boilerplate.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/app/fastifyjs-mongodb-boilerplate/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME=MernJs
APP_ENV=development
APP_PORT=8080
APP_PORT=8081
APP_DEBUG=true
APP_URL=http://localhost

12 changes: 6 additions & 6 deletions templates/app/fastifyjs-mongodb-boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -20,16 +20,16 @@
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"fastify": "^4.27.0",
"fastify": "^4.28.0",
"faker": "^6.6.6",
"jsonwebtoken": "^9.0.2",
"mongoose": "^8.4.0",
"mongoose-paginate-v2": "^1.8.1"
"mongoose": "^8.4.3",
"mongoose-paginate-v2": "^1.8.2"
},
"devDependencies": {
"eslint": "^9.2.0",
"eslint": "^9.5.0",
"eslint-config-google": "^0.14.0",
"nodemon": "^3.1.0",
"prettier": "^3.2.5"
"nodemon": "^3.1.4",
"prettier": "^3.3.2"
}
}
Binary file removed templates/app/fastifyjs-mysql-boilerplate.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/app/fastifyjs-mysql-boilerplate/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
APP_NAME=MernJs
APP_ENV=development
APP_PORT=8080
APP_PORT=8083
APP_DEBUG=true
APP_URL=http://localhost

10 changes: 5 additions & 5 deletions templates/app/fastifyjs-mysql-boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -23,19 +23,19 @@
"dotenv": "^16.4.5",
"express": "^4.19.2",
"faker": "^6.6.6",
"fastify": "^4.27.0",
"fastify": "^4.28.0",
"jsonwebtoken": "^9.0.2",
"lodash": "^4.17.21",
"morgan": "^1.10.0",
"mysql": "^2.18.1",
"mysql2": "^3.9.7",
"mysql2": "^3.10.1",
"sequelize": "^6.37.3",
"sequelize-cli": "^6.6.2"
},
"devDependencies": {
"eslint": "^9.2.0",
"eslint": "^9.5.0",
"eslint-config-google": "^0.14.0",
"nodemon": "^3.1.0",
"prettier": "^3.2.5"
"nodemon": "^3.1.4",
"prettier": "^3.3.2"
}
}
Binary file removed templates/app/gatsbyjs-boilerplate.zip
Binary file not shown.
14 changes: 7 additions & 7 deletions templates/app/gatsbyjs-boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "gatsby develop",
"dev": "gatsby develop -p 8084",
"build": "gatsby build",
"start": "gatsby develop",
"serve": "gatsby serve",
@@ -16,7 +16,7 @@
"dependencies": {
"@hookform/error-message": "^2.0.1",
"@reduxjs/toolkit": "^2.2.5",
"gatsby": "^5.13.5",
"gatsby": "^5.13.6",
"gatsby-plugin-image": "^3.13.1",
"gatsby-plugin-manifest": "^5.13.1",
"gatsby-plugin-react-helmet": "^6.13.1",
@@ -28,7 +28,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-helmet": "^6.1.0",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.52.0",
"react-redux": "^9.1.2",
"react-toastify": "^10.0.5",
"redux": "^5.0.1",
@@ -38,12 +38,12 @@
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"eslint": "^9.2.0",
"eslint": "^9.5.0",
"eslint-config-google": "^0.14.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react": "^7.34.3",
"gatsby-plugin-postcss": "^6.13.1",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"tailwindcss": "^3.4.3"
"prettier": "^3.3.2",
"tailwindcss": "^3.4.4"
}
}
45 changes: 45 additions & 0 deletions templates/app/logs/electronjs-boilerplate.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
yarn run v1.22.22
$ concurrently "cross-env BROWSER=none npm run web" "wait-on http://localhost:8080 && nodemon --exec electron ."
[0]
[0] > [email protected] web
[0] > PORT=8080 react-scripts start
[0]
[0] (node:15865) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] (Use `node --trace-deprecation ...` to show where the warning was created)
[0] (node:15865) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
[0] Starting the development server...
[0]
[0] One of your dependencies, babel-preset-react-app, is importing the
[0] "@babel/plugin-proposal-private-property-in-object" package without
[0] declaring it in its dependencies. This is currently working because
[0] "@babel/plugin-proposal-private-property-in-object" is already in your
[0] node_modules folder for unrelated reasons, but it may break at any time.
[0]
[0] babel-preset-react-app is part of the create-react-app project, which
[0] is not maintianed anymore. It is thus unlikely that this bug will
[0] ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
[0] your devDependencies to work around this error. This will make this message
[0] go away.
[0]
[0] Compiled successfully!
[0]
[0] You can now view project_name in the browser.
[0]
[0] Local: http://localhost:8080
[0] On Your Network: http://192.168.16.100:8080
[0]
[0] Note that the development build is not optimized.
[0] To create a production build, use yarn build.
[0]
[0] webpack compiled successfully
[1] [nodemon] 3.1.4
[1] [nodemon] to restart at any time, enter `rs`
[1] [nodemon] watching path(s): *.*
[1] [nodemon] watching extensions: js,mjs,cjs,json
[1] [nodemon] starting `electron .`
[1] [16044:0622/024151.995878:ERROR:CONSOLE(1)] "Request Autofill.enable failed. {"code":-32601,"message":"'Autofill.enable' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[1] [16044:0622/024151.996505:ERROR:CONSOLE(1)] "Request Autofill.setAddresses failed. {"code":-32601,"message":"'Autofill.setAddresses' wasn't found"}", source: devtools://devtools/bundled/core/protocol_client/protocol_client.js (1)
[1] [16044:0622/025028.532996:ERROR:CONSOLE(1)] "Uncaught (in promise) TypeError: Failed to fetch", source: devtools://devtools/bundled/panels/elements/elements.js (1)
[0] cross-env BROWSER=none npm run web exited with code 1
[1] /Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/electronjs-boilerplate/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron exited with signal SIGTERM
[1] wait-on http://localhost:8080 && nodemon --exec electron . exited with code SIGTERM
10 changes: 10 additions & 0 deletions templates/app/logs/expo-boilerplate.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
yarn run v1.22.22
$ expo start --web
Starting project at /Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/expo-boilerplate
› Port 8081 is running project_name in another window
/Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/react-native-boilerplate (pid 13006)
Input is required, but 'npx expo' is in non-interactive mode.
Required input:
> Use port 8082 instead?
› Skipping dev server
Done in 3.17s.
19 changes: 19 additions & 0 deletions templates/app/logs/fastifyjs-mongodb-boilerplate.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
yarn run v1.22.22
$ nodemon server.js
[nodemon] 3.1.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node server.js`
(node:15839) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use `node --trace-warnings ...` to show where the warning was created)
(node:15839) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(node:15839) [FSTDEP011] DeprecationWarning: Variadic listen method is deprecated. Please use ".listen(optionsObject)" instead. The variadic signature will be removed in `fastify@5`.
{"level":30,"time":1719004217206,"pid":15839,"hostname":"Vijays-MacBook-Air.local","msg":"Server listening at http://[::1]:8081"}
{"level":30,"time":1719004217209,"pid":15839,"hostname":"Vijays-MacBook-Air.local","msg":"Server listening at http://127.0.0.1:8081"}
********** Server is running on http://localhost:http://[::1]:8081 **********

********** Missing DB Connection ***********

{"level":30,"time":1719004352425,"pid":15839,"hostname":"Vijays-MacBook-Air.local","reqId":"req-1","req":{"method":"GET","url":"/","hostname":"localhost:8081","remoteAddress":"::1","remotePort":53703},"msg":"incoming request"}
{"level":30,"time":1719004352572,"pid":15839,"hostname":"Vijays-MacBook-Air.local","reqId":"req-1","res":{"statusCode":200},"responseTime":145.83916999958456,"msg":"request completed"}
36 changes: 36 additions & 0 deletions templates/app/logs/fastifyjs-mysql-boilerplate.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
yarn run v1.22.22
$ nodemon server.js
[nodemon] 3.1.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node server.js`
(node:15844) [FSTDEP011] DeprecationWarning: Variadic listen method is deprecated. Please use ".listen(optionsObject)" instead. The variadic signature will be removed in `fastify@5`.
(Use `node --trace-deprecation ...` to show where the warning was created)
********** Port Error: listen EADDRINUSE: address already in use ::1:8083 is already in use **********
ConnectionRefusedError [SequelizeConnectionRefusedError]
at ConnectionManager.connect (/Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:92:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ConnectionManager._connect (/Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:222:24)
at async /Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:174:32
at async ConnectionManager.getConnection (/Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:197:7)
at async /Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/sequelize.js:305:26
at async Sequelize.authenticate (/Users/vijaypratapsingh/Desktop/create-mern-app/templates/app/fastifyjs-mysql-boilerplate/node_modules/sequelize/lib/sequelize.js:457:5) {
parent: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1117:18)
at afterConnectMultiple (node:net:1684:7) {
code: 'ECONNREFUSED',
fatal: true,
[errors]: [ [Error], [Error] ]
},
original: AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1117:18)
at afterConnectMultiple (node:net:1684:7) {
code: 'ECONNREFUSED',
fatal: true,
[errors]: [ [Error], [Error] ]
}
}
********** Missing DB Connection ***********

[nodemon] clean exit - waiting for changes before restart
Loading

0 comments on commit a3fdf7b

Please sign in to comment.