Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #234 from glimmerjs/remove-compiler-from-runtime
Browse files Browse the repository at this point in the history
[BUGFIX REGRESSION] Remove compile time functionality from runtime code
  • Loading branch information
Chris Garrett authored Feb 3, 2020
2 parents 433fe56 + 6ec10e1 commit 980a02a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion packages/@glimmer/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"dist"
],
"dependencies": {
"@glimmer/compiler": "^0.44.0",
"@glimmer/component": "^1.0.0",
"@glimmer/di": "^0.1.9",
"@glimmer/env": "^0.1.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ import {
} from '@glimmer/interfaces';
import { Owner } from '@glimmer/di';
import { expect } from '@glimmer/util';
import { TemplateFactory, templateFactory } from '@glimmer/opcode-compiler';
import { PrecompileOptions, precompile } from '@glimmer/compiler';
import { templateFactory } from '@glimmer/opcode-compiler';

import { TypedRegistry } from './typed-registry';
import { HelperReference } from '../../helpers/user-helper';
import { getManager } from '../../components/utils';
import { CustomComponentDefinition, ManagerDelegate, ComponentFactory } from '../../components/component-managers/custom';
import {
CustomComponentDefinition,
ManagerDelegate,
ComponentFactory,
} from '../../components/component-managers/custom';
import { TemplateOnlyComponentDefinition } from '../../components/component-managers/template-only';

export type UserHelper = (args: ReadonlyArray<unknown>, named: Dict<unknown>) => unknown;
Expand Down Expand Up @@ -243,13 +246,3 @@ export function createJitComponentDefinition(
template
);
}

export function createTemplate<Locator>(
templateSource: string,
options?: PrecompileOptions
): TemplateFactory<Locator> {
let wrapper: SerializedTemplateWithLazyBlock<Locator> = JSON.parse(
precompile(templateSource, options)
);
return templateFactory<Locator>(wrapper);
}

0 comments on commit 980a02a

Please sign in to comment.