p-hatan/ mirror

pub repository

mirror.p-hatan.ir

node_preamble

1.3.0

Better node.js preamble for dart2js, use it in your build system.

Download archive

Readme

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.

Changelog

1.3.0

  • Add minified versions of the preamble accessible as lib/preamble.min.js and by calling getPreamble(minified: true).

1.2.0

  • Prevent encapsulation, global.self = global (old) vs. var self = Object.create(global) (new).

1.1.0

  • Set global.location so that Uri.base() works properly on Windows in most cases.

  • Define global.exports so that it's visible to the compiled JS.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add node_preamble
pubspec.yaml
name: node_preamble
author: Michael Bullington <mikebullingtn@gmail.com>
homepage: https://github.com/mbullington/node_preamble.dart
version: 1.3.0
description: Better node.js preamble for dart2js, use it in your build system.

dev_dependencies:
  http: '^0.11.0'

Version history

VersionPublishedArchiveSHA-256
1.0.02015-08-24T03:09:46.852ZDownload1d7c0be1df059b95e11b2c0571cc02e3753a7a114f61ca240d629072d7777b74
1.1.02016-12-02T23:19:32.674ZDownload078cdd99bcd7f020810c2f5e0477ce9438f0ba4e0d80f4af11591244b38e76ef
1.2.02016-12-03T00:09:08.131ZDownload970006d1e5dc58358eeee768c44adacbcaae3c5fb4a8a2be2ce4d7ee4584a0a2
1.3.02017-03-12T00:04:23.667ZDownload5873b9fef32b99c815be4e567172818dd5bc50970fd0b8610fa644e34913f332
1.4.02017-06-30T16:15:07.531732ZDownload480628b8063ea75023203641462c2a24ffa7ecf20960877f5df7740d36ce8698
1.4.12018-04-25T22:58:40.162326ZDownload427980a413a23c85361eb1acbf968973bf145a7633b5ce55c18edbe6605fc89f
1.4.22018-05-25T23:36:58.798725ZDownload3a3be084f2758ebc578bf0547d96cdb0fbda14024ab7ebf40535a60bf7cf0aeb
1.4.32018-07-01T06:29:13.490888ZDownload4ca69f92864e1afdf51785d32fd7edec524f8d11690a140c404f2eeef4c4b6c0
1.4.42018-07-24T17:32:40.272250ZDownloadba9c0e22dd12237f404a7c965951d2c69ae78e529ae9a4fa6aa2a2417163f52f
1.4.52019-07-22T07:03:33.036072ZDownloadc10e8a5aa518d87e16161544c855ada8963ec0f8f90397e8ed026db01df99727
1.4.62019-07-27T23:37:08.146920ZDownload4fecbfadaffde1bf075aeb3d615482e19a58f7b98c94586405e1a368008f979c
1.4.72019-09-04T01:49:39.603846ZDownload767ef8efc9ae106ff2c9f5d07f3bc56ab976a22c43524136c051ec5290aa9f24
1.4.82019-09-10T21:05:02.061256ZDownload2c4565b1d416fc68935b1bb5d5e8fbed843d828ef26244cd14b2ea267b745064
1.4.92020-05-23T22:37:36.388205ZDownload1d0bad4d4fa4e385cecb7c9c8c7fa6e6f7b0ed15029216c9707374eef314f1f9
1.4.102020-06-03T04:15:49.662522ZDownload2c001095d140de1f49ec0a75a3861557f56e39eeea7674ffbc4f5c2b9a803804
1.4.112020-06-10T05:48:15.834539ZDownloadda2cfccc846e5bc61c343faa6bc3c452065ff876cb2cb253f375a0c643ae13d2
1.4.122020-06-10T05:50:31.407053ZDownload19fbcd082b2ca6ca7874571e11120d025134995103e0ff3905666779048ad893
1.4.132021-01-25T03:30:40.194877ZDownload847d2400938dd2594b4617244c4a9d477e939d0e134746ae88d9497e0ecb0a71
2.0.02021-03-03T18:32:55.343147ZDownloadc133f761a6a790d0b000efa4f74eae9700bb6e9e9f5e996f0e8d6fe92703ced6
2.0.12021-06-16T04:02:03.443896ZDownload8ebdbaa3b96d5285d068f80772390d27c21e1fa10fb2df6627b1b9415043608d
2.0.22023-03-01T06:25:31.131415ZDownload6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db

Dependencies

No direct dependencies declared.