tauri/packages/cli/append-headers.js
Amr Bashir 62b52f60a2
fix(cli/add): use >= for npm and ~ for other package managers (#11064)
* fix(cli/add): use `>=` for npm and `~` for other package managers

closes #10906

* headers

* fix audit

* fix headers
2024-09-19 23:11:40 +03:00

16 lines
520 B
JavaScript

// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
const HEADERS = `// Copyright 2019-2024 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT`
const fs = require('fs')
for (const file of ['index.js', 'index.d.ts']) {
const content = fs.readFileSync(file, 'utf8')
const newContent = `${HEADERS}\n\n${content}`
fs.writeFileSync(file, newContent, 'utf8')
}