Skip to content

Commit 169584d

Browse files
committed
Initial commit
0 parents commit 169584d

Some content is hidden

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

41 files changed

+15108
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
# Only exists if Bazel was run
8+
/bazel-out
9+
10+
# dependencies
11+
/node_modules
12+
13+
# profiling files
14+
chrome-profiler-events*.json
15+
speed-measure-plugin*.json
16+
17+
# IDEs and editors
18+
/.idea
19+
.project
20+
.classpath
21+
.c9/
22+
*.launch
23+
.settings/
24+
*.sublime-workspace
25+
26+
# IDE - VSCode
27+
.vscode/*
28+
!.vscode/settings.json
29+
!.vscode/tasks.json
30+
!.vscode/launch.json
31+
!.vscode/extensions.json
32+
.history/*
33+
34+
# misc
35+
/.sass-cache
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
npm-debug.log
40+
yarn-error.log
41+
testem.log
42+
/typings
43+
44+
# System Files
45+
.DS_Store
46+
Thumbs.db

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cSpell.enabled": false
3+
}

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MicroJava Disassembler
2+
3+
## Introduction
4+
5+
An Angular web application for disassembling MicroJava object files.
6+
You can find more about MicroJava and the compiler which generates object files [here](https://github.com/DanijelAskov/microjava-compiler).
7+
8+
## Development server
9+
10+
Run `ng serve` for a dev server.
11+
Navigate to `http://localhost:4200/`.
12+
The app will automatically reload if you change any of the source files.
13+
14+
## Code scaffolding
15+
16+
Run `ng generate component component-name` to generate a new component.
17+
You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
18+
19+
## Build
20+
21+
Run `ng build` to build the project.
22+
The build artifacts will be stored in the `dist/` directory.
23+
Use the `--prod` flag for a production build.
24+
25+
## Further help
26+
27+
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).
28+
29+
## Note to the reader of this README
30+
31+
If you have any question, suggestion or collaboration offer, please feel free to [contact me](mailto:danijel.askov@gmail.com).
32+
**If you find this repository useful, please consider starring it!**

angular.json

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"microjava-disassembler": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:class": {
10+
"skipTests": true
11+
},
12+
"@schematics/angular:component": {
13+
"skipTests": true
14+
},
15+
"@schematics/angular:directive": {
16+
"skipTests": true
17+
},
18+
"@schematics/angular:guard": {
19+
"skipTests": true
20+
},
21+
"@schematics/angular:module": {
22+
"skipTests": true
23+
},
24+
"@schematics/angular:pipe": {
25+
"skipTests": true
26+
},
27+
"@schematics/angular:service": {
28+
"skipTests": true
29+
}
30+
},
31+
"root": "",
32+
"sourceRoot": "src",
33+
"prefix": "app",
34+
"architect": {
35+
"build": {
36+
"builder": "@angular-devkit/build-angular:browser",
37+
"options": {
38+
"outputPath": "dist/microjava-disassembler",
39+
"index": "src/index.html",
40+
"main": "src/main.ts",
41+
"polyfills": "src/polyfills.ts",
42+
"tsConfig": "tsconfig.app.json",
43+
"aot": false,
44+
"assets": [
45+
"src/assets"
46+
],
47+
"styles": [
48+
"src/styles.css",
49+
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
50+
],
51+
"scripts": [
52+
"./node_modules/jquery/dist/jquery.min.js",
53+
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
54+
]
55+
},
56+
"configurations": {
57+
"production": {
58+
"fileReplacements": [
59+
{
60+
"replace": "src/environments/environment.ts",
61+
"with": "src/environments/environment.prod.ts"
62+
}
63+
],
64+
"optimization": true,
65+
"outputHashing": "all",
66+
"sourceMap": false,
67+
"extractCss": true,
68+
"namedChunks": false,
69+
"aot": true,
70+
"extractLicenses": true,
71+
"vendorChunk": false,
72+
"buildOptimizer": true,
73+
"budgets": [
74+
{
75+
"type": "initial",
76+
"maximumWarning": "2mb",
77+
"maximumError": "5mb"
78+
},
79+
{
80+
"type": "anyComponentStyle",
81+
"maximumWarning": "6kb",
82+
"maximumError": "10kb"
83+
}
84+
]
85+
}
86+
}
87+
},
88+
"serve": {
89+
"builder": "@angular-devkit/build-angular:dev-server",
90+
"options": {
91+
"browserTarget": "microjava-disassembler:build"
92+
},
93+
"configurations": {
94+
"production": {
95+
"browserTarget": "microjava-disassembler:build:production"
96+
}
97+
}
98+
},
99+
"extract-i18n": {
100+
"builder": "@angular-devkit/build-angular:extract-i18n",
101+
"options": {
102+
"browserTarget": "microjava-disassembler:build"
103+
}
104+
},
105+
"test": {
106+
"builder": "@angular-devkit/build-angular:karma",
107+
"options": {
108+
"main": "src/test.ts",
109+
"polyfills": "src/polyfills.ts",
110+
"tsConfig": "tsconfig.spec.json",
111+
"karmaConfig": "karma.conf.js",
112+
"assets": [
113+
"src/favicon.ico",
114+
"src/assets"
115+
],
116+
"styles": [
117+
"src/styles.css"
118+
],
119+
"scripts": []
120+
}
121+
},
122+
"lint": {
123+
"builder": "@angular-devkit/build-angular:tslint",
124+
"options": {
125+
"tsConfig": [
126+
"tsconfig.app.json",
127+
"tsconfig.spec.json",
128+
"e2e/tsconfig.json"
129+
],
130+
"exclude": [
131+
"**/node_modules/**"
132+
]
133+
}
134+
},
135+
"e2e": {
136+
"builder": "@angular-devkit/build-angular:protractor",
137+
"options": {
138+
"protractorConfig": "e2e/protractor.conf.js",
139+
"devServerTarget": "microjava-disassembler:serve"
140+
},
141+
"configurations": {
142+
"production": {
143+
"devServerTarget": "microjava-disassembler:serve:production"
144+
}
145+
}
146+
}
147+
}
148+
}},
149+
"defaultProject": "microjava-disassembler"
150+
}

browserslist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

e2e/protractor.conf.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// @ts-check
2+
// Protractor configuration file, see link for more information
3+
// https://github.com/angular/protractor/blob/master/lib/config.ts
4+
5+
const { SpecReporter } = require('jasmine-spec-reporter');
6+
7+
/**
8+
* @type { import("protractor").Config }
9+
*/
10+
exports.config = {
11+
allScriptsTimeout: 11000,
12+
specs: [
13+
'./src/**/*.e2e-spec.ts'
14+
],
15+
capabilities: {
16+
browserName: 'chrome'
17+
},
18+
directConnect: true,
19+
baseUrl: 'http://localhost:4200/',
20+
framework: 'jasmine',
21+
jasmineNodeOpts: {
22+
showColors: true,
23+
defaultTimeoutInterval: 30000,
24+
print: function() {}
25+
},
26+
onPrepare() {
27+
require('ts-node').register({
28+
project: require('path').join(__dirname, './tsconfig.json')
29+
});
30+
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
}
32+
};

e2e/src/app.e2e-spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { AppPage } from './app.po';
2+
import { browser, logging } from 'protractor';
3+
4+
describe('workspace-project App', () => {
5+
let page: AppPage;
6+
7+
beforeEach(() => {
8+
page = new AppPage();
9+
});
10+
11+
it('should display welcome message', () => {
12+
page.navigateTo();
13+
expect(page.getTitleText()).toEqual('microjava-disassembler app is running!');
14+
});
15+
16+
afterEach(async () => {
17+
// Assert that there are no errors emitted from the browser
18+
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
19+
expect(logs).not.toContain(jasmine.objectContaining({
20+
level: logging.Level.SEVERE,
21+
} as logging.Entry));
22+
});
23+
});

e2e/src/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get(browser.baseUrl) as Promise<any>;
6+
}
7+
8+
getTitleText() {
9+
return element(by.css('app-root .content span')).getText() as Promise<string>;
10+
}
11+
}

e2e/tsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types": [
8+
"jasmine",
9+
"jasminewd2",
10+
"node"
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)