articy-xlsx-loader
v0.2.0
Published
Processes xlsx localization files from Articy into JSON objects mapping LocIDs to string values.
Downloads
3
Readme
articy-xlsx-loader
Webpack loader to convert .xlsx
localization files exported by Articy and convert them into JS objects mapping localization IDs to localized strings.
Meant to be used with Articy Node.
Install
npm install --save-dev articy-xlsx-loader
yarn add -D articy-xlsx-loader
Usage
Add a rule to your webpack config.
module.exports = {
module: {
rules: [
{ test: /\xlsx$/, loader: "articy-xlsx-loader" }
]
}
}
You can then pass the imported JSON object into the Localization
class in articy-node
.
import { Database } from "articy-node";
// Import Articy JSON data
import GameData from "./exported.articy.json";
// Create a new database
const GameDB = new Database(GameData);
// Add localization data
GameDB.localization.add('en', require('./loc_All objects_en.xlsx'));