Add `.sindriignore` when adding Sindri scripts.

pull/4512/head
Evan Sangaline 10 months ago committed by Aniket
parent 36fe74c552
commit e5742f434b
  1. 4
      libs/remix-ws-templates/src/script-templates/sindri/.sindriignore
  2. 15
      libs/remix-ws-templates/src/script-templates/sindri/index.ts

@ -0,0 +1,4 @@
# Files to exclude from Sindri circuit uploads (uses `.gitignore` syntax).
/.deps/
/scripts/
/templates/

@ -4,6 +4,21 @@ export const sindriScripts = async (plugin) => {
// @ts-ignore
(await import('!!raw-loader!./sindri.ts')).default)
// Only write out the `.sindriignore` file if it doesn't already exist.
let sindriIgnoreExists: boolean
try {
await plugin.call('fileManager', 'readFile', './.sindriignore')
sindriIgnoreExists = true
} catch {
sindriIgnoreExists = false
}
if (!sindriIgnoreExists) {
await plugin.call('fileManager', 'writeFile',
'.sindriignore',
// @ts-ignore
(await import('raw-loader!./.sindriignore')).default)
}
// Only write out the `sindri.json` file if it doesn't already exist.
let sindriJsonExists: boolean
try {

Loading…
Cancel
Save