Browse Source

Attempt N to fix templating under yarn2nix

master
Sven Slootweg 2 years ago
parent
commit
789e91e242
3 changed files with 11 additions and 2 deletions
  1. +9
    -1
      bin/matrix-rooms
  2. +1
    -0
      package.json
  3. +1
    -1
      yarn.lock

+ 9
- 1
bin/matrix-rooms View File

@ -13,6 +13,14 @@ const bhttp = require("bhttp");
const createError = require("create-error");
const { ValidationError, validateValue, required, isString } = require("validatem");
require('@babel/register')({
extensions: [".jsx"],
presets: [
require.resolve("@babel/preset-react"),
[require.resolve("@babel/preset-env"), { targets: { node: "current" } }]
]
});
let UpstreamError = createError("UpstreamError");
function generateSince(hostname, token) {
@ -26,7 +34,7 @@ let app = express();
app.set("views", path.join(__dirname, "../views"));
app.set("view engine", "jsx");
app.engine("jsx", expressReactViews.createEngine());
app.engine("jsx", expressReactViews.createEngine({ transformViews: false }));
app.use(express.static(path.join(__dirname, "../public")));


+ 1
- 0
package.json View File

@ -12,6 +12,7 @@
"@babel/plugin-transform-flow-strip-types": "^7.4.4",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"@joepie91/express-react-views": "^1.0.1",
"@modular-matrix/autodiscover-client-configuration": "^1.0.0",
"bhttp": "^1.2.4",


+ 1
- 1
yarn.lock View File

@ -678,7 +678,7 @@
"@babel/plugin-transform-react-jsx-self" "^7.0.0"
"@babel/plugin-transform-react-jsx-source" "^7.0.0"
"@babel/register@^7.0.0":
"@babel/register@^7.0.0", "@babel/register@^7.5.5":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.5.5.tgz#40fe0d474c8c8587b28d6ae18a03eddad3dac3c1"
integrity sha512-pdd5nNR+g2qDkXZlW1yRCWFlNrAn2PPdnZUB72zjX4l1Vv4fMRRLwyf+n/idFCLI1UgVGboUU8oVziwTBiyNKQ==


Loading…
Cancel
Save