Fix #394: rename generated source .name.generated.ext

This commit is contained in:
Oliver Blanthorn 2018-04-22 17:15:40 +01:00
parent f8dfb7addb
commit fad7851829
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
9 changed files with 14 additions and 11 deletions

4
.gitignore vendored
View file

@ -1,8 +1,8 @@
AMOKEYS
build
node_modules
src/excmds_background.ts
src/excmds_content.ts
src/.excmds_background.generated.ts
src/.excmds_content.generated.ts
src/grammars/*.ts
generated
web-ext-artifacts

View file

@ -12,7 +12,7 @@ scripts/excmds_macros.py
scripts/newtab.md.sh
scripts/make_tutorial.sh
scripts/make_docs.sh &
nearleyc src/grammars/bracketexpr.ne > src/grammars/bracketexpr.ts
nearleyc src/grammars/bracketexpr.ne > src/grammars/.bracketexpr.generated.ts
(webpack --display errors-only && scripts/git_version.sh)&

View file

@ -162,7 +162,7 @@ def main():
else:
output += line
# print(output.rstrip())
with open("src/excmds_{context}.ts".format(**locals()), "w") as sink:
with open("src/.excmds_{context}.generated.ts".format(**locals()), "w") as sink:
print(output.rstrip(), file=sink)

View file

@ -15,7 +15,7 @@ CommandLine.onLine.addListener(Controller.acceptExCmd)
// Add various useful modules to the window for debugging
import * as messaging from "./messaging"
import * as excmds from "./excmds_background"
import * as excmds from "./.excmds_background.generated"
import * as commandline_background from "./commandline_background"
import * as controller from "./controller"
import * as convert from "./convert"

View file

@ -16,7 +16,7 @@ import * as commandline_content from "./commandline_content"
import * as convert from "./convert"
import * as config from "./config"
import * as dom from "./dom"
import * as excmds from "./excmds_content"
import * as excmds from "./.excmds_content.generated"
import * as hinting_content from "./hinting"
import * as finding_content from "./finding"
import * as itertools from "./itertools"

View file

@ -2,7 +2,7 @@ import { MsgSafeKeyboardEvent, MsgSafeNode } from "./msgsafe"
import { isTextEditable } from "./dom"
import { isSimpleKey } from "./keyseq"
import state from "./state"
import { repeat } from "./excmds_background"
import { repeat } from "./.excmds_background.generated"
import Logger from "./logging"
import { parser as exmode_parser } from "./parsers/exmode"

View file

@ -100,7 +100,7 @@ import Mark from "mark.js"
//#content_helper
// {
import "./number.clamp"
import * as SELF from "./excmds_content"
import * as SELF from "./.excmds_content.generated"
Messaging.addListener("excmd_content", Messaging.attributeCaller(SELF))
import * as DOM from "./dom"
import { executeWithoutCommandLine } from "./commandline_content"

View file

@ -23,7 +23,7 @@
/** */
import { find, izip } from "./itertools"
import { Parser } from "./nearley_utils"
import * as bracketexpr_grammar from "./grammars/bracketexpr"
import * as bracketexpr_grammar from "./grammars/.bracketexpr.generated"
const bracketexpr_parser = new Parser(bracketexpr_grammar)
// {{{ General types
@ -124,7 +124,10 @@ export function parse(keyseq: KeyEventLike[], map: KeyMap): ParserResponse {
// Check if any of the mappings is a perfect match (this will only
// happen if some sequences in the KeyMap are prefixes of other seqs).
try {
let perfect = find(possibleMappings, ([k, v]) => k.length === keyseq.length)
let perfect = find(
possibleMappings,
([k, v]) => k.length === keyseq.length,
)
return { value: perfect[1], isMatch: true }
} catch (e) {
if (!(e instanceof RangeError)) throw e

View file

@ -1,6 +1,6 @@
/** Ex Mode (AKA cmd mode) */
import * as ExCmds from "../excmds_background"
import * as ExCmds from "../.excmds_background.generated"
import * as convert from "../convert"
import * as Config from "../config"
import * as aliases from "../aliases"