Skip to content

Commit

Permalink
Merge pull request #12 from tmdh/dev
Browse files Browse the repository at this point in the history
Fix showDialogError in index.js and other bug fixes
  • Loading branch information
tmdh authored Aug 1, 2020
2 parents 68561a6 + 586962d commit 92d49a6
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 149 deletions.
17 changes: 3 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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]
6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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 [...]

Expand Down
46 changes: 0 additions & 46 deletions CODE_OF_CONDUCT.md

This file was deleted.

64 changes: 0 additions & 64 deletions CONTRIBUTING.md

This file was deleted.

7 changes: 0 additions & 7 deletions ISSUE_TEMPLATE.md

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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)
22 changes: 16 additions & 6 deletions app/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])
}
Expand Down Expand Up @@ -446,7 +448,7 @@ function getProjectName (dir) {
}

function showInExplorer () {
shell.showItemInFolder(projectPath + "\\app")
shell.showItemInFolder(projectPath)
}

function openInEditor () {
Expand Down Expand Up @@ -480,3 +482,11 @@ function cmd (command) {
function output (output) {
$(".console").append("<div class='output'>" + output + "</div>");
}

function filePath (zipFileName) {
if(isDev) {
return path.join(__dirname, 'zip' , zipFileName)
} else {
return path.join(process.resourcesPath, "app/zip", zipFileName);
}
}
2 changes: 1 addition & 1 deletion license_en.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -31,7 +32,8 @@
},
"linux": {
"icon": "build/icons/png/"
}
},
"extraResources": "app/zip"
},
"author": "Tareque Md Hanif <[email protected]>",
"license": "MIT",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 92d49a6

Please sign in to comment.