Skip to content

Commit

Permalink
removed metro4 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
morrisjdev committed Oct 27, 2019
1 parent bcdac11 commit 9cad602
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .idea/runConfigurations/Build.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 36 additions & 10 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build-library": "ng build ng-metro4 --watch",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build-schematics": "tsc -p projects/ng-metro4/tsconfig.schematics.json --outDir dist/ng-metro4/schematics && cpx dist/ng-metro4/schematics/src/schematics/** dist/ng-metro4/schematics && cpx projects/ng-metro4/src/schematics/**/{collection.json,schema.json,files/**} dist/ng-metro4/schematics",
"publish": "npm run build -- ng-metro4 && npm run build-schematics && cpx ./README.md ./dist/ng-metro4 && cpx ./projects/ng-metro4/src/metro4/** ./dist/ng-metro4/metro4",
"publish": "npm run build -- ng-metro4 && npm run build-schematics && cpx ./README.md ./dist/ng-metro4 && cd ./dist/ng-metro4 && npm publish",
"publish-doc": "npm run build -- ng-metro4 && ng run metro4-demo:deploy"
},
"private": true,
Expand All @@ -25,7 +26,7 @@
"core-js": "^2.5.4",
"highlight.js": "^9.15.10",
"linq4js": "^2.2.2",
"metro4": "^4.3.2",
"ng-metro4-lib": "^1.0.4",
"moment": "^2.24.0",
"ngx-highlightjs": "^3.0.3",
"rxjs": "~6.5.2",
Expand Down
2 changes: 1 addition & 1 deletion projects/ng-metro4/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"lib": {
"entryFile": "src/public_api.ts"
}
}
}
4 changes: 2 additions & 2 deletions projects/ng-metro4/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ng-metro4",
"description": "Angular components for Metro4 UI library in modern ui style.",
"version": "1.0.3",
"version": "1.0.4",
"peerDependencies": {
"@angular/common": "~8.1.0",
"@angular/core": "~8.1.0",
"moment": "^2.24.0",
"metro4": "^4.3.2",
"ng-metro4-lib": "^1.0.4",
"rxjs": "~6.5.2"
},
"schematics": "./schematics/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion projects/ng-metro4/src/lib/base/ng-metro4-base.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LoadingDirective } from './loading/loading.directive';
import { LoadingDisplayDirective } from './loading/loading-display.directive';
import { AnimationDirective } from './animation/animation.directive';
import { LetDirective } from './let/let.directive';
import 'metro4';
import 'ng-metro4-lib';

const declarations = [
ButtonDirective,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PanelComponent } from './panel/panel.component';
import { HotkeyDirective } from './hotkey/hotkey.directive';
import { PopoverComponent } from './popover/popover.component';
import {ActivityService} from './activity/activity.service';
import 'metro4';
import 'ng-metro4-lib';

const declarations = [
GravatarComponent,
Expand Down
2 changes: 1 addition & 1 deletion projects/ng-metro4/src/lib/form/ng-metro4-forms.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import 'metro4';
import 'ng-metro4-lib';

import { TagInputComponent } from './tag-input/tag-input.component';
import { SelectComponent } from './select/select.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { DialogComponent } from './dialog/dialog.component';
import {DialogService} from './dialog/dialog.service';
import {NotifyService} from './notify/notify.service';
import {ToastService} from './toast/toast.service';
import 'metro4';
import 'ng-metro4-lib';

const declarations = [
HintDirective,
Expand Down
2 changes: 1 addition & 1 deletion projects/ng-metro4/src/lib/ng-metro4.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {NgMetro4FormsModule} from './form/ng-metro4-forms.module';
import {NgMetro4BaseModule} from './base/ng-metro4-base.module';
import {NgMetro4ControlsModule} from './controls/ng-metro4-controls.module';
import {NgMetro4InformationModule} from './information/ng-metro4-information.module';
import 'metro4';
import 'ng-metro4-lib';

const imports = [
NgMetro4BaseModule,
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions projects/ng-metro4/src/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default function(options: NgAddOptions): Rule {
return (host: Tree, context: SchematicContext) => {
const version = getLibraryVersion();
addPackageToPackageJson(host, 'ng-metro4', `^${version}`);
const metro4Version = getDependencyVersion('metro4');
addPackageToPackageJson(host, 'metro4', `${metro4Version}`);
const metro4Version = getDependencyVersion('ng-metro4-lib');
addPackageToPackageJson(host, 'ng-metro4-lib', `${metro4Version}`);
const momentVersion = getDependencyVersion('moment');
addPackageToPackageJson(host, 'moment', `${momentVersion}`);
context.logger.log('info',
Expand Down
4 changes: 2 additions & 2 deletions src/app/home/start/start.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h3>Add dependencies</h3>
To install ng-metro4 in your angular application first execute this command:
</p>

<code>npm install -S ng-metro4 metro4 moment</code>
<code>npm install -S ng-metro4 ng-metro4-lib moment</code>

<h3>Add styles</h3>

Expand All @@ -69,7 +69,7 @@ <h3>Add styles</h3>
<pre><code [highlight]="angularJsonContent" [languages]="['ts']"></code></pre>

Instead of adding the css file in your <code>angular.json</code> you could also add
<code>@import '~metro4/build/css/metro-all.min.css';</code> at the top of your <code>styles.less</code> file.
<code>@import '~ng-metro4-lib/build/css/metro-all.min.css';</code> at the top of your <code>styles.less</code> file.

<h3>Include metro4-module</h3>

Expand Down
2 changes: 1 addition & 1 deletion src/app/home/start/start.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class StartComponent implements OnInit {
"options": {
...
"styles": [
"node_modules/metro4/build/css/metro-all.min.css",
"node_modules/ng-metro4-lib/build/css/metro-all.min.css",
"src/styles.less"
],
...
Expand Down
2 changes: 1 addition & 1 deletion src/styles.less
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* You can add global styles to this file, and also import other style files */
@import '~highlight.js/styles/vs.css';

@import '~ng-metro4-lib/build/css/metro-all.min.css';
// css from local build
@import '~metro4/build/css/metro-all.min.css';
//@import '../../Metro-UI-CSS/build/css/metro-all.css';

body {
Expand Down

0 comments on commit 9cad602

Please sign in to comment.