mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 16:16:50 +00:00
Update spyglass to better support resource packs
This commit is contained in:
@@ -38,7 +38,8 @@ export function FileCreation({ docAndNode, gen, method }: Props) {
|
||||
return
|
||||
}
|
||||
const id = Identifier.parse(fileId.includes(':') || project.namespace === undefined ? fileId : `${project.namespace}:${fileId}`)
|
||||
const uri = `${getProjectRoot(project)}data/${id.namespace}/${genPath(gen, version)}/${id.path}.json`
|
||||
const pack = gen.tags?.includes('assets') ? 'assets' : 'data'
|
||||
const uri = `${getProjectRoot(project)}${pack}/${id.namespace}/${genPath(gen, version)}/${id.path}.json`
|
||||
Analytics.saveProjectFile(method)
|
||||
const text = docAndNode.doc.getText()
|
||||
client.fs.writeFile(uri, text).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user