diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c6499d3..a1d093d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,3 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - **Describe the bug** A clear and concise description of what the bug is. @@ -14,15 +8,10 @@ Steps to reproduce the behavior: 3. Scroll down to '....' 4. See error -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** +**Screenshots or any error messages** +Check **View -> Toggle Developer Tools** and see if there is any error messages in **Console** tab. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. macOS] - - Laravel Kit version [e.g. 1.0.1] - -**Additional context** -Add any other context about the problem here. + - Laravel Kit version [e.g. 1.2.3] diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 066b2d9..6e74a07 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,9 +1,3 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index ee0d9cc..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at tarequemd.hanif@yahoo.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c9a8208..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,64 +0,0 @@ -# Contributing - -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull Request Process - -1. Ensure any install or build dependencies are removed before the end of the layer when doing a - build. -2. Update the README.md with details of changes to the interface, this includes new environment - variables, exposed ports, useful file locations and container parameters. -3. Increase the version numbers in any examples files and the README.md to the new version that this - Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you - do not have permission to do that, you may request the second reviewer to merge it for you. - -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at tarequemd.hanif@yahoo.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 878bdb3..0000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -- Laravel Kit Version: -- Platform: - -Steps to Reproduce: - -1. -2. diff --git a/README.md b/README.md index 249b757..df5997b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Laravel Kit is a desktop application which can execute almost all Laravel Artisa | macOS | Windows | Linux | | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.3/laravel-kit-1.2.3-mac.zip) | [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.3/laravel-kit-setup-1.2.3.exe) | [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.3/laravel-kit-1.2.3-x86_64.AppImage) | +| [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.4/laravel-kit-1.2.4-mac.zip) | [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.4/laravel-kit-setup-1.2.4.exe) | [Download](https://github.com/tmdh/laravel-kit/releases/download/v1.2.4/laravel-kit-1.2.4-x86_64.AppImage) | You can also install Laravel Kit with [brew](https://caskroom.github.io/) on macOS. @@ -46,4 +46,4 @@ Go to [Laravel Kit wiki](https://github.com/tmdh/laravel-kit/wiki). ------ -Copyright © 2018-2019 by [Tareque Md Hanif](https://github.com/tmdh) +Copyright © 2018-2020 by [Tareque Md Hanif](https://github.com/tmdh) diff --git a/app/js/index.js b/app/js/index.js index 0521b70..455f884 100644 --- a/app/js/index.js +++ b/app/js/index.js @@ -5,6 +5,8 @@ const {exec, spawn} = require("child_process") const extract = require('extract-zip') const settings = require("electron-settings") const kill = require('tree-kill') +const isDev = require("electron-is-dev") +const path = require('path'); var statusbar = $(".status-bar"), serveBtn = $("#serve.serve"), servingBtn = $("#serve.serving") var projectPath = "" var serve @@ -288,24 +290,24 @@ function newProject () { properties: ["openDirectory", "createDirectory"] }, (folderPath) => { if(folderPath !== undefined) { - extract('app/zip/laravel-5.8.zip', {dir: folderPath[0]}, (err) => { + extract(filePath('laravel-5.8.zip'), {dir: folderPath[0]}, (err) => { if(err !== undefined) { - ae(err) + ae(err.message) } else { changeStatusToWait("Extracted Laravel 5.8") var vendorZips = [] - fs.readdirSync("app/zip/vendors-5.8/").forEach(zipFile => { + fs.readdirSync(filePath("vendors-5.8/")).forEach(zipFile => { vendorZips.push(zipFile) }) var extractCount = 0 for(var i = 0; i < vendorZips.length; i++) { - extract('app/zip/vendors-5.8/' + vendorZips[i], {dir: folderPath[0] + '/vendor'}, (err) => { + extract(filePath('vendors-5.8/' + vendorZips[i]), {dir: folderPath[0] + '/vendor'}, (err) => { if(err !== undefined) { changeStatus(err) ae(err) } else { extractCount++ - changeStatusToWait("Extracted " + extractCount + "/38 vendor(s)") + changeStatusToWait("Extracted " + extractCount + "/" + vendorZips.length + " vendor(s)") if(extractCount === vendorZips.length) { executeCommands(folderPath[0]) } @@ -446,7 +448,7 @@ function getProjectName (dir) { } function showInExplorer () { - shell.showItemInFolder(projectPath + "\\app") + shell.showItemInFolder(projectPath) } function openInEditor () { @@ -480,3 +482,11 @@ function cmd (command) { function output (output) { $(".console").append("
" + output + "
"); } + +function filePath (zipFileName) { + if(isDev) { + return path.join(__dirname, 'zip' , zipFileName) + } else { + return path.join(process.resourcesPath, "app/zip", zipFileName); + } +} diff --git a/license_en.txt b/license_en.txt index 3b188ee..4b8ed6e 100644 --- a/license_en.txt +++ b/license_en.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Tareque Md Hanif +Copyright (c) 2018-2020 Tareque Md Hanif Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index 8a2ba5a..4c987e0 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "laravel-kit", - "version": "1.2.3", + "version": "1.2.4", "description": "Easy Laravel application management", "main": "main.js", "scripts": { "start": "electron .", "pack": "electron-builder --dir", "dist": "electron-builder", - "release": "electron-builder" + "release": "electron-builder", + "zip": "bash ./scripts/rzip.sh" }, "build": { "appId": "com.tmdh.laravel-kit", @@ -31,7 +32,8 @@ }, "linux": { "icon": "build/icons/png/" - } + }, + "extraResources": "app/zip" }, "author": "Tareque Md Hanif ", "license": "MIT", @@ -42,6 +44,7 @@ "url": "https://github.com/tmdh/laravel-kit.git" }, "dependencies": { + "adm-zip": "^0.4.13", "electron-is-dev": "^0.3.0", "electron-settings": "^3.1.4", "electron-updater": "^2.18.2", diff --git a/yarn.lock b/yarn.lock index e052540..7f2fcd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,11 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +adm-zip@^0.4.13: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + aggregate-error@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-1.0.0.tgz#888344dad0220a72e3af50906117f48771925fac"