firescript-config

Config module for Firescript

Usage no npm install needed!

<script type="module">
  import firescriptConfig from 'https://cdn.skypack.dev/firescript-config';
</script>

README

Firescript config

Firescript config module.

Usage

import { FirescriptConfig } from 'firescript-config'

const config = new FirescriptConfig({
  srcDir: `${process.cwd()}/src/`,
  destDir: `${process.cwd()}/dist/`
})


Methods

loadConfig([str filename]) => obj config

Load config from a config file

const config = await config.loadConfig()
console.log('Config:', config)

Arguments:

Name: Flags: Description:
filename optional Load config from a file

Returns:

Returns an instance of FirescriptConfig

Config parameters

Name: Config param: Default value: Description:
srcDir build.src src/ Project source dir
destDir build.dist dist/ Project destination dir
copyFiles build.copy [] Copy files from srcDir or projectRoot to destionation. The parser looks for files in the source dir first, if no file was fount it looks into the projectRoot. You can omit this behavior by adding $ROOT/ as a prefix to the path.