append-headers.js 520 B

123456789101112131415
  1. // Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  2. // SPDX-License-Identifier: Apache-2.0
  3. // SPDX-License-Identifier: MIT
  4. const HEADERS = `// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  5. // SPDX-License-Identifier: Apache-2.0
  6. // SPDX-License-Identifier: MIT`
  7. const fs = require('fs')
  8. for (const file of ['index.js', 'index.d.ts']) {
  9. const content = fs.readFileSync(file, 'utf8')
  10. const newContent = `${HEADERS}\n\n${content}`
  11. fs.writeFileSync(file, newContent, 'utf8')
  12. }