@knapsack/app
Version:
Build Design Systems on top of knapsack, by Basalt
50 lines (40 loc) • 1.43 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Navs = void 0;
var _path = require("path");
var _fileDb = require("./dbs/file-db");
var _schemaKnapsackNavsConfig = _interopRequireDefault(require("../json-schemas/schemaKnapsackNavsConfig"));
/**
* Copyright (C) 2018 Basalt
This file is part of Knapsack.
Knapsack is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
Knapsack is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with Knapsack; if not, see <https://www.gnu.org/licenses>.
*/
class Navs extends _fileDb.FileDb2 {
constructor({
dataDir
}) {
const defaults = {
primary: [],
secondary: []
};
super({
filePath: (0, _path.join)(dataDir, 'knapsack.navs.json'),
defaults,
type: 'json',
validationSchema: _schemaKnapsackNavsConfig.default
});
}
}
exports.Navs = Navs;