Skip to content

Commit

Permalink
Added .js extensions everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Oct 17, 2023
1 parent 8000fb0 commit 77e2f2d
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext } from '@lit-labs/context';
import { {{pascal_case zome_manifest.name}}Store } from './{{kebab_case zome_manifest.name}}-store';
import { {{pascal_case zome_manifest.name}}Store } from './{{kebab_case zome_manifest.name}}-store.js';

export const {{camel_case zome_manifest.name}}StoreContext = createContext<{{pascal_case zome_manifest.name}}Store>(
'hc_zome_{{snake_case zome_manifest.name}}/store'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import '@shoelace-style/shoelace/dist/components/button/button.js';
{{/each}}
{{/uniq_lines}}

import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types';
import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store.js';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context.js';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types.js';

/**
* @element edit-{{kebab_case entry_type.name}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import '@holochain-open-dev/elements/dist/elements/display-error.js';
{{/each}}
{{/uniq_lines}}

import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types';
import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store.js';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context.js';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types.js';

/**
* @element {{kebab_case entry_type.name}}-summary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{pascal_case entry_type.name}} } from './types';
import { {{pascal_case entry_type.name}} } from './types.js';

{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "Client extends ZomeClient<" (pascal_case coordinator_zome_manifest.name) "Signal> {" ) }}
{{previous_scope_content}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{pascal_case entry_type.name}} } from './types';
import { {{pascal_case entry_type.name}} } from './types.js';

{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "Store {" ) }}
{{previous_scope_content}}
Expand Down
6 changes: 3 additions & 3 deletions .templates/module/coordinator-zome/ui/demo/index.html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{{/merge_scope}}
{{/merge_scope}}
{{else}}
import { {{camel_case zome_manifest.name}}StoreContext } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/context';
import { {{pascal_case zome_manifest.name}}Client } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-client';
import { {{pascal_case zome_manifest.name}}Store } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-store';
import { {{camel_case zome_manifest.name}}StoreContext } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/context.js';
import { {{pascal_case zome_manifest.name}}Client } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-client.js';
import { {{pascal_case zome_manifest.name}}Store } from './{{dna_role_name}}/{{kebab_case zome_manifest.name}}/{{kebab_case zome_manifest.name}}-store.js';

{{#merge_scope previous_file_content "export class DemoApp extends LitElement {"}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import '@shoelace-style/shoelace/dist/components/button/button.js';
{{/each}}
{{/uniq_lines}}

import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types';
import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store.js';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context.js';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types.js';

/**
* @element edit-{{kebab_case entry_type.name}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import '@holochain-open-dev/elements/dist/elements/display-error.js';
{{/each}}
{{/uniq_lines}}

import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types';
import { {{pascal_case coordinator_zome_manifest.name}}Store } from '../{{kebab_case coordinator_zome_manifest.name}}-store.js';
import { {{camel_case coordinator_zome_manifest.name}}StoreContext } from '../context.js';
import { {{pascal_case entry_type.name}}{{#each entry_type.fields}}{{#if (eq field_type.type "Enum")}}, {{field_type.label}}{{/if}}{{/each}} } from '../types.js';

/**
* @element {{kebab_case entry_type.name}}-summary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{pascal_case entry_type.name}} } from './types';
import { {{pascal_case entry_type.name}} } from './types.js';

{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "Client extends ZomeClient<" (pascal_case coordinator_zome_manifest.name) "Signal> {" ) }}
{{previous_scope_content}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { {{pascal_case entry_type.name}} } from './types';
import { {{pascal_case entry_type.name}} } from './types.js';

{{#merge_scope previous_file_content (concat "export class " (pascal_case coordinator_zome_manifest.name) "Store {" ) }}
{{previous_scope_content}}
Expand Down
2 changes: 1 addition & 1 deletion .templates/module/web-app/ui/src/context.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext } from '@lit-labs/context';
import { {{pascal_case app_name}}Store } from './{{kebab_case app_name}}-store';
import { {{pascal_case app_name}}Store } from './{{kebab_case app_name}}-store.js';

export const {{camel_case app_name}}StoreContext = createContext<{{pascal_case app_name}}Store>(
'hc_zome_{{snake_case app_name}}/store'
Expand Down
8 changes: 4 additions & 4 deletions .templates/module/web-app/ui/src/index.ts.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './{{kebab_case app_name}}-store';
export * from './{{kebab_case app_name}}-client';
export * from './context';
export * from './types';
export * from './{{kebab_case app_name}}-store.js';
export * from './{{kebab_case app_name}}-client.js';
export * from './context.js';
export * from './types.js';
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@holochain/client';
import { isSignalFromCellWithRole, EntryRecord, ZomeClient } from '@holochain-open-dev/utils';

import { {{pascal_case app_name}}Signal } from './types';
import { {{pascal_case app_name}}Signal } from './types.js';

export class {{pascal_case app_name}}Client extends ZomeClient<{{pascal_case app_name}}Signal> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { lazyLoadAndPoll, AsyncReadable } from "@holochain-open-dev/stores";
import { EntryRecord, LazyHoloHashMap } from "@holochain-open-dev/utils";
import { NewEntryAction, Record, ActionHash, EntryHash, AgentPubKey } from '@holochain/client';

import { {{pascal_case app_name}}Client } from './{{kebab_case app_name}}-client';
import { {{pascal_case app_name}}Client } from './{{kebab_case app_name}}-client.js';

export class {{pascal_case app_name}}Store {

Expand Down

0 comments on commit 77e2f2d

Please sign in to comment.