From 4712e8b03586518fd8cc9bc127e9eb46092c1d62 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 8 Apr 2024 20:00:34 +0100 Subject: [PATCH] DEV: Convert discourse-hbr to a regular package (#26562) No need for this to be an ember addon. All we do is import `discourse-hbr/raw-handlebars-compiler` in a node environment. --- .../javascripts/discourse-hbr/addon/.gitkeep | 0 .../javascripts/discourse-hbr/app/.gitkeep | 0 .../discourse-hbr/ember-cli-build.js | 13 ------- app/assets/javascripts/discourse-hbr/index.js | 5 --- .../javascripts/discourse-hbr/package.json | 34 ++----------------- 5 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 app/assets/javascripts/discourse-hbr/addon/.gitkeep delete mode 100644 app/assets/javascripts/discourse-hbr/app/.gitkeep delete mode 100644 app/assets/javascripts/discourse-hbr/ember-cli-build.js delete mode 100644 app/assets/javascripts/discourse-hbr/index.js diff --git a/app/assets/javascripts/discourse-hbr/addon/.gitkeep b/app/assets/javascripts/discourse-hbr/addon/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/assets/javascripts/discourse-hbr/app/.gitkeep b/app/assets/javascripts/discourse-hbr/app/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/app/assets/javascripts/discourse-hbr/ember-cli-build.js b/app/assets/javascripts/discourse-hbr/ember-cli-build.js deleted file mode 100644 index d4c73d7e6ff..00000000000 --- a/app/assets/javascripts/discourse-hbr/ember-cli-build.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -const EmberAddon = require("ember-cli/lib/broccoli/ember-addon"); - -module.exports = function (defaults) { - const app = new EmberAddon(defaults, { - autoImport: { - publicAssetURL: "", - }, - }); - - return app.toTree(); -}; diff --git a/app/assets/javascripts/discourse-hbr/index.js b/app/assets/javascripts/discourse-hbr/index.js deleted file mode 100644 index c5dd687c47c..00000000000 --- a/app/assets/javascripts/discourse-hbr/index.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; - -module.exports = { - name: require("./package").name, -}; diff --git a/app/assets/javascripts/discourse-hbr/package.json b/app/assets/javascripts/discourse-hbr/package.json index 6771f7c2e91..8d099e95888 100644 --- a/app/assets/javascripts/discourse-hbr/package.json +++ b/app/assets/javascripts/discourse-hbr/package.json @@ -4,45 +4,15 @@ "description": "Support for Discourse's raw Handlebars templates (hbr)", "author": "Discourse", "license": "GPL-2.0-only", - "keywords": [ - "ember-addon" - ], - "scripts": { - "build": "ember build", - "lint:hbs": "ember-template-lint .", - "lint:js": "eslint .", - "start": "ember serve" - }, "dependencies": { - "@babel/core": "^7.24.4", - "ember-auto-import": "^2.7.2", - "ember-cli-babel": "^8.2.0", - "ember-cli-htmlbars": "^6.3.0", "handlebars": "^4.7.8" }, - "devDependencies": { - "@ember/optional-features": "^2.1.0", - "@embroider/test-setup": "^3.0.3", - "@glimmer/component": "^1.1.2", - "broccoli-asset-rev": "^3.0.0", - "ember-cli": "~5.7.0", - "ember-cli-inject-live-reload": "^2.1.0", - "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.2", - "ember-disable-prototype-extensions": "^1.1.3", - "ember-load-initializers": "^2.1.1", - "ember-resolver": "^11.0.1", - "ember-source": "~5.5.0", - "ember-source-channel-url": "^3.0.0", - "loader.js": "^4.7.0", - "webpack": "^5.91.0" - }, "engines": { "node": ">= 18", "npm": "please-use-yarn", "yarn": ">= 1.21.1" }, - "ember": { - "edition": "default" + "exports": { + "./raw-handlebars-compiler": "./raw-handlebars-compiler.js" } }