Skip to content

Commit

Permalink
feat(*): change file naming convention
Browse files Browse the repository at this point in the history
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';
```
  • Loading branch information
sebholstein committed Dec 21, 2015
1 parent 4fcd9af commit 5a1ac76
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Provider} from 'angular2/core';

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

// main module
export * from './directives';
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions src/directives-const.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {SebmGoogleMap} from './directives/google-map';
import {SebmGoogleMapMarker} from './directives/google-map-marker';

export const ANGULAR2_GOOGLE_MAPS_DIRECTIVES: any[] = [SebmGoogleMap, SebmGoogleMapMarker];
6 changes: 3 additions & 3 deletions src/directives.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export {SebmGoogleMap} from './directives/google_map';
export {SebmGoogleMapMarker} from './directives/google_map_marker';
export {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from './directives_const';
export {SebmGoogleMap} from './directives/google-map';
export {SebmGoogleMapMarker} from './directives/google-map-marker';
export {ANGULAR2_GOOGLE_MAPS_DIRECTIVES} from './directives-const';
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
EventEmitter,
Output
} from 'angular2/core';
import {MarkerManager} from '../services/marker_manager';
import {MarkerManager} from '../services/marker-manager';

let markerId = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/directives/google_map.ts → src/directives/google-map.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, Input, Renderer, ElementRef, NgZone} from 'angular2/core';
import {GoogleMapsAPIWrapper} from '../services/google_maps_api_wrapper';
import {MarkerManager} from '../services/marker_manager';
import {GoogleMapsAPIWrapper} from '../services/google-maps-api-wrapper';
import {MarkerManager} from '../services/marker-manager';

/**
* Todo: add docs
Expand Down
4 changes: 0 additions & 4 deletions src/directives_const.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/services.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export {MapsAPILoader} from './services/maps_api_loader/maps_api_loader';
export {NoOpMapsAPILoader} from './services/maps_api_loader/noop_maps_api_loader';
export {MapsAPILoader} from './services/maps-api-loader/maps-api-loader';
export {NoOpMapsAPILoader} from './services/maps-api-loader/noop-maps-api-loader';
export {
LazyMapsAPILoader,
LazyMapsAPILoaderConfig,
GoogleMapsScriptProtocol
} from './services/maps_api_loader/lazy_maps_api_loader';
} from './services/maps-api-loader/lazy-maps-api-loader';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Injectable} from 'angular2/core';
import {Observer} from 'rxjs/Observer';
import {Observable} from 'rxjs/Observable';

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

/**
* Wrapper class that handles the communication with the Google Maps Javascript
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Injectable, Optional} from 'angular2/core';
import {MapsAPILoader} from './maps_api_loader';
import {MapsAPILoader} from './maps-api-loader';

export enum GoogleMapsScriptProtocol {
HTTP,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {MapsAPILoader} from './maps_api_loader';
import {MapsAPILoader} from './maps-api-loader';

/**
* When using the NoOpMapsAPILoader, the Google Maps API must be added to the page via a <script>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Injectable} from 'angular2/core';
import {Observer} from 'rxjs/Observer';
import {Observable} from 'rxjs/Observable';
import {SebmGoogleMapMarker} from '../directives/google_map_marker';
import {GoogleMapsAPIWrapper} from './google_maps_api_wrapper';
import {SebmGoogleMapMarker} from '../directives/google-map-marker';
import {GoogleMapsAPIWrapper} from './google-maps-api-wrapper';

@Injectable()
export class MarkerManager {
Expand Down

0 comments on commit 5a1ac76

Please sign in to comment.