c697eb1086
It appears that including the build script as a dependency is not enough to make the file available at runtime, so the build breaks if ts/ is built first.
13 lines
440 B
Rust
13 lines
440 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use std::{env, fs, path::Path};
|
|
|
|
pub fn main() {
|
|
let args: Vec<_> = env::args().collect();
|
|
let target_file = Path::new(args.get(1).expect("output path not provided"));
|
|
let strings_json = include_str!(concat!(env!("OUT_DIR"), "/strings.json"));
|
|
|
|
fs::write(target_file, strings_json).unwrap();
|
|
}
|