mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
* chore(monorepo): cleanup * fix(tauri-cli): build errors * fix(tauri:build.rs): dont' panic if env missing * fix(finalize): setup for crates * npm publish on release actual publish currently disabled * cargo publish on release actual publish currently disabled * update PR tests for new folder structure * doesn't like the period on job name? * fail on cargo warnings otherwise we would assume green arrow is all good * green on warnings for now
16 lines
536 B
JavaScript
16 lines
536 B
JavaScript
const compileTemplate = require('lodash.template')
|
|
const { readFileSync, writeFileSync, ensureDir } = require('fs-extra')
|
|
const path = require('path')
|
|
|
|
module.exports.generate = (outDir, cfg) => {
|
|
// this MUST be from the templates repo
|
|
const apiTemplate = readFileSync(path.resolve(__dirname, '../lib/tauri.js'), 'utf-8')
|
|
const apiContent = compileTemplate(apiTemplate)({
|
|
...cfg,
|
|
confName: 'tauri.conf.js'
|
|
})
|
|
ensureDir(outDir).then(() => {
|
|
writeFileSync(path.join(outDir, 'tauri.js'), apiContent, 'utf-8')
|
|
})
|
|
}
|