Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

fix(build): publish prebuilt frontend #76

Merged
merged 2 commits into from Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .npmignore
Expand Up @@ -4,7 +4,6 @@ test/fs/
utils/testrunner

# repeats from .gitignore
/.local-frontend/
/node_modules/
.DS_Store
*.swp
Expand Down
6 changes: 4 additions & 2 deletions install.js → build.js
Expand Up @@ -6,6 +6,7 @@

const fs = require('fs');
const path = require('path');
const removeFolder = require('rimraf');
const util = require('util');

const {ReleaseBuilder} = require('./scripts/build_release_application.js');
Expand All @@ -15,8 +16,9 @@ const DEVTOOLS_DIR = path.dirname(

(async function main() {
const outputPath = path.join(__dirname, '.local-frontend');
if (!fs.existsSync(outputPath))
await util.promisify(fs.mkdir)(outputPath);
if (fs.existsSync(outputPath))
await util.promisify(removeFolder)(outputPath);
await util.promisify(fs.mkdir)(outputPath);

new ReleaseBuilder([
path.join(__dirname, 'front_end'),
Expand Down
8 changes: 3 additions & 5 deletions front_end/ndb/NdbMain.js
Expand Up @@ -469,14 +469,12 @@ Ndb.NodeProcessManager.Events = {
Detached: Symbol('detached')
};

/**
* @implements {Protocol.InspectorBackend.Connection}
*/
Ndb.NddConnection = class {
Ndb.NddConnection = class extends Protocol.InspectorBackend.Connection {
/**
* @param {!Protocol.InspectorBackend.Connection.Params} params
*/
constructor(nddService, instance, params) {
super();
this.params = params;
this._nddService = nddService;
this._instance = instance;
Expand All @@ -486,7 +484,7 @@ Ndb.NddConnection = class {
* @override
* @param {string} message
*/
sendMessage(message) {
sendRawMessage(message) {
return this._nddService.call('sendMessage', {
instanceId: this._instance.id(),
message: message
Expand Down
3 changes: 2 additions & 1 deletion lib/launcher.js
Expand Up @@ -39,7 +39,8 @@ async function launch(options) {
'--enable-features=NetworkService',
'--no-sandbox',
'-disable-web-security'
]
],
devtools: options.debugFrontend
});
restoreProcessStreams();

Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"lint": "./node_modules/.bin/eslint .",
"postinstall": "node install.js",
"prepare": "node build.js",
"dummyScriptForTest": "node -e 'console.log(239)'",
"unit": "./node_modules/mocha/bin/mocha test/test.js",
"integration": "node test/integration.js"
Expand All @@ -22,7 +22,6 @@
"license": "Apache-2.0",
"dependencies": {
"chokidar": "^2.0.4",
"chrome-devtools-frontend": "1.0.576743",
"clipboardy": "^1.2.3",
"deasync": "^0.1.13",
"fs-copy-file-sync": "^1.1.1",
Expand All @@ -40,6 +39,7 @@
"ndb-node-pty-prebuilt": "^0.8.0"
},
"devDependencies": {
"chrome-devtools-frontend": "1.0.578928",
"eslint": "^4.19.1",
"mocha": "^5.2.0"
}
Expand Down