Skip to content
This repository was archived by the owner on Apr 3, 2026. It is now read-only.

Commit bcd150d

Browse files
authored
Merge pull request #52 from explooosion/dev
Dev - 0.7.4
2 parents 990e1d0 + abd9cfa commit bcd150d

64 files changed

Lines changed: 6282 additions & 9709 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[Agm-Direction](https://github.com/explooosion/Agm-Direction) is the directive for [@agm/core](https://github.com/SebastianM/angular-google-maps) (not official)
1212

13-
- Angular 2+
13+
- Angular 2~7
1414
- Google Map API
1515
- [Playground](https://stackblitz.com/edit/agm-direction-demo)
1616

@@ -24,21 +24,20 @@ How to use?
2424
Installation is done using the
2525
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
2626

27-
+ Install @agm/core
27+
- Use npm
2828
```bash
2929
npm install --save @agm/core
30+
npm install --save agm-direction
3031
```
3132

32-
+ Install agm-direction
33+
- Use yarn
3334
```bash
34-
npm install --save agm-direction
35+
yarn add @agm/core
36+
yarn add agm-direction
3537
```
3638

3739
## Importing Modules
3840

39-
📦 [@agm/core](https://www.npmjs.com/package/@agm/core)
40-
📦 [agm-direction](https://www.npmjs.com/package/agm-direction)
41-
4241
```typescript
4342
import { BrowserModule } from '@angular/platform-browser'
4443
import { NgModule } from '@angular/core'
@@ -113,6 +112,18 @@ getDirection() {
113112

114113
👉 [Playground](https://github.com/explooosion/Agm-Direction/tree/master/playground)
115114

115+
```bash
116+
git clone https://github.com/explooosion/Agm-Direction.git
117+
```
118+
119+
```bash
120+
cd playground
121+
```
122+
123+
```bash
124+
yarn start
125+
```
126+
116127
## Generator
117128
This library generated by [angular-library-starter](https://github.com/robisim74/angular-library-starter).
118129

build.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ shell.cp(`-Rf`, [`src`, `*.ts`, `*.json`], `${OUT_DIR}`);
3535
/* Try to process scss files */
3636
shell.echo(`Try to process scss files`);
3737
if (shell.exec(`node-sass -r ${OUT_DIR} -o ${OUT_DIR}`).code === 0) {
38-
shell.rm(`-Rf`, `${OUT_DIR}/**/*.scss`);
39-
shell.ls(`${OUT_DIR}/**/*.css`).forEach(function (file) {
40-
shell.mv(file, file.replace('.css', '.scss'));
41-
});
38+
shell.rm(`-Rf`, `${OUT_DIR}/**/*.scss`);
39+
shell.ls(`${OUT_DIR}/**/*.css`).forEach(function (file) {
40+
shell.mv(file, file.replace('.css', '.scss'));
41+
});
4242
}
4343

4444
/* AoT compilation */
4545
shell.echo(`Start AoT compilation`);
4646
if (shell.exec(`ngc -p ${OUT_DIR}/tsconfig-build.json`).code !== 0) {
47-
shell.echo(chalk.red(`Error: AoT compilation failed`));
48-
shell.exit(1);
47+
shell.echo(chalk.red(`Error: AoT compilation failed`));
48+
shell.exit(1);
4949
}
5050
shell.echo(chalk.green(`AoT compilation completed`));
5151

@@ -56,29 +56,29 @@ shell.cp(`-Rf`, [`${NPM_DIR}/src/`, `${NPM_DIR}/*.js`, `${NPM_DIR}/*.js.map`], `
5656
shell.echo(`Start bundling`);
5757
shell.echo(`Rollup package`);
5858
if (shell.exec(`rollup -c rollup.es.config.js -i ${NPM_DIR}/${PACKAGE}.js -o ${FESM2015_DIR}/${PACKAGE}.js`).code !== 0) {
59-
shell.echo(chalk.red(`Error: Rollup package failed`));
60-
shell.exit(1);
59+
shell.echo(chalk.red(`Error: Rollup package failed`));
60+
shell.exit(1);
6161
}
6262

6363
shell.echo(`Produce ESM5/FESM5 versions`);
6464
shell.exec(`ngc -p ${OUT_DIR}/tsconfig-build.json --target es5 -d false --outDir ${OUT_DIR_ESM5} --sourceMap`);
6565
shell.cp(`-Rf`, [`${OUT_DIR_ESM5}/src/`, `${OUT_DIR_ESM5}/*.js`, `${OUT_DIR_ESM5}/*.js.map`], `${ESM5_DIR}`);
6666
if (shell.exec(`rollup -c rollup.es.config.js -i ${OUT_DIR_ESM5}/${PACKAGE}.js -o ${FESM5_DIR}/${PACKAGE}.js`).code !== 0) {
67-
shell.echo(chalk.red(`Error: FESM5 version failed`));
68-
shell.exit(1);
67+
shell.echo(chalk.red(`Error: FESM5 version failed`));
68+
shell.exit(1);
6969
}
7070

7171
shell.echo(`Run Rollup conversion on package`);
7272
if (shell.exec(`rollup -c rollup.config.js -i ${FESM5_DIR}/${PACKAGE}.js -o ${BUNDLES_DIR}/${PACKAGE}.umd.js`).code !== 0) {
73-
shell.echo(chalk.red(`Error: Rollup conversion failed`));
74-
shell.exit(1);
73+
shell.echo(chalk.red(`Error: Rollup conversion failed`));
74+
shell.exit(1);
7575
}
7676

7777
shell.echo(`Minifying`);
7878
shell.cd(`${BUNDLES_DIR}`);
79-
if (shell.exec(`uglifyjs ${PACKAGE}.umd.js -c --comments -o ${PACKAGE}.umd.min.js --source-map "includeSources=true,filename='${PACKAGE}.umd.min.js.map'"`).code !== 0) {
80-
shell.echo(chalk.red(`Error: Minifying failed`));
81-
shell.exit(1);
79+
if (shell.exec(`uglifyjs ${PACKAGE}.umd.js -c --comments -o ${PACKAGE}.umd.min.js --source-map "includeSources=true,content='${PACKAGE}.umd.js.map',filename='${PACKAGE}.umd.min.js.map'"`).code !== 0) {
80+
shell.echo(chalk.red(`Error: Minifying failed`));
81+
shell.exit(1);
8282
}
8383
shell.cd(`..`);
8484
shell.cd(`..`);

0 commit comments

Comments
 (0)