UNPKG

@communities-webruntime/services

Version:

If you would like to run Lightning Web Runtime without the CLI, we expose some of our programmatic APIs available in Node.js. If you're looking for the CLI documentation [you can find that here](https://www.npmjs.com/package/@communities-webruntime/cli).

21 lines 808 B
/** @hidden */ /** * Copyright (c) 2019, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: MIT * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT */ import { assert } from '../utils/assert.js'; import { checkDirsExist, checkFilesOrJsonObjectExist } from '../utils/preconditions.js'; /** * Make sure all the context values are valid. */ function validateContext({ templateDir, srcDir, routes, theme, basePath }) { checkDirsExist({ templateDir, srcDir }); checkFilesOrJsonObjectExist({ routes, theme }); if (basePath) { assert(basePath.length === 0 || basePath.startsWith('/'), `Base path does not start with a "/": ${basePath}`); } } export { validateContext }; //# sourceMappingURL=context-validate.js.map