forked from geo-tp/Alpha-Core-Keira3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb85dce
commit ae45e0c
Showing
126 changed files
with
19,320 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/app-builds | ||
/release | ||
main.js | ||
src/**/*.js | ||
!src/karma.conf.js | ||
*.js.map | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# e2e | ||
/e2e/*.js | ||
!/e2e/protractor.conf.js | ||
/e2e/*.map | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: node_js | ||
node_js: | ||
- '10' | ||
dist: xenial | ||
sudo: required | ||
services: | ||
- xvfb | ||
addons: | ||
chrome: stable | ||
before_script: | ||
- export DISPLAY=:99.0 | ||
install: | ||
- npm set progress=false | ||
- npm install | ||
script: | ||
- ng lint | ||
- npm run test | ||
- npm run e2e | ||
- npm run build |
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,2 +1,63 @@ | ||
# Keira3 | ||
Cross-platform Database Editor for AzerothCore | ||
|
||
Cross-platform desktop application featuring a **Database Editor** for the [AzerothCore MMORPG framework](http://www.azerothcore.org). | ||
|
||
With Keira3 you don't have to know the SQL language in order to change contents: it will generate the SQL queries automatically for you. The SQL code will be displayed, so you can **learn**, and then you can **copy** or **execute** it directly to your database. | ||
|
||
Made with ❤ and [TypeScript](http://www.typescriptlang.org/), [Electron](https://electronjs.org/), [Angular](https://angular.io/), [Bootstrap](https://getbootstrap.com/). | ||
|
||
## Work in progress | ||
|
||
Keira3 is currently in a WIP state. All the news and releases will be announced via [the forum](https://github.com/azerothcore/forum/issues/21). | ||
|
||
## Support us | ||
|
||
You can support the Keira3 development by [donating with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=borzifrancesco%40gmail.com&item_name=Support+Keira3+Development¤cy_code=EUR&source=url). | ||
|
||
## Inspired by | ||
|
||
We created Keira inspired by the old [indomit's Quice/Truice](https://github.com/indomit/quice) database editor, and by the [Discover-'s SAI Editor](https://github.com/Discover-/SAI-Editor). Our primary goal was to provide an editor with the same features that was cross-platform, so we built it as a web app. | ||
|
||
Keira3 is the direct successor of [Keira2](https://github.com/Helias/Keira2). We kept the cross-platform promise as well as adding the possibility to execute the generated queries and simplifying the application setup. | ||
|
||
## Development | ||
|
||
### Dependencies | ||
|
||
Install dependencies with npm : | ||
|
||
``` bash | ||
npm install | ||
``` | ||
|
||
If you want to generate Angular components with Angular-cli , you **MUST** install `@angular/cli` in npm global context. | ||
Please follow [Angular-cli documentation](https://github.com/angular/angular-cli) if you had installed a previous version of `angular-cli`. | ||
|
||
``` bash | ||
npm install -g @angular/cli | ||
``` | ||
|
||
### Build | ||
|
||
|
||
To run the app in local development with hot reload: | ||
|
||
```bash | ||
npm start | ||
``` | ||
|
||
More commands: | ||
|
||
|Command|Description| | ||
|--|--| | ||
|`npm run ng:serve:web`| Execute the app in the browser with hot reload (NOTE: no Electron/Node lib will work in this case) | | ||
|`npm run build`| Build the app. Your built files are in the /dist folder. | | ||
|`npm run build:prod`| Build the app with Angular aot. Your built files are in the /dist folder. | | ||
|`npm run electron:local`| Builds your application and start electron | ||
|`npm run electron:linux`| Builds your application and creates an app consumable on linux system | | ||
|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems | | ||
|`npm run electron:mac`| On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac | | ||
|`npm run test`| Run unit tests once | | ||
|`npm run test -- --watch`| Run unit tests in watch mode | | ||
|
||
**Note: Only /dist folder and node dependencies will be included in the executable.** |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-architect |
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 |
---|---|---|
@@ -0,0 +1,152 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"angular-electron": { | ||
"root": "", | ||
"sourceRoot": "src", | ||
"projectType": "application", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-devkit/build-angular:browser", | ||
"options": { | ||
"outputPath": "dist", | ||
"index": "src/index.html", | ||
"main": "src/main.ts", | ||
"tsConfig": "src/tsconfig.app.json", | ||
"polyfills": "src/polyfills.ts", | ||
"assets": [ | ||
"src/assets", | ||
"src/favicon.ico", | ||
"src/favicon.png", | ||
"src/favicon.icns", | ||
"src/favicon.256x256.png", | ||
"src/favicon.512x512.png" | ||
], | ||
"styles": [ | ||
"src/assets/scss/main.scss" | ||
], | ||
"scripts": [] | ||
}, | ||
"configurations": { | ||
"dev": { | ||
"optimization": false, | ||
"outputHashing": "all", | ||
"sourceMap": true, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"aot": false, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": false, | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.dev.ts" | ||
} | ||
] | ||
}, | ||
"production": { | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"extractCss": true, | ||
"namedChunks": false, | ||
"aot": true, | ||
"extractLicenses": true, | ||
"vendorChunk": false, | ||
"buildOptimizer": true, | ||
"fileReplacements": [ | ||
{ | ||
"replace": "src/environments/environment.ts", | ||
"with": "src/environments/environment.prod.ts" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@angular-devkit/build-angular:dev-server", | ||
"options": { | ||
"browserTarget": "angular-electron:build" | ||
}, | ||
"configurations": { | ||
"dev": { | ||
"browserTarget": "angular-electron:build:dev" | ||
}, | ||
"production": { | ||
"browserTarget": "angular-electron:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "angular-electron:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "src/test.ts", | ||
"polyfills": "src/polyfills-test.ts", | ||
"tsConfig": "src/tsconfig.spec.json", | ||
"karmaConfig": "src/karma.conf.js", | ||
"scripts": [], | ||
"styles": [ | ||
"src/assets/scss/main.scss" | ||
], | ||
"assets": [ | ||
"src/assets", | ||
"src/favicon.ico", | ||
"src/favicon.png", | ||
"src/favicon.icns", | ||
"src/favicon.256x256.png", | ||
"src/favicon.512x512.png" | ||
] | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"src/tsconfig.app.json", | ||
"src/tsconfig.spec.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"angular-electron-e2e": { | ||
"root": "e2e", | ||
"projectType": "application", | ||
"architect": { | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [ | ||
"e2e/tsconfig.e2e.json" | ||
], | ||
"exclude": [ | ||
"**/node_modules/**" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "angular-electron", | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"prefix": "app", | ||
"styleext": "scss" | ||
}, | ||
"@schematics/angular:directive": { | ||
"prefix": "app" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const Application = require('spectron').Application; | ||
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules. | ||
const path = require('path'); | ||
|
||
export default function setup() { | ||
beforeEach(async function () { | ||
this.app = new Application({ | ||
// Your electron path can be any binary | ||
// i.e for OSX an example path could be '/Applications/MyApp.app/Contents/MacOS/MyApp' | ||
// But for the sake of the example we fetch it from our node_modules. | ||
path: electronPath, | ||
|
||
// Assuming you have the following directory structure | ||
|
||
// |__ my project | ||
// |__ ... | ||
// |__ main.js | ||
// |__ package.json | ||
// |__ index.html | ||
// |__ ... | ||
// |__ test | ||
// |__ spec.js <- You are here! ~ Well you should be. | ||
|
||
// The following line tells spectron to look and use the main.js file | ||
// and the package.json located 1 level above. | ||
args: [path.join(__dirname, '..')], | ||
webdriverOptions: {} | ||
}); | ||
await this.app.start(); | ||
const browser = this.app.client; | ||
await browser.waitUntilWindowLoaded(); | ||
|
||
browser.timeouts('script', 15000); | ||
}); | ||
|
||
afterEach(function () { | ||
if (this.app && this.app.isRunning()) { | ||
return this.app.stop(); | ||
} | ||
}); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {expect, assert} from 'chai'; | ||
import {SpectronClient} from 'spectron'; | ||
|
||
import commonSetup from './common-setup'; | ||
|
||
describe('angular-electron App', function () { | ||
commonSetup.apply(this); | ||
|
||
let browser: any; | ||
let client: SpectronClient; | ||
|
||
beforeEach(function () { | ||
client = this.app.client; | ||
browser = client as any; | ||
}); | ||
|
||
// it('should display message saying App works !', async function () { | ||
// const text = await browser.getText('app-home h1'); | ||
// expect(text).to.equal('App works !'); | ||
// }); | ||
|
||
|
||
it('creates initial windows', async function () { | ||
const count = await client.getWindowCount(); | ||
expect(count).to.equal(1); | ||
}); | ||
|
||
}); |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/e2e", | ||
"module": "es2015", | ||
"types": [ | ||
"mocha" | ||
] | ||
}, | ||
"include": [ | ||
"**/*.ts" | ||
] | ||
} |
Oops, something went wrong.