Skip to content

Commit bebc656

Browse files
committed
feat(*): Change project name: angular-google-maps
Angular 4 is coming this year and this project aims to support all upcoming angular versions. Because of this reason, we rename the project. BREAKING CHANGES ** IMPORTANT ** The project and NPM package name changes: Old name: angular2-google-maps Old NPM pkg name: angular2-google-maps New name: angular-google-maps New NPM pkg name: @angular-google-maps/core To have a consisten naming pattern, we also change the component/directives names | Old class name / old selector | New class name / new selector | |-------------------------------------------------------------|---------------------------------------| | SebmGoogleMap / sebm-google-map | AgmMap / agm-map | | SebmGoogleMapCircle / sebm-google-map-circle | AgmCircle / agm-circle | | SebmGoogleMapInfoWindow / sebm-google-map-info-window | AgmInfoWindow / agm-info-window | | SebmGoogleMapKmlLayer / sebm-google-map-kml-layer | AgmKmlLayer / agm-kml-layer | | SebmGoogleMapMarker / sebm-google-map-marker | AgmMarker / agm-marker | | SebmGoogleMapPolygon / sebm-map-polygon | AgmPolygon / agm-polygon | | SebmGoogleMapPolyline / sebm-google-map-polyline | AgmPolyline / agm-polyline | | SebmGoogleMapPolylinePoint / sebm-google-map-polyline-point | AgmPolylinePoint / agm-polyline-point | The package structure also changes. The root directory now contains **esm** code (ES5 code with ES2015 modules). A CommonJS compatible format and TS are not part of the package any more! This change aligns with structure @angular packages. The styling of the maps is now more intuitive. To style the map, please use the `agm-map` element (or a custom class or ID) directly. The `.sebm-google-map-container` css class is deprecated and will be gone with the next version. The `.sebm.google-map-container-inner` is now called `.agm-map-container-inner`. `.sebm-google-map-container-inner` is depcrecated and will be gone with the next version.
1 parent 66806e5 commit bebc656

40 files changed

+315
-343
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ _What steps should we try in your demo to see the problem?_
1313
**Expected/desired behavior**
1414

1515

16-
**angular2 & angular2-google-maps version**
16+
**angular2 & angular-google-maps version**
1717

1818

1919
**Other information**

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Contributing to angular2-google-maps
1+
# Contributing to angular-google-maps
22

33
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
44
Before you submit your Pull Request (PR) consider the following guidelines:
55

6-
* Search [GitHub](https://github.com/SebastianM/angular2-google-maps/pulls) for an open or closed PR
6+
* Search [GitHub](https://github.com/SebastianM/angular-google-maps/pulls) for an open or closed PR
77
that relates to your submission. You don't want to duplicate effort.
88
* Make your changes in a new git branch:
99

@@ -13,7 +13,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
1313

1414
* Create your patch, **including appropriate test cases**.
1515
* Follow the [Coding Rules](#rules).
16-
* Run the full angular2-google-maps test suite with `npm run build` & `npm run test` and ensure that all tests pass.
16+
* Run the full angular-google-maps test suite with `npm run build` & `npm run test` and ensure that all tests pass.
1717
* Commit your changes using a descriptive commit message that follows our
1818
[commit message conventions](#commit). Adherence to these conventions
1919
is necessary because release notes are automatically generated from these messages.
@@ -29,10 +29,10 @@ Before you submit your Pull Request (PR) consider the following guidelines:
2929
git push origin my-fix-branch
3030
```
3131

32-
* In GitHub, send a pull request to `angular2-google-maps:master`.
32+
* In GitHub, send a pull request to `angular-google-maps:master`.
3333
* If we suggest changes then:
3434
* Make the required updates.
35-
* Re-run the angular2-google-maps test suite to ensure tests are still passing.
35+
* Re-run the angular-google-maps test suite to ensure tests are still passing.
3636
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
3737

3838
```shell

NAMING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Naming Conventions in angular2-google-maps
1+
Naming Conventions in angular-google-maps
22
---
33

44
Based on the [Angular2](https://github.com/angular/angular/blob/master/NAMING.md) conventions:

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
# angular2-google-maps
44

5-
Angular2 components for Google Maps.
6-
This project is currently in alpha state. Please do not use this in production.
5+
Angular 2+ components for Google Maps.
76

8-
[Website](https://angular-maps.com/) | [Demo](http://plnkr.co/edit/YX7W20?p=preview) | [Forum](https://groups.google.com/forum/#!forum/angular2-google-maps) | [Chat](https://gitter.im/SebastianM/angular2-google-maps) | [API Documentation](https://angular-maps.com/docs/api/latest/ts/) | [Twitter](https://twitter.com/Sebamueller)
7+
[Website](https://angular-maps.com/) | [Demo](http://plnkr.co/edit/YX7W20?p=preview) | [Chat](https://gitter.im/SebastianM/angular2-google-maps) | [API Documentation](https://angular-maps.com/docs/api/latest/ts/) | [Twitter](https://twitter.com/Sebamueller)
98

109
-----
1110

1211
[![Build Status](https://travis-ci.org/SebastianM/angular2-google-maps.svg?branch=master)](https://travis-ci.org/SebastianM/angular2-google-maps) [![Join the chat at https://gitter.im/SebastianM/angular2-google-maps](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/SebastianM/angular2-google-maps?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![npm version](https://badge.fury.io/js/angular2-google-maps.svg)](http://badge.fury.io/js/angular2-google-maps)
1312
[![Downloads](http://img.shields.io/npm/dm/angular2-google-maps.svg)](https://npmjs.org/package/angular2-google-maps)
1413

15-
## Playing with angular2-google-maps
14+
## Playing with angular2-google-maps
1615

17-
If you just want to play with `angular2-google-maps` and don't want to set up a full project, you can use the following Plunker. It has all the dependencies to play with Angular2, Typescript and of course `angular2-google-maps`:
16+
If you just want to play with `angular2-google-maps` and don't want to set up a full project, you can use the following Plunker. It has all the dependencies to play with Angular, Typescript and of course `angular2-google-maps`:
1817

1918
[&raquo; Play with angular2-google-maps on Plunker](http://plnkr.co/edit/YX7W20?p=preview)
2019

assets/release/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
angular2-google-maps
1+
angular-google-maps - Angular 2+ Google Maps components
22
=========
33

4-
The sources for this package are in the [angular2-google-maps](https://github.com/SebastianM/angular2-google-maps) repository. Please file issues and pull requests against that repo.
4+
The sources for this package are in the [angular-google-maps](https://github.com/SebastianM/angular-google-maps) repository. Please file issues and pull requests against that repo.
55

66
This package contains different sources for different users:
77

docs/_data.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"getting-started": {
3-
"title": "Getting started with angular2-google-maps",
3+
"title": "Getting started with angular-google-maps (AGM)",
44
"header_title": "Getting started",
5-
"subtitle": "Let's start from zero and build an Angular 2 app with angular2-google-maps"
5+
"subtitle": "Let's start from zero and build an Angular 2+ app with angular-google-maps (AGM)"
66
},
77
"CHANGELOG": {
88
"title": "Changelog",
9-
"subtitle": "angular2-google-maps Version Changelog"
9+
"subtitle": "angular-google-maps Version Changelog"
1010
}
1111
}

docs/_partials/homepage/quickstart-example.ejs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { BrowserModule } from '@angular/platform-browser';
2-
import { NgModule, ApplicationRef } from '@angular/core';
2+
import { NgModule. Com } from '@angular/core';
33

4-
import { AgmCoreModule } from 'angular2-google-maps/core';
4+
import { AgmCoreModule } from '@angular-google-maps/core';
55

66
@Component({
77
selector: 'app-root',
88
styles: [`
9-
.sebm-google-map-container {
9+
agm-map {
1010
height: 300px;
1111
}
1212
`],
1313
template: `
14-
&lt;sebm-google-map [latitude]=&quot;lat&quot; [longitude]=&quot;lng&quot;&gt;&lt;/sebm-google-map&gt;
14+
&lt;agm-map [latitude]=&quot;lat&quot; [longitude]=&quot;lng&quot;&gt;&lt;/agm-map&gt;
1515
`
1616
})
1717
export class AppComponent {

docs/getting-started.jade

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
include ../_includes/utils
22

3-
+section_title('Playing with angular2-google-maps', 'playing')
3+
+section_title('Playing with angular-google-maps (AGM)', 'playing')
44
:marked
5-
If you just want to play with `angular2-google-maps` and don't want to set up a full project with NPM, you can use the following Plunker. It has all the dependencies to play with Angular2, Typescript and of course `angular2-google-maps`:
5+
If you just want to play with AGM and don't want to set up a full project with NPM, you can use the following Plunker. It has all the dependencies to play with Angular 2, Typescript and of course `angular-google-maps`:
66

7-
a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &raquo; Play with angular2-google-maps on Plunker
7+
a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &raquo; Play with angular-google-maps on Plunker
88

99
+section_title('Setting up a basic project structure', 'project-structure')
1010

1111
.note.blue
1212
h4.note-title Note
1313
p.note-description
1414
:marked
15-
**If you're familiar with setting up Angular 2 projects with Angular CLI & TypeScript, you can skip this part and move on to this part:**
15+
**If you're familiar with setting up Angular projects with Angular CLI & TypeScript, you can skip this part and move on to this part:**
1616

17-
**[Setting up angular2-google-maps](#angular2-google-maps-setup)**
17+
**[Setting up angular-google-maps (AGM)](#angular-google-maps-setup)**
1818

1919
:marked
2020
### Installing TypeScript
21-
`angular2-google-maps` works best with [TypeScript](http://www.typescriptlang.org/) version 2+.
21+
`AGM` works best with [TypeScript](http://www.typescriptlang.org/) version 2+.
2222
If you have an older version of TypeScript or haven't installed TypeScript yet, please run the following command:
2323

2424
.code-highlight
2525
pre
26-
code.language-markup npm install -g typescript@2
26+
code.language-markup npm install -g typescript@2.1
2727

2828
:marked
2929
### Create an Angular CLI project
@@ -37,7 +37,7 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
3737
```
3838

3939
:marked
40-
Run the following commands to create a new Angular 2 project with Angular CLI:
40+
Run the following commands to create a new Angular project with Angular CLI:
4141

4242
.code-highlight
4343
:marked
@@ -46,17 +46,17 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
4646
cd my-maps-project
4747
```
4848

49-
+section_title('Setting up angular2-google-maps', 'angular2-google-maps-setup')
49+
+section_title('Setting up angular-google-maps', 'angular-google-maps-setup')
5050

5151
:marked
52-
### Install angular2-google-maps
52+
### Install angular-google-maps
5353

54-
`angular2-google-maps` gets shipped via the Node Package Manager (NPM). Run the following command to add it to your new project:
54+
`angular-google-maps (short name: AGM)` gets shipped via the Node Package Manager (NPM). Run the following command to add it to your new project:
5555

5656
.code-highlight
5757
:marked
5858
```markup
59-
npm install angular2-google-maps --save
59+
npm install @angular-google-maps/core --save
6060
```
6161

6262
:marked
@@ -73,7 +73,7 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
7373
import { FormsModule } from '@angular/forms';
7474
import { AppComponent } from './app.component';
7575

76-
import { AgmCoreModule } from 'angular2-google-maps/core';
76+
import { AgmCoreModule } from '@angular-google-maps/core';
7777

7878
@NgModule({
7979
imports: [
@@ -107,7 +107,7 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
107107
styleUrls: ['app.component.css'],
108108
})
109109
export class AppComponent {
110-
title: string = 'My first angular2-google-maps project';
110+
title: string = 'My first AGM project';
111111
lat: number = 51.678418;
112112
lng: number = 7.809007;
113113
}
@@ -125,9 +125,9 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
125125
<!-- this creates a google map on the page with the given lat/lng from -->
126126
<!-- the component as the initial center of the map: -->
127127

128-
<sebm-google-map [latitude]="lat" [longitude]="lng">
129-
<sebm-google-map-marker [latitude]="lat" [longitude]="lng"></sebm-google-map-marker>
130-
</sebm-google-map>
128+
<agm-map [latitude]="lat" [longitude]="lng">
129+
<agm-map-marker [latitude]="lat" [longitude]="lng"></agm-map-marker>
130+
</agm-map>
131131

132132
```
133133

@@ -138,7 +138,7 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
138138
.code-highlight
139139
:marked
140140
```css
141-
.sebm-google-map-container {
141+
agm-map {
142142
height: 300px;
143143
}
144144
```
@@ -147,7 +147,7 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
147147
h4.note-title CSS styling is required!
148148
p.note-description
149149
:marked
150-
It is really important that you define a height for the css class `.sebm-google-map-container`. Otherwise, you won't see a map on the page!
150+
It is really important that you define a height component `agm-map`. Otherwise, you won't see a map on the page!
151151

152152
+section_title('Build and run your application', 'build-and-run')
153153

@@ -168,10 +168,10 @@ a.button.button-icon.blue-light(href='http://plnkr.co/edit/YX7W20?p=preview') &r
168168
* Starts the TypeScript compiler and compiles all sources files (watches also for file changes in the source files and recompiles all files if something has changed)
169169
* Starts a local web server to serve the Angular 2 application. It refreshes the page when served files change.
170170

171-
**When everything works as expected, you should see your first Google Map created with angular2-google-maps 🎉🎉🎉!**
171+
**When everything works as expected, you should see your first Google Map created with AGM 🎉🎉🎉!**
172172

173173
+section_title('Questions?', 'questions')
174174
:marked
175-
When you have problems setting up **angular2-google-maps** or questions in general, the best way is to join the chat where you find nice people from the community that can answer you questions:
175+
When you have problems setting up **angular-google-maps** or questions in general, the best way is to join the chat where you find nice people from the community that can answer you questions:
176176

177-
a.button.button-icon.blue-light(href='https://gitter.im/SebastianM/angular2-google-maps') &raquo; Chat on Gitter
177+
a.button.button-icon.blue-light(href='https://gitter.im/SebastianM/angular-google-maps') &raquo; Chat on Gitter

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
title: Angular2 Google Maps
3-
description: Angular2 Directives for Google Maps
2+
title: Angular 2+ Google Maps
3+
description: Angular 2+ Google Maps components
44
---

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
{
2-
"name": "angular2-google-maps",
2+
"name": "angular-google-maps-src",
33
"version": "0.17.0",
4-
"description": "Angular 2 components for Google Maps",
4+
"description": "Angular 2+ components for Google Maps",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/SebastianM/angular2-google-maps.git"
7+
"url": "https://github.com/SebastianM/angular-google-maps.git"
88
},
99
"keywords": [
10+
"angular",
1011
"angular2",
12+
"ng",
1113
"google-maps",
1214
"ng2",
13-
"angular",
14-
"maps"
15+
"maps",
16+
"google",
17+
"gmaps"
1518
],
1619
"scripts": {
1720
"clean": "rimraf dist && rimraf .tmp && mkdir dist && mkdir .tmp && rimraf 'src/**/*.ngfactory.ts'",
1821
"prebuild": "npm run clean",
1922
"build": "npm run lint && npm run scripts && npm run packagejson && npm run copyassets",
2023
"lint": "tslint -c tslint.json 'src/**/*.ts'",
2124
"packagejson": "node ./scripts/create-package-json.js",
22-
"copyassets": "cp -R assets/release/* dist/ && cp LICENSE dist/",
23-
"scripts": "npm run ngc:es5 && npm run ngc:es2015 && npm run ts:copy && npm run bundle:umd",
25+
"copyassets": "cp -R assets/release/* dist/core && cp LICENSE dist/core",
26+
"scripts": "npm run ngc:esm && npm run bundle:umd",
2427
"bundle:umd": "rollup -c rollup.config.js",
25-
"ngc:es5": "ngc -p tsconfig.json",
26-
"postngc:es5": "cp -R .tmp/es5/src/* dist/ && rimraf src/**/*.ngfactory.ts",
27-
"ngc:es2015": "ngc -p tsconfig.es2015.json",
28-
"ts:copy": "mkdir -p dist/ts && cp -R src/* dist/ts",
28+
"ngc:esm": "ngc -p tsconfig.json",
2929
"clang:format": "clang-format --glob=src/**/*.ts -i",
30-
"postngc:es2015": "cp -R .tmp/esm/src dist/esm/ && rimraf src/**/*.ngfactory.ts",
30+
"postngc:esm": "mkdir -p dist/ && cp -R .tmp/esm/src/* dist/ && rimraf src/**/*.ngfactory.ts",
3131
"test": "karma start",
3232
"test:watch": "karma start --no-single-run --auto-watch",
3333
"ci": "npm run build && npm run test"
3434
},
3535
"author": "Sebastian Müller <[email protected]>",
3636
"license": "MIT",
3737
"bugs": {
38-
"url": "https://github.com/SebastianM/angular2-google-maps/issues"
38+
"url": "https://github.com/SebastianM/angular-google-maps/issues"
3939
},
4040
"homepage": "https://angular-maps.com",
4141
"dependencies": {
@@ -55,7 +55,7 @@
5555
"angular2-template-loader": "^0.6.0",
5656
"awesome-typescript-loader": "^2.2.4",
5757
"clang-format": "1.0.46",
58-
"codelyzer": "^2.0.0-beta.3",
58+
"codelyzer": "^2.0.0-beta.4",
5959
"conventional-changelog": "^1.1.0",
6060
"copy-webpack-plugin": "^4.0.1",
6161
"copyfiles": "^1.0.0",
@@ -77,7 +77,7 @@
7777
"rollup": "0.39.2",
7878
"rxjs": "5.0.0-rc.4",
7979
"ts-helpers": "^1.1.2",
80-
"tslint": "~4.0.0",
80+
"tslint": "^4.0.0",
8181
"typescript": "~2.0.1",
8282
"webpack": "2.1.0-beta.25",
8383
"zone.js": "^0.7.2"

rollup.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
entry: 'dist/esm/core/index.js',
2+
entry: 'dist/core/index.js',
33
dest: 'dist/core/core.umd.js',
44
format: 'umd',
55
moduleName: 'ngmaps.core',
@@ -15,5 +15,7 @@ export default {
1515
'rxjs/operator/toPromise': 'Rx.Observable.prototype',
1616
'rxjs/Observable': 'Rx',
1717
'rxjs/Rx': 'Rx'
18-
}
18+
},
19+
context: 'window',
20+
external: ['rxjs', '@angular/core', 'rxjs/Observable']
1921
}

scripts/create-package-json.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,24 @@
44
const fs = require('fs');
55
const path = require('path');
66

7-
const basePkgJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
7+
const pkgNames = ['core'];
88

9-
// remove scripts
10-
delete basePkgJson.scripts;
9+
pkgNames.forEach(function(pkgName) {
10+
const basePkgJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
1111

12-
// remove devDependencies (as there are important for the sourcecode only)
13-
delete basePkgJson.devDependencies;
12+
// define the package name
13+
basePkgJson.name = `@angular-google-maps/${pkgName}`
1414

15-
// transform dependencies to peerDependencies for the release
16-
basePkgJson.peerDependencies = Object.assign({}, basePkgJson.dependencies);
17-
basePkgJson.dependencies = {};
15+
// remove scripts
16+
delete basePkgJson.scripts;
1817

19-
const filepath = path.join(__dirname, '../dist/package.json');
20-
fs.writeFileSync(filepath, JSON.stringify(basePkgJson, null, 2), 'utf-8');
18+
// remove devDependencies (as there are important for the sourcecode only)
19+
delete basePkgJson.devDependencies;
20+
21+
// transform dependencies to peerDependencies for the release
22+
basePkgJson.peerDependencies = Object.assign({}, basePkgJson.dependencies);
23+
basePkgJson.dependencies = {};
24+
25+
const filepath = path.join(__dirname, `../dist/${pkgName}/package.json`);
26+
fs.writeFileSync(filepath, JSON.stringify(basePkgJson, null, 2), 'utf-8');
27+
});

0 commit comments

Comments
 (0)