-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use packaging on the editor frontend to reduce distribution size.
- Loading branch information
Showing
5 changed files
with
359 additions
and
38 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
'use strict'; | ||
|
||
const PARCEL_PORT = 1234; | ||
const API_PORT = 1235; | ||
|
||
const showEditor = async (commandLine, executeCommands) => { | ||
throw new Error('Not supported.'); | ||
/* | ||
const { Parcel } = require('@parcel/core'); | ||
const { openInBrowser } = require('@parcel/utils'); | ||
const { normalize } = require('path'); | ||
const { startBackend } = require('./back/backend'); | ||
startBackend(commandLine, API_PORT); | ||
let bundler = new Parcel({ | ||
entries: normalize(__dirname + '/front/index.html'), | ||
defaultConfig: '@parcel/config-default', | ||
shouldAutoInstall: true, | ||
serveOptions: { | ||
port: PARCEL_PORT | ||
}, | ||
hmrOptions: { | ||
port: PARCEL_PORT | ||
} | ||
}); | ||
await bundler.watch(); | ||
console.log(`Frontend running on port ${PARCEL_PORT}`); | ||
if (commandLine.openBrowser) { | ||
openInBrowser(`http://localhost:${PARCEL_PORT}/`); | ||
} | ||
*/ | ||
}; | ||
|
||
module.exports = { showEditor }; |
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
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
Oops, something went wrong.