move config dir into src

This commit is contained in:
Mike Bloy 2024-05-19 18:44:11 -05:00
parent 2dda9d76a4
commit e92a2c3424
3 changed files with 18 additions and 16 deletions

View File

@ -3,19 +3,19 @@
// //
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import fs from 'fs-extra' import fs from 'fs-extra';
import gulp from 'gulp' import gulp from 'gulp';
import sass from 'gulp-dart-sass' import sass from 'gulp-dart-sass';
import sourcemaps from 'gulp-sourcemaps' import sourcemaps from 'gulp-sourcemaps';
import path from 'node:path' import path from 'node:path';
import buffer from 'vinyl-buffer' import buffer from 'vinyl-buffer';
import source from 'vinyl-source-stream' import source from 'vinyl-source-stream';
import yargs from 'yargs' import yargs from 'yargs';
import { hideBin } from 'yargs/helpers' import { hideBin } from 'yargs/helpers';
import rollupStream from '@rollup/stream' import rollupStream from '@rollup/stream';
import rollupConfig from './rollup.config.mjs' import rollupConfig from './rollup.config.mjs';
/********************/ /********************/
/* CONFIGURATION */ /* CONFIGURATION */
@ -27,8 +27,8 @@ const distDirectory = './dist';
const stylesDirectory = `${sourceDirectory}/styles`; const stylesDirectory = `${sourceDirectory}/styles`;
const stylesExtension = 'scss'; const stylesExtension = 'scss';
const sourceFileExtension = 'js'; const sourceFileExtension = 'js';
const staticFiles = ['assets', 'fonts', 'lang', 'templates']; const staticFiles = ['assets', 'config', 'fonts', 'lang', 'templates'];
const runtimeStaticFiles = ['packs', 'module.json'] const runtimeStaticFiles = ['packs', 'module.json'];
/********************/ /********************/
/* BUILD */ /* BUILD */
@ -136,7 +136,9 @@ function getDataPaths() {
return dataPaths.map((dataPath) => { return dataPaths.map((dataPath) => {
if (typeof dataPath !== 'string') { if (typeof dataPath !== 'string') {
throw new Error(`Property dataPath in foundryconfig.json is expected to be a string or an array of strings, but found ${dataPath}`); throw new Error(
`Property dataPath in foundryconfig.json is expected to be a string or an array of strings, but found ${dataPath}`,
);
} }
if (!fs.existsSync(path.resolve(dataPath))) { if (!fs.existsSync(path.resolve(dataPath))) {
throw new Error(`The dataPath ${dataPath} does not exist on the file system`); throw new Error(`The dataPath ${dataPath} does not exist on the file system`);