Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 5a1ac76

Browse files
committed
feat(*): change file naming convention
To align with the NPM package name `angular2-google-maps` and the main module name, which uses dashes, we use dashes insted of underscores in all source filenames. BREAKING CHANGE: When you import a directive directly, you have to change the import path: Old: ``` import {SebmGoogleMap} from 'angular2-google-maps/directives/google_map'; ``` New: ``` import {SebmGoogleMap} from 'angular2-google-maps/directives/google-map'; ```
1 parent 4fcd9af commit 5a1ac76

13 files changed

+20
-20
lines changed

src/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Provider} from 'angular2/core';
22

3-
import {MapsAPILoader} from './services/maps_api_loader/maps_api_loader';
4-
import {LazyMapsAPILoader} from './services/maps_api_loader/lazy_maps_api_loader';
3+
import {MapsAPILoader} from './services/maps-api-loader/maps-api-loader';
4+
import {LazyMapsAPILoader} from './services/maps-api-loader/lazy-maps-api-loader';
55

66
// main module
77
export * from './directives';

src/directives-const.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import {SebmGoogleMap} from './directives/google-map';
2+
import {SebmGoogleMapMarker} from './directives/google-map-marker';
3+
4+
export const ANGULAR2_GOOGLE_MAPS_DIRECTIVES: any[] = [SebmGoogleMap, SebmGoogleMapMarker];

src/directives.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export {SebmGoogleMap} from './directives/google_map';
2-
export {SebmGoogleMapMarker} from './directives/google_map_marker';
3-
export {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from './directives_const';
1+
export {SebmGoogleMap} from './directives/google-map';
2+
export {SebmGoogleMapMarker} from './directives/google-map-marker';
3+
export {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from './directives-const';

src/directives/google_map_marker.ts renamed to src/directives/google-map-marker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
EventEmitter,
88
Output
99
} from 'angular2/core';
10-
import {MarkerManager} from '../services/marker_manager';
10+
import {MarkerManager} from '../services/marker-manager';
1111

1212
let markerId = 0;
1313

src/directives/google_map.ts renamed to src/directives/google-map.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {Component, Input, Renderer, ElementRef, NgZone} from 'angular2/core';
2-
import {GoogleMapsAPIWrapper} from '../services/google_maps_api_wrapper';
3-
import {MarkerManager} from '../services/marker_manager';
2+
import {GoogleMapsAPIWrapper} from '../services/google-maps-api-wrapper';
3+
import {MarkerManager} from '../services/marker-manager';
44

55
/**
66
* Todo: add docs

src/directives_const.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/services.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export {MapsAPILoader} from './services/maps_api_loader/maps_api_loader';
2-
export {NoOpMapsAPILoader} from './services/maps_api_loader/noop_maps_api_loader';
1+
export {MapsAPILoader} from './services/maps-api-loader/maps-api-loader';
2+
export {NoOpMapsAPILoader} from './services/maps-api-loader/noop-maps-api-loader';
33
export {
44
LazyMapsAPILoader,
55
LazyMapsAPILoaderConfig,
66
GoogleMapsScriptProtocol
7-
} from './services/maps_api_loader/lazy_maps_api_loader';
7+
} from './services/maps-api-loader/lazy-maps-api-loader';

src/services/google_maps_api_wrapper.ts renamed to src/services/google-maps-api-wrapper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Injectable} from 'angular2/core';
22
import {Observer} from 'rxjs/Observer';
33
import {Observable} from 'rxjs/Observable';
44

5-
import {MapsAPILoader} from './maps_api_loader/maps_api_loader';
5+
import {MapsAPILoader} from './maps-api-loader/maps-api-loader';
66

77
/**
88
* Wrapper class that handles the communication with the Google Maps Javascript

src/services/maps_api_loader/lazy_maps_api_loader.ts renamed to src/services/maps-api-loader/lazy-maps-api-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Injectable, Optional} from 'angular2/core';
2-
import {MapsAPILoader} from './maps_api_loader';
2+
import {MapsAPILoader} from './maps-api-loader';
33

44
export enum GoogleMapsScriptProtocol {
55
HTTP,

0 commit comments

Comments
 (0)