Skip to content

Commit

Permalink
Merge pull request #1546 from NullVoxPopuli/content-tag-test-non-mono…
Browse files Browse the repository at this point in the history
…repo-dist

content-tag PR embroider-build/content-tag#44
  • Loading branch information
NullVoxPopuli authored Dec 14, 2023
2 parents f40928b + 736e984 commit 9915dd9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions packages/ember-repl/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"scripts": {
"build": "concurrently 'npm:build:*'",
"build:js": "rollup --config",
"build:types": "tsc --emitDeclarationOnly --noEmit false",
"lint:types": "tsc --noEmit",
"lint:fix": "pnpm -w exec lint fix",
"start": "rollup --config --watch",
Expand All @@ -72,7 +71,8 @@
"lint:hbs": "pnpm -w exec lint hbs",
"lint:hbs:fix": "pnpm -w exec lint hbs:fix",
"lint:prettier:fix": "pnpm -w exec lint prettier:fix",
"lint:prettier": "pnpm -w exec lint prettier"
"lint:prettier": "pnpm -w exec lint prettier",
"build:types": "tsc --emitDeclarationOnly --noEmit false"
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.22.5",
Expand All @@ -84,7 +84,7 @@
"broccoli-file-creator": "^2.1.1",
"change-case": "^5.3.0",
"common-tags": "^1.8.2",
"content-tag": "github:NullVoxPopuli/content-tag#browser-support-dist",
"content-tag": "^1.2.1",
"line-column": "^1.0.2",
"magic-string": "^0.30.5",
"mdast": "^3.0.0",
Expand Down
12 changes: 7 additions & 5 deletions packages/ember-repl/addon/src/browser/gjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import type { Babel } from './types.ts';

const compiler = importSync('ember-source/dist/ember-template-compiler.js');

import { createPreprocessor } from 'content-tag/standalone';

let processor;
let processor: any;
let fetchingPromise: Promise<any>;

export async function preprocess(input: string, name: string): Promise<string> {
if (!fetchingPromise) {
fetchingPromise = createPreprocessor();
fetchingPromise = import('content-tag');
}

processor = await fetchingPromise;
if (!processor) {
let { Preprocessor } = await fetchingPromise;

processor = new Preprocessor();
}

return processor.process(input, `${name}.js`);
}
Expand Down
16 changes: 7 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9915dd9

Please sign in to comment.