### Install Dependencies Source: https://github.com/ember-cli/ember-template-imports/blob/master/CONTRIBUTING.md Clone the repository and install project dependencies using pnpm. ```bash git clone cd ember-template-imports pnpm install ``` -------------------------------- ### Install Glint and Environment Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/errors.md Install the necessary Glint packages to enable type checking for .gts files. This is required when using TypeScript with Glint. ```bash npm install --save-dev @glint/core @glint/environment-ember-template-imports ``` -------------------------------- ### Example Usage of PreprocessorOptions Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/types.md An example of how to enable inline source maps when adding the TemplateImportPreprocessor to the Ember CLI registry. ```javascript registry.add('js', new TemplateImportPreprocessor({ inline_source_map: true })); ``` -------------------------------- ### Example of Adding Babel Plugin Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/types.md Shows how to push a Babel plugin configuration, including the plugin path and options, into the babelPlugins array. ```javascript babelPlugins.push([babelPluginPath, { v: 1, root }]); ``` -------------------------------- ### Install ember-template-imports with Yarn Source: https://github.com/ember-cli/ember-template-imports/blob/master/README.md Installs the ember-template-imports package and the supporting Prettier plugin using Yarn. ```sh yarn add --dev ember-template-imports prettier-plugin-ember-template-tag ``` -------------------------------- ### Install ember-template-imports with npm Source: https://github.com/ember-cli/ember-template-imports/blob/master/README.md Installs the ember-template-imports package and the supporting Prettier plugin using npm. ```sh npm add --save-dev ember-template-imports prettier-plugin-ember-template-tag ``` -------------------------------- ### Example Input File for Template-Only Component Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/api-reference/babel-plugin.md Shows the structure of an input .gjs file containing template-only components before Babel processing. ```gjs import Component from '@glimmer/component'; export const Greeting = export class GreetingClass extends Component { } ``` -------------------------------- ### Example Usage of ContentTagProcessorOptions Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/types.md Demonstrates passing options, including filename and inline_source_map, to the content-tag processor during file transformation. ```javascript this.#processor.process(string, { filename: relativePath, inline_source_map: this.#inline_source_map }) ``` -------------------------------- ### Install ember-template-imports with pnpm Source: https://github.com/ember-cli/ember-template-imports/blob/master/README.md Installs the ember-template-imports package and the supporting Prettier plugin using pnpm. ```sh pnpm add --save-dev ember-template-imports prettier-plugin-ember-template-tag ``` -------------------------------- ### Define and Use Local Components Source: https://github.com/ember-cli/ember-template-imports/blob/master/README.md This example demonstrates defining components that are only used within the same file. The 'Option' component is used internally by 'CustomSelect'. ```gjs const Option = ; export const CustomSelect = ; ``` -------------------------------- ### Dependency Hierarchy Example Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/api-reference/README.md Illustrates the dependency structure of the ember-template-imports addon, showing the entry point and its direct and indirect dependencies. ```plaintext ember-addon-main.js (entry point) ├── Version checking (ember-cli-version-checker) ├── Babel plugin registration │ └── src/babel-plugin.js └── Preprocessor registration └── src/preprocessor-plugin.js ├── content-tag (template transformation) └── broccoli-stew (tree manipulation) ``` -------------------------------- ### Glimmer Component Input (.gjs) Source: https://github.com/ember-cli/ember-template-imports/blob/master/_autodocs/README.md Example of a Glimmer component defined in a .gjs file using the