diff --git a/.gitignore b/.gitignore index 5613930..d9c6e5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ */.gfs/ */*/.gfs/ +.DS_Store diff --git a/.travis.yml b/.travis.yml index eccf764..b1d7292 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,5 @@ after_success: - bash <(curl -s https://codecov.io/bash) cache: + bundler: true directories: node_modules diff --git a/README.md b/README.md index 5606d1e..86722bc 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,27 @@ -## Git-From-Scratch +# GitVisualize -I work with `git` for like a lot of time and listening to the terms that I don' -t have enough knowledge gives me a hit. +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3. -So, here I am, figuring out how git may work. -It is just a trial where I will try to figure out how `git` `may` work. Since I am not -interested in reading the original mirror of @git so I thought of challenging myself a bit. +## Development server -## Vision -`A git that everyone can understand`. It will have the necessary documentation about the hypothesis -proposed for the project. -Since It is just a timepass project, therefore I will be using it to `Version Control` a simple -file that contains data as -``` -1 -2 -3 -4 -``` -Any change in the file will be checked and then stored. I will make it a heavy VCS and tnen -make it comply with space efficiency (ik it is difficult to do, when you're going on with -the intuition that your hypothesis is correct :P) +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. +## Code scaffolding -## Language +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. -I will be using Javascript for making this project. I don't have any specific reason for -choosing this language. Let's just go with the flow :P +## Build -## Author +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. -Manish Devgan -@gabru-md +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/git-visualize/README.md b/git-visualize/README.md deleted file mode 100644 index 86722bc..0000000 --- a/git-visualize/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# GitVisualize - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.3. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/git-visualize/package.json b/git-visualize/package.json index 11c0794..965bd9c 100644 --- a/git-visualize/package.json +++ b/git-visualize/package.json @@ -27,7 +27,7 @@ "zone.js": "^0.8.19" }, "devDependencies": { - "@angular/cli": "~1.7.3", + "@angular/cli": "^1.7.4", "@angular/compiler-cli": "^5.2.0", "@angular/language-service": "^5.2.0", "@types/jasmine": "~2.8.3", diff --git a/git-visualize/src/app/app.component.spec.ts b/git-visualize/src/app/app.component.spec.ts index bcbdf36..81051d9 100644 --- a/git-visualize/src/app/app.component.spec.ts +++ b/git-visualize/src/app/app.component.spec.ts @@ -1,10 +1,19 @@ import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; +import { TreeComponent } from './tree/tree.component'; +import { TerminalComponent } from './terminal/terminal.component'; +import { FormsModule } from '@angular/forms'; + describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ - AppComponent + AppComponent, + TerminalComponent, + TreeComponent + ], + imports: [ + FormsModule ], }).compileComponents(); })); @@ -18,10 +27,4 @@ describe('AppComponent', () => { const app = fixture.debugElement.componentInstance; expect(app.title).toEqual('app'); })); - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); - })); }); diff --git a/git-visualize/src/app/app.component.ts b/git-visualize/src/app/app.component.ts index 41e3b3e..bd6e73b 100644 --- a/git-visualize/src/app/app.component.ts +++ b/git-visualize/src/app/app.component.ts @@ -1,5 +1,8 @@ import { Component } from '@angular/core'; -import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; +import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { TreeComponent } from './tree/tree.component'; +import { TerminalComponent } from './terminal/terminal.component'; +import { FormsModule } from '@angular/forms'; @Component({ selector: 'app-root', diff --git a/git-visualize/src/app/app.module.ts b/git-visualize/src/app/app.module.ts index a3e1d4c..bfca276 100644 --- a/git-visualize/src/app/app.module.ts +++ b/git-visualize/src/app/app.module.ts @@ -7,7 +7,6 @@ import { TreeComponent } from './tree/tree.component'; import { TerminalComponent } from './terminal/terminal.component'; import { CommunicateService } from './communicate.service'; - import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; @@ -23,9 +22,6 @@ import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; NgbModule.forRoot() ], providers: [CommunicateService], - bootstrap: [AppComponent], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] + bootstrap: [AppComponent] }) export class AppModule { } diff --git a/git-visualize/src/app/communicate.service.spec.ts b/git-visualize/src/app/communicate.service.spec.ts index 508ea7e..a7ec0b9 100644 --- a/git-visualize/src/app/communicate.service.spec.ts +++ b/git-visualize/src/app/communicate.service.spec.ts @@ -1,11 +1,11 @@ import { TestBed, inject } from '@angular/core/testing'; - +import { Http, HttpModule } from '@angular/http'; import { CommunicateService } from './communicate.service'; describe('CommunicateService', () => { beforeEach(() => { TestBed.configureTestingModule({ - providers: [CommunicateService] + providers: [ CommunicateService ] }); }); diff --git a/git-visualize/src/app/terminal/terminal.component.html b/git-visualize/src/app/terminal/terminal.component.html index 18f0c73..3f18f0a 100644 --- a/git-visualize/src/app/terminal/terminal.component.html +++ b/git-visualize/src/app/terminal/terminal.component.html @@ -8,7 +8,7 @@ git@yogdaan $~ {{command}}
  • - git@yogdaan $~ + git@yogdaan $~
  • diff --git a/git-visualize/src/app/terminal/terminal.component.spec.ts b/git-visualize/src/app/terminal/terminal.component.spec.ts index eb5ea81..a11684b 100644 --- a/git-visualize/src/app/terminal/terminal.component.spec.ts +++ b/git-visualize/src/app/terminal/terminal.component.spec.ts @@ -1,6 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - +import { CommunicateService } from '../communicate.service'; import { TerminalComponent } from './terminal.component'; +import { FormsModule } from '@angular/forms'; describe('TerminalComponent', () => { let component: TerminalComponent; @@ -8,7 +9,8 @@ describe('TerminalComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ TerminalComponent ] + declarations: [ TerminalComponent ], + providers: [ CommunicateService ] }) .compileComponents(); })); diff --git a/git-visualize/src/app/terminal/terminal.component.ts b/git-visualize/src/app/terminal/terminal.component.ts index b926527..b551192 100644 --- a/git-visualize/src/app/terminal/terminal.component.ts +++ b/git-visualize/src/app/terminal/terminal.component.ts @@ -1,11 +1,13 @@ import { Component, OnInit, Renderer2 } from '@angular/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { CommunicateService } from '../communicate.service'; +import { FormsModule } from '@angular/forms'; @Component({ selector: 'app-terminal', templateUrl: './terminal.component.html', - styleUrls: ['./terminal.component.css'] + styleUrls: ['./terminal.component.css'], + providers: [ CommunicateService ] }) export class TerminalComponent implements OnInit { diff --git a/package.json b/package.json deleted file mode 100644 index 67007ae..0000000 --- a/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "git-from-scratch", - "version": "1.0.0", - "description": "A version control system written from scratch and no correct idea :P", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/gabru-md/git-from-scratch.git" - }, - "keywords": [ - "vcs", - "gfs", - "git-from-scratch" - ], - "author": "Manish Devgan", - "license": "ISC", - "bugs": { - "url": "https://github.com/gabru-md/git-from-scratch/issues" - }, - "homepage": "https://github.com/gabru-md/git-from-scratch#readme" -}