Skip to content

Commit

Permalink
Merge efe9403 into 1923a83
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoBorzi committed Feb 27, 2020
2 parents 1923a83 + efe9403 commit fd08ae7
Show file tree
Hide file tree
Showing 16 changed files with 413 additions and 179 deletions.
10 changes: 8 additions & 2 deletions angular.json
Expand Up @@ -9,8 +9,11 @@
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
},
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
Expand Down Expand Up @@ -82,8 +85,11 @@
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.js"
},
"browserTarget": "Keira3:build"
},
"configurations": {
Expand Down
15 changes: 9 additions & 6 deletions e2e/main.e2e.ts
Expand Up @@ -14,15 +14,18 @@ describe('Keira3 App', function () {
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);
});

it('sqlite should correctly work', async function () {
const sleep = time => new Promise(r => setTimeout(r, time));
const selector = '#sqlite-e2e-test';
const expectedText = 'Tricks and Treats of Azeroth';
const text = await browser.getAttribute(selector, 'e2e');
await sleep(500);
expect(text).to.equal(expectedText);
});

});
38 changes: 21 additions & 17 deletions electron-builder.json
@@ -1,24 +1,27 @@
{
"productName": "Keira3",
"asarUnpack": [
"dist/assets/sqlite.db"
],
"directories": {
"output": "release/"
},
"files": [
"**/*",
"!**/*.ts",
"!*.code-workspace",
"!LICENSE.md",
"!package.json",
"!package-lock.json",
"!src/",
"!e2e/",
"!hooks/",
"!angular.json",
"!_config.yml",
"!karma.conf.js",
"!tsconfig.json",
"!tslint.json"
],
"files": [
"**/*",
"!**/*.ts",
"!*.code-workspace",
"!LICENSE.md",
"!package.json",
"!package-lock.json",
"!src/",
"!e2e/",
"!hooks/",
"!angular.json",
"!_config.yml",
"!karma.conf.js",
"!tsconfig.json",
"!tslint.json"
],
"win": {
"icon": "dist",
"target": [
Expand All @@ -38,7 +41,8 @@
"AppImage",
"deb",
"snap",
"rpm"
"rpm",
"AppImage"
]
}
}
5 changes: 5 additions & 0 deletions extra-webpack.config.js
@@ -0,0 +1,5 @@
module.exports = {
externals: {
'sqlite3':'commonjs sqlite3'
}
};

0 comments on commit fd08ae7

Please sign in to comment.