Skip to content

Commit

Permalink
feat(generator): adjust relative path imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Sep 6, 2023
1 parent 06dca22 commit ef9e800
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/generator/templates/api-index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
GoogleConfigurable
} from 'googleapis-common';
{% for versionName, version in api %}
import { {{ name }}_{{ version|replace('.','_') }} } from './{{ version }}';
import { {{ name }}_{{ version|replace('.','_') }} } from './{{ version }}.js';
{% endfor %}

export const VERSIONS = {
Expand Down
4 changes: 2 additions & 2 deletions src/generator/templates/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/*! THIS FILE IS AUTO-GENERATED */

{% for apiName, api in apis %}
import {
import {
VERSIONS as {{apiName}}Versions,
{{apiName}}
} from './{{ apiName }}';
} from './{{ apiName }}/index.js';
{% endfor %}

export interface APIList {
Expand Down
4 changes: 2 additions & 2 deletions src/generator/templates/root-index.njk
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% include "license.njk" %}
/*! THIS FILE IS AUTO-GENERATED */

import {GoogleApis} from './googleapis';
import {GoogleApis} from './googleapis.js';
const google = new GoogleApis();
export {google, GoogleApis};
export * as Common from 'googleapis-common';
export * as Auth from 'google-auth-library';

{% for apiName, api in apis %}
{% for versionName, version in api %}export { {{ apiName }}_{{ version|replace('.','_') }} } from './apis/{{ apiName }}/{{ version }}';
{% for versionName, version in api %}export { {{ apiName }}_{{ version|replace('.','_') }} } from './apis/{{ apiName }}/{{ version }}.js';
{% endfor %}
{% endfor %}

0 comments on commit ef9e800

Please sign in to comment.