- If the relevant QA Site post gets resolved via a public announcement and/or the inclusion of a license:
- all generated files will be included in the repo
- Docs.json may be included
- Docs.utf8.json may be included
- the contents of data-progress.md do not indicate that data generation is valid, only that it spits out something.
- If
SyntaxError: Invalid or unexpected token
occurs- Clear out previous precompiled Ajv validators
- Clear out the generated types folder
- If validation fails despite no apparent changes to the schema
- Clear out previous precompiled Ajv validators as the post-processing (conversion of custom types to regex, etc.) may have changed.
- Docker
- recommend vscode devcontainer support
- phpstorm's devcontainer support works but doesn't seem as capable
- A copy of Update 8's
Docs.json
file
- Checkout locally
- Load in devcontainer-supporting IDE
- devcontainer setup should automatically run
make install
NODE_OPTIONS
env var may require opening a fresh terminal if you receieve an error along the lines ofTypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
- devcontainer setup should automatically run
- Copy
Docs.json
to./data/update8/
- Run
make validate
- if this fails, either the
Docs.json
is wrong or the schema is out-of-date - if this succeeds, run
make generate
- if this fails, either the
- Docs.json.ts.dic can be used by JetBrains' IDEs to suppress false-positive matches in the spellchecker as a result of the contents of
Docs.json
- refer to JetBrains' own documentation for adding
.dic
files to the spell checking.
- refer to JetBrains' own documentation for adding
eslint
can result in the IDE slowing to a crawl if thegenerated-types
folder is not excluded during development.
-
run
npm install --save @satisfactory-dev/docs.json.ts
-
refer to discover-types.ts for how to generate the types & data
-
You will need to replace the usage of the
docs
helper with something like the following (where${__dirname}/data/
is the data path in your new project):const __dirname = __dirname_from_meta(import.meta); const ajv = new Ajv({ verbose: true, code: { source: true, es5: false, esm: true, optimize: true, }, }); configure_ajv(ajv); export const docs = new DocsTsGenerator({ ajv, docs_path: `${__dirname}/data/update8/Docs.json`, cache_path: `${__dirname}/data/update8/`, });
- note: this package will auto-fix issues in generated code according to eslint configs relative to the directory passed to
TypeDefinitionWriter::write()
-