tauri/cli/tauri.js/api/build.js
Noah Klayman de68a86c8c Refactor tauri.js to move command code outside of bin files (#140)
* refactor(tauri.js): move command code into helpers

* reafactor(tauri.js): move command helpers to api dir

* fix(tauri.js/tests): import tauricon from proper dir

* fix(tauri.js/tests): add api dir to moduleNameMapper
2019-12-10 21:44:49 +01:00

22 lines
514 B
JavaScript

module.exports = config => {
const { tauriDir } = require('../helpers/app-paths')
const merge = require('webpack-merge')
const Runner = require('../runner')
const tauri = new Runner({ modeDir: tauriDir })
const tauriConfig = require('../helpers/tauri-config')(
merge(
{
ctx: {
prod: true
}
},
config
)
)
require('../generator').generate(tauriConfig.tauri)
require('../entry').generate(tauriDir, tauriConfig)
return tauri.build(tauriConfig)
}