From 51e1885f1990a7287781320b3b889f371c6d2cbd Mon Sep 17 00:00:00 2001 From: zodern Date: Sun, 7 Jun 2020 20:06:29 -0500 Subject: [PATCH] Publish zodern:hot@0.1.0 --- packages/hot/README.md | 3 +++ packages/hot/package.js | 17 +++++------------ packages/hot/plugin.js | 10 +++++++--- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 packages/hot/README.md diff --git a/packages/hot/README.md b/packages/hot/README.md new file mode 100644 index 0000000000..d86dad6ddd --- /dev/null +++ b/packages/hot/README.md @@ -0,0 +1,3 @@ +# zodern:hot + +Adds Hot Module Reloading. Learn more at [https://github.com/zodern/comet](https://github.com/zodern/comet). diff --git a/packages/hot/package.js b/packages/hot/package.js index 7d4a94335e..dc2eef0f05 100644 --- a/packages/hot/package.js +++ b/packages/hot/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'zodern:hot', - version: '0.1.1', + version: '0.1.0', summary: 'Adds Hot Module Reloading to Meteor', documentation: 'README.md' }); @@ -8,28 +8,21 @@ Package.describe({ Package.registerBuildPlugin({ name: 'hot-core', sources: ['plugin.js'], - use: ['ecmascript'], + use: ['ecmascript@0.14.3'], npmDependencies: { ws: '7.2.5' }, }); Package.onUse(function (api) { + api.versionsFrom('1.10'); + api.use('isobuild:compiler-plugin@1.0.0'); api.use('babel-compiler'); api.use('modules'); - api.imply('zodern:modules-runtime-hot'); + api.imply('zodern:modules-runtime-hot@0.12.0'); api.addFiles('./client.js', 'client'); }); Package.onTest(function (api) { - api.use(["tinytest", "underscore"]); - api.use(["es5-shim", "ecmascript", "babel-compiler"]); - api.addFiles("runtime-tests.js"); - api.addFiles("transpilation-tests.js", "server"); - - api.addFiles("bare-test.js"); - api.addFiles("bare-test-file.js", ["client", "server"], { - bare: true - }); }); diff --git a/packages/hot/plugin.js b/packages/hot/plugin.js index d599998498..e7f8857a07 100644 --- a/packages/hot/plugin.js +++ b/packages/hot/plugin.js @@ -107,9 +107,13 @@ function init() { }); }); - Plugin._onPreLinked(function (prelinkResult) { - sharedState.prelinkResultHandler(prelinkResult); - }); + if (Plugin._onPreLinked) { + Plugin._onPreLinked(function (prelinkResult) { + sharedState.prelinkResultHandler(prelinkResult); + }); + } else { + console.log('zodern:COMET is required for HMR: https://github.com/zodern/comet'); + } } if (!sharedState.initialized) {