• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mizchi / next-editor / 1448

28 Feb 2024 12:17PM UTC coverage: 42.344% (+0.6%) from 41.712%
1448

Pull #349

circleci

web-flow
chore(deps): update babel monorepo
Pull Request #349: chore(deps): update babel monorepo

95 of 450 branches covered (21.11%)

Branch coverage included in aggregate %.

967 of 2058 relevant lines covered (46.99%)

1.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/runApp.tsx
1
// Avoid error on Octokit
2
// This caused by node process.env
3
;(process as any).browser = true
×
4

5
// normalize
6
import "normalize.css/normalize.css"
×
7

8
// global css
9
import { injectGlobal } from "styled-components"
×
10

11
// tslint:disable-next-line:no-unused-expression
12
injectGlobal`
×
13
select {
14
  font-family: monospace;
15
}
16

17
textarea:focus,
18
input:focus select:focus {
19
  outline: none;
20
}
21

22
::-webkit-scrollbar {
23
  width: 5px;
24
}
25

26
::-webkit-scrollbar-thumb {
27
  background-color: rgba(0, 0, 50, .5);
28
  border-radius: 0px;
29
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
30
}
31
`
32

33
// blueprint
34
import "@blueprintjs/core/lib/css/blueprint.css"
×
35
import "@blueprintjs/icons/lib/css/blueprint-icons.css"
×
36

37
// contextify
38
import "react-contexify/dist/ReactContexify.css"
×
39

40
import fs from "fs"
×
41
import * as git from "isomorphic-git"
×
42

43
if (process.env.NODE_ENV !== "production") {
44
  const g: any = global
×
45
  g.git = git
×
46
  g.fs = fs
×
47
}
48

49
// Runner
50
import React from "react"
×
51
import ReactDOM from "react-dom"
×
52
import { App } from "./ui/components/App"
×
53

54
export async function run(opts = {}) {
×
55
  // Run
56
  await Promise.all([setupFonts(), loadBrowserFS()])
×
57
  git.plugins.set("fs", fs)
×
58

59
  try {
60
    const {
61
      setupInitialRepository
62
    } = await import("./domain/git/commands/setupInitialRepository")
×
63
    await setupInitialRepository("/playground")
×
64
  } catch (e) {
65
    // Skip
66
    console.error("init error", e)
×
67
  }
68

69
  ReactDOM.render(<App />, document.querySelector(".root"))
×
70
}
71

72
async function setupFonts() {
73
  const font = new FontFace("Inconsolata", "url(/assets/Inconsolata.otf)")
×
74
  const loadedFace = await font.load()
×
75
  ;(document as any).fonts.add(loadedFace)
×
76
}
77

78
async function loadBrowserFS() {
79
  return new Promise(resolve => {
×
80
    const BrowserFS = require("browserfs")
×
81
    BrowserFS.install(window)
×
82
    BrowserFS.configure({ fs: "IndexedDB", options: {} }, (err: any) => {
×
83
      if (err) {
84
        throw err
×
85
      }
86

87
      resolve()
×
88
    })
89
  })
90
}
91

92
// Do not use yet
93
function loadState() {
94
  return JSON.parse((window as any).localStorage["persist:@:0"])
×
95
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc