mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) freshen grist-core build
Summary: * adds a smoke test to grist-core * fixes a problem with highlight.js failing to load correctly * skips survey for default user * freshens docker build Utility files in test/nbrowser are moved to core/test/nbrowser, so that gristUtils are available there. This increased the apparent size of the diff as "./" import paths needed replacing with "test/nbrowser/" paths. The utility files are untouched, except for the code to start a server - it now has a small grist-core specific conditional in it. Test Plan: adds test Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2768
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
* By default, starts up on port 8484.
|
||||
*/
|
||||
|
||||
import {isAffirmative} from 'app/common/gutil';
|
||||
|
||||
const debugging = isAffirmative(process.env.DEBUG) || isAffirmative(process.env.VERBOSE);
|
||||
|
||||
// Set log levels before importing anything.
|
||||
if (!process.env.DEBUG) {
|
||||
if (!debugging) {
|
||||
// Be a lot less noisy by default.
|
||||
setDefaultEnv('GRIST_LOG_LEVEL', 'error');
|
||||
setDefaultEnv('GRIST_LOG_SKIP_HTTP', 'true');
|
||||
@@ -32,7 +36,7 @@ function setDefaultEnv(name: string, value: string) {
|
||||
// tslint:disable:no-console
|
||||
export async function main() {
|
||||
console.log('Welcome to Grist.');
|
||||
if (!process.env.DEBUG) {
|
||||
if (!debugging) {
|
||||
console.log(`In quiet mode, see http://localhost:${G.port} to use.`);
|
||||
console.log('For full logs, re-run with DEBUG=1');
|
||||
}
|
||||
@@ -45,7 +49,10 @@ export async function main() {
|
||||
// Make a blank db if needed.
|
||||
await updateDb();
|
||||
// Launch single-port, self-contained version of Grist.
|
||||
await mergedServerMain(G.port, ["home", "docs", "static"]);
|
||||
const server = await mergedServerMain(G.port, ["home", "docs", "static"]);
|
||||
if (process.env.GRIST_TESTING_SOCKET) {
|
||||
await server.addTestingHooks();
|
||||
}
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
|
||||
Reference in New Issue
Block a user