Skip to content

Commit a6d70d1

Browse files
simple angular threejs example
1 parent 08de95e commit a6d70d1

27 files changed

+21686
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.angular
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# LaptopHolder
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.5.
4+
5+
## Development server
6+
7+
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.
8+
9+
## Code scaffolding
10+
11+
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`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"analytics": false
5+
},
6+
"version": 1,
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"simple": {
10+
"projectType": "application",
11+
"schematics": {
12+
"@schematics/angular:application": {
13+
"strict": true
14+
}
15+
},
16+
"root": "",
17+
"sourceRoot": "src",
18+
"prefix": "app",
19+
"architect": {
20+
"build": {
21+
"builder": "@angular-builders/custom-webpack:browser",
22+
"options": {
23+
"customWebpackConfig": {
24+
"path": "custom-webpack.config.js",
25+
"replaceDuplicatePlugins": true
26+
},
27+
"outputPath": "dist/simple",
28+
"index": "src/index.html",
29+
"main": "src/main.ts",
30+
"polyfills": "src/polyfills.ts",
31+
"tsConfig": "tsconfig.app.json",
32+
"assets": [
33+
"src/favicon.ico",
34+
"src/assets"
35+
],
36+
"styles": [
37+
"src/styles.css"
38+
],
39+
"scripts": [
40+
],
41+
"webWorkerTsConfig": "tsconfig.worker.json"
42+
},
43+
"configurations": {
44+
"production": {
45+
"budgets": [
46+
{
47+
"type": "initial",
48+
"maximumWarning": "10mb",
49+
"maximumError": "10mb"
50+
},
51+
{
52+
"type": "anyComponentStyle",
53+
"maximumWarning": "2kb",
54+
"maximumError": "4kb"
55+
}
56+
],
57+
"fileReplacements": [
58+
{
59+
"replace": "src/environments/environment.ts",
60+
"with": "src/environments/environment.prod.ts"
61+
}
62+
],
63+
"outputHashing": "all"
64+
},
65+
"development": {
66+
"buildOptimizer": false,
67+
"optimization": false,
68+
"vendorChunk": true,
69+
"extractLicenses": false,
70+
"sourceMap": true,
71+
"namedChunks": true
72+
}
73+
},
74+
"defaultConfiguration": "production"
75+
},
76+
"serve": {
77+
"builder": "@angular-builders/custom-webpack:dev-server",
78+
"options": {
79+
"browserTarget": "simple:build"
80+
},
81+
"configurations": {
82+
"production": {
83+
"browserTarget": "simple:build:production"
84+
},
85+
"development": {
86+
"browserTarget": "simple:build:development"
87+
}
88+
},
89+
"defaultConfiguration": "development"
90+
},
91+
"extract-i18n": {
92+
"builder": "@angular-devkit/build-angular:extract-i18n",
93+
"options": {
94+
"browserTarget": "simple:build"
95+
}
96+
},
97+
"lint": {
98+
"builder": "@angular-devkit/build-angular:tslint",
99+
"options": {
100+
"tsConfig": [
101+
"tsconfig.app.json",
102+
"tsconfig.spec.json",
103+
"e2e/tsconfig.json",
104+
"tsconfig.worker.json"
105+
],
106+
"exclude": [
107+
"**/node_modules/**"
108+
]
109+
}
110+
},
111+
"test": {
112+
"builder": "@angular-devkit/build-angular:karma",
113+
"options": {
114+
"main": "src/test.ts",
115+
"polyfills": "src/polyfills.ts",
116+
"tsConfig": "tsconfig.spec.json",
117+
"karmaConfig": "karma.conf.js",
118+
"assets": [
119+
"src/favicon.ico",
120+
"src/assets"
121+
],
122+
"styles": [
123+
"src/styles.css"
124+
],
125+
"scripts": []
126+
}
127+
}
128+
}
129+
}
130+
},
131+
"defaultProject": "simple"
132+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
module: {
3+
rules: [
4+
{
5+
test: /\.wasm$/,
6+
type: "javascript/auto",
7+
loader: "file-loader",
8+
},
9+
{
10+
test: /\.m?js/,
11+
type: "javascript/auto",
12+
},
13+
{
14+
test: /\.m?js/,
15+
resolve: {
16+
fullySpecified: false,
17+
},
18+
}
19+
]
20+
},
21+
resolve: {
22+
fallback: {
23+
fs: false,
24+
path: false,
25+
crypto: false
26+
}
27+
}
28+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/laptop-holder'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

0 commit comments

Comments
 (0)