Create initial version of application

This commit is contained in:
Bálint Bokros
2017-12-18 17:52:10 +01:00
parent 9ccb152f0f
commit f82f9a55ae
23 changed files with 360 additions and 25 deletions

View File

@ -0,0 +1,9 @@
<div
ace-editor
[(text)]="code"
[mode]="language"
[theme]="theme"
style="min-height: 200px; width:100%; overflow: auto;"
>
</div>

View File

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { WebideComponent } from './webide.component';
describe('WebideComponent', () => {
let component: WebideComponent;
let fixture: ComponentFixture<WebideComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ WebideComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(WebideComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,25 @@
import { Component, OnInit } from '@angular/core';
import 'brace/mode/python';
import 'brace/theme/monokai';
const defaultSourceCode =
`def hello():
print('Hello world!')`;
@Component({
selector: 'app-webide',
templateUrl: './webide.component.html',
styleUrls: ['./webide.component.scss']
})
export class WebideComponent implements OnInit {
code: string = defaultSourceCode;
language = 'python';
theme = 'monokai';
constructor() { }
ngOnInit() {
}
}