Project Configuration

You can configure project with package.json

{
"name": "my-project",
"dependencies": {
"@niklauslee/ssd1306": "1.0.0"
},
"main": "index.js"
"entry": ["example.js", "test.js"],
"bundle": {
"mode": "development"
}
}
  • name <string> Project name.

  • dependencies <Object<string,string>> Module dependencies with module name and version like "@owner/package": "1.0.0".

  • main <string> The entry point of the module. The file specified by this property is loaded when this module is imported by require() form other products. Default: index.js.

  • entry <string|Array<string>> The entry point to bundle, upload and run. The file specified by this property is bundled and uploaded to the connected device when you press upload button. If entry point is an array, then you can select one of them to upload. This is useful when you are writing a library to be used by other projects. In this case, you can write one or more examples to use this library without creating other projects. Default: index.js.

  • bundle <object> Configuration for code bundling.

    • mode <string> Bundling mode is development or production. In development mode, the code is bundled as-is (not minified) so it is readable and and easier to debug. Whereas in production mode, the bundled code is minified so it is smaller and faster but not useful for debugging. Default: development.

‚Äč