Update README

This commit is contained in:
Nick Playfair 2025-06-13 19:37:10 +01:00
parent 55127056e9
commit 2b38c1256b

View File

@ -5,10 +5,12 @@
**This is still being developed and isn't ready for production!** **This is still being developed and isn't ready for production!**
Only tested with gerbers generated by EAGLE. Only tested with gerbers generated by EAGLE.
Requires node version 10 or higher. node version 20 or higher recommended.
## Usage ## Usage
### Save a PNG file ### Save a PNG file
``` ```
const { ImageGenerator } = require('@nplayfair/npe_gerber'); const { ImageGenerator } = require('@nplayfair/npe_gerber');
@ -41,7 +43,9 @@ fileProc.gerberToImage(gerberArchive)
console.log(`Generated image ${filename}`); console.log(`Generated image ${filename}`);
}) })
``` ```
### Return a PNG stream ### Return a PNG stream
``` ```
const { ImageGenerator } = require('@nplayfair/npe_gerber'); const { ImageGenerator } = require('@nplayfair/npe_gerber');
@ -74,6 +78,7 @@ fileProc.gerberToStream(gerberArchive)
// Do something with the stream // Do something with the stream
}) })
``` ```
## Layer Names ## Layer Names
The constructor must be passed an array of filenames that correspond to the layers in the gerber archives you expect to be uploaded. The example above shows which names are used by EAGLE but other applications may use different filenames. The constructor must be passed an array of filenames that correspond to the layers in the gerber archives you expect to be uploaded. The example above shows which names are used by EAGLE but other applications may use different filenames.