d4t_formulas/.pub-cache/hosted/pub.dev/node_preamble-2.0.2
Álvaro González 1d339653d5 feat: add formula data classes with strict JSON parsing
- Add VariableSpec class with magnitude field validation
- Add Formula class supporting multiple input/output variables
- Support d4rt_code as string or object with code field
- Add comprehensive tests for parsing and serialization
- Fix broken test import in pruebas_d4rt_test.dart

Follows README.md format requirements exactly
2025-08-21 17:15:00 +02:00
..
example feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
lib feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
tool feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
CHANGELOG.md feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
LICENSE feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
package.json feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
pubspec.yaml feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
README.md feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00
yarn.lock feat: add formula data classes with strict JSON parsing 2025-08-21 17:15:00 +02:00

node_preamble.dart

A simple package for a better dart2js preamble for running on node.js. This package exists for ease of use if incorporating into your build system.

This preamble is suggested for use over d8.js, and provides many improvements and bug fixes, as it uses node.js's timer functions and event loop over the custom one implemented in d8.js.

The JavaScript file can be found at lib/preamble.js.

You can also get the preamble via Dart, like in the following example.

import "package:node_preamble/preamble.dart" as preamble;

main() {
  print(preamble.getPreamble());
}

Credit goes to the Dart team for creating Dart, dart2js, and the original preamble which this is derived from.

Contributing

The only file that we directly modify is preamble.js. After that, to reflect your changes in both preamble.dart and preamble.min.js, run npm install && npm run minify

Testing

node_preamble tries to support the following platforms. Before a pub release, the following environments should be manually tested with a sample dart2js output:

  • node
  • Webpack (easy way is with create-react-app)
  • Electron Fiddle (w/ and w/o node integration)