-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme and remove not needed files
- Loading branch information
1 parent
c85e62d
commit b7365c2
Showing
4 changed files
with
33 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,44 @@ | ||
# Network Status Check application written with Electron, Bootstrap, jQuery | ||
|
||
This is a tool to add URLs and ports to check to see if they are open or not. You can add as many items to the list, and edit the list as well if needed. You can save your list and eventually reimport the list as well on launch or by using the Load URLs button. | ||
|
||
A Demonstration of How to Use Bootstrap and jQuery to Build an Electron Application | ||
------------------------------------------------------------------------ | ||
Main Window | ||
|
||
What is Electron? | ||
![main](screenshots/main.png) | ||
|
||
> If you can build a website, you can build a desktop app. Electron is a framework for creating native applications with web technologies like JavaScript, HTML, and CSS. It takes care of the hard parts so you can focus on the core of your application. | ||
Run Check | ||
|
||
I built this demonstration application for those of you who have experience building web applications and are just getting started with Electron. I chose to implement Bootstrap 4.0.0-beta3 because: | ||
![runcheck](screenshots/runcheck.png) | ||
|
||
> Bootstrap is the most popular HTML, CSS, and JS framework in the world for building responsive, mobile-first projects on the web | ||
## Quick Code Tour | ||
|
||
It happens to require jQuery which also comes in handy for web development. I borrowed the [Dashboard example markup](https://getbootstrap.com/docs/4.0/examples/dashboard/) from the Bootstrap project. As example markup its purpose is merely to demonstrate a responsive layout. The menu buttons demonstrate roll-over behavior but do not link to anything. The search box doesn't work. To the example for it's intended purpose grab the window frame and resize it. Watch the interface fold and unfold as it redesigns itself making the best use of the available space as the window goes from phone size to table size to desktop size. | ||
- The code entry point is in **package.json** under the key "main". The value is "main.js" | ||
- **main.js** creates a BrowserWindow and loads **index.html**. It also has event handlers that enable keyboard shortcuts for Developer Tools on various platforms. Note that loadURL uses a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to give the source file's location.`` `file://${__dirname}/app/index.html` `` | ||
- **index.html** loads Bootstrap's CSS in the <head> tag and **renderer.js** after the closing <body> tag. On the web Bootstrap's JavaScript would also load in this location but the Electron way is to load it in **renderer.js** with a require(). Note that these src and href attributes use normal relative paths. An HTTP server is not necessary. | ||
- **renderer.js** loads jQuery, Bootstrap and it's dependency; Tether. Each is assigned to the window object because this is the web application custom. It's not the Node.js or Electron custom because window is a global. For now we must do it this way or it won't work. | ||
- **setup.js** setups up some overall settings for the application | ||
- **app.js** is the real worker of functions. | ||
|
||
Desktop | ||
------- | ||
![desktop](screenshots/desktop.png) | ||
## Releases | ||
|
||
Tablet | ||
------- | ||
![tablet](screenshots/tablet.png) | ||
At this time the releases are for Windows as that is my main developing platform and where I use this tool mostly; on Windows environments. | ||
|
||
Phone | ||
------- | ||
![phone](screenshots/phone.png) | ||
## Running Application | ||
|
||
Quick Code Tour | ||
--------------- | ||
first download and install dependencies, then start the app. | ||
|
||
- The code entry point is in **package.json** under the key "main". The value is "main.js" | ||
- **main.js** creates a BrowserWindow and loads **index.html**. It also has event handlers that enable keyboard shortcuts for Developer Tools on various platforms. Note that loadURL uses a [template literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to give the source file's location.`` `file://${__dirname}/app/index.html` `` | ||
- **index.html** loads Bootstrap's CSS in the <head> tag and **renderer.js** after the closing <body> tag. On the web Bootstrap's JavaScript would also load in this location but the Electron way is to load it in **renderer.js** with a require(). Note that these src and href attributes use normal relative paths. An HTTP server is not necessary. | ||
- **renderer.js** loads jQuery, Bootstrap and it's dependency; Tether. Each is assigned to the window object because this is the web application custom. It's not the Node.js or Electron custom because window is a global. For now we must do it this way or it won't work. | ||
``` | ||
git clone https://github.com/cjerrington/net-check.git | ||
cd net-check | ||
npm install | ||
npm start | ||
``` | ||
|
||
## Creating Releases | ||
|
||
We will need to package first, then we can create the installer if needed. | ||
|
||
``` | ||
npm run package-win | ||
npm run release | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters