Skip to content

ChildishGiant/esbuild-plugin-hjson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esbuild-plugin-hjson

An esbuild plugin to handle human json files.

Install

npm install esbuild-plugin-hjson -D
yarn add esbuild-plugin-hjson -D

Use

esbuild.config.json

const esbuild = require('esbuild')
const hjson = require('esbuild-plugin-hjson')

esbuild.build({
  bundle: true,
  entryPoints: ['main.js'],
  outfile: 'out.js',
  plugins: [
    hjson()
  ]
}).catch(() => process.exit(1))

and in your js...

const someJSON = require('example.hjson')

On build this will then be processed into machine-readable standard JSON.

About

An esbuild plugin to handle human json files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published