move config dir into src
This commit is contained in:
parent
2dda9d76a4
commit
e92a2c3424
34
gulpfile.mjs
34
gulpfile.mjs
@ -3,19 +3,19 @@
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import fs from 'fs-extra'
|
||||
import gulp from 'gulp'
|
||||
import sass from 'gulp-dart-sass'
|
||||
import sourcemaps from 'gulp-sourcemaps'
|
||||
import path from 'node:path'
|
||||
import buffer from 'vinyl-buffer'
|
||||
import source from 'vinyl-source-stream'
|
||||
import yargs from 'yargs'
|
||||
import { hideBin } from 'yargs/helpers'
|
||||
import fs from 'fs-extra';
|
||||
import gulp from 'gulp';
|
||||
import sass from 'gulp-dart-sass';
|
||||
import sourcemaps from 'gulp-sourcemaps';
|
||||
import path from 'node:path';
|
||||
import buffer from 'vinyl-buffer';
|
||||
import source from 'vinyl-source-stream';
|
||||
import yargs from 'yargs';
|
||||
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 */
|
||||
@ -27,8 +27,8 @@ const distDirectory = './dist';
|
||||
const stylesDirectory = `${sourceDirectory}/styles`;
|
||||
const stylesExtension = 'scss';
|
||||
const sourceFileExtension = 'js';
|
||||
const staticFiles = ['assets', 'fonts', 'lang', 'templates'];
|
||||
const runtimeStaticFiles = ['packs', 'module.json']
|
||||
const staticFiles = ['assets', 'config', 'fonts', 'lang', 'templates'];
|
||||
const runtimeStaticFiles = ['packs', 'module.json'];
|
||||
|
||||
/********************/
|
||||
/* BUILD */
|
||||
@ -40,7 +40,7 @@ let cache;
|
||||
* Build the distributable JavaScript code
|
||||
*/
|
||||
function buildCode() {
|
||||
return rollupStream({...rollupConfig(), cache })
|
||||
return rollupStream({ ...rollupConfig(), cache })
|
||||
.on('bundle', (bundle) => {
|
||||
cache = bundle;
|
||||
})
|
||||
@ -135,8 +135,10 @@ function getDataPaths() {
|
||||
const dataPaths = Array.isArray(dataPath) ? dataPath : [dataPath];
|
||||
|
||||
return dataPaths.map((dataPath) => {
|
||||
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}`);
|
||||
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}`,
|
||||
);
|
||||
}
|
||||
if (!fs.existsSync(path.resolve(dataPath))) {
|
||||
throw new Error(`The dataPath ${dataPath} does not exist on the file system`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user