Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .circleci/config.yml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .editorconfig
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
indent_size = 4
Empty file modified .github/FUNDING.yml
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ yarn-error.log

# Generated sources
www/assets/app.js
dist
Empty file modified LICENSE
100644 → 100755
Empty file.
7 changes: 4 additions & 3 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Satisfactory Tools for planning and building the perfect base.
## Requirements
- node.js
- yarn
- PHP 7.1+

## Installation
- `git clone git@github.com:greeny/SatisfactoryTools.git`
- `yarn install`
- Set up a virtual host pointing to `/www` directory (using e.g. Apache or ngnix)
- `yarn build`
- Set up a virtual host pointing to `/dist/browser` directory using one of [Nginx or Apache2](doc/virtual_hosts.md)

## Contributing
Any pull requests are welcome, though some rules must be followed:
Expand All @@ -18,7 +18,8 @@ Any pull requests are welcome, though some rules must be followed:
- all PRs must target `dev` branch

## Development
Run `yarn start` to start the automated build process. It will watch over the code and rebuild it on change.
- Run `yarn start` to start the automated build process. It will watch over the code and rebuild it on change.
- Visit http://localhost:4200 in order to browse your app.

## Updating data
Get the latest Docs.json from your game installation and place it into `data` folder.
Expand Down
174 changes: 174 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"satisfactory-tools": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/browser",
"index": "templates/index.html",
"main": "configuration/main.ts",
"polyfills": "configuration/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets",
{ "glob": "**/*", "input": "data/", "ignore": ["**/*.txt"], "output": "/data/" }
],
"styles": [
"styles/style.scss"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "configuration/environments/environment.ts",
"with": "configuration/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "satisfactory-tools:build"
},
"configurations": {
"production": {
"browserTarget": "satisfactory-tools:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "satisfactory-tools:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "configuration/test.ts",
"polyfills": "configuration/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets",
{ "glob": "**/*", "input": "data/", "ignore": ["**/*.txt"], "output": "/data/" }
],
"styles": [
"styles/style.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "satisfactory-tools:serve"
},
"configurations": {
"production": {
"devServerTarget": "satisfactory-tools:serve:production"
}
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json"
},
"configurations": {
"production": {
"outputHashing": "media",
"fileReplacements": [
{
"replace": "configuration/environments/environment.ts",
"with": "configuration/environments/environment.prod.ts"
}
],
"sourceMap": false,
"optimization": true
}
}
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "satisfactory-tools:build",
"serverTarget": "satisfactory-tools:server"
},
"configurations": {
"production": {
"browserTarget": "satisfactory-tools:build:production",
"serverTarget": "satisfactory-tools:server:production"
}
}
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "satisfactory-tools:build:production",
"serverTarget": "satisfactory-tools:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
}
}
}
},
"defaultProject": "satisfactory-tools"
}
2 changes: 1 addition & 1 deletion bin/generateImages.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sharp from 'sharp';
import {IJsonSchema} from '@src/Schema/IJsonSchema';

const baseOriginalPath = path.join(__dirname, '..', 'data', 'icons', 'out256');
const baseTargetPath = path.join(__dirname, '..', 'www', 'assets', 'images', 'items');
const baseTargetPath = path.join(__dirname, '..', 'src', 'assets', 'images', 'items');
const mappingPath = path.join(__dirname, '..', 'data', 'imageMapping.json');
const dataPath = path.join(__dirname, '..', 'data', 'data.json');

Expand Down
Empty file modified bin/parseDocs.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/blueprintClass.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/building.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/buildingDescriptor.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/color.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/generator.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/imageMapping.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/itemAmount.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/itemDescriptor.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/recipe.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/resourceDescriptor.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/resourceExtractor.ts
100644 → 100755
Empty file.
Empty file modified bin/parseDocs/schematic.ts
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions configuration/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const environment = {
production: true
};
16 changes: 16 additions & 0 deletions configuration/environments/environment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
};

/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
14 changes: 14 additions & 0 deletions configuration/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {enableProdMode} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';

import {AppModule} from '../src/AppModule';
import {environment} from './environments/environment';

if (environment.production) {
enableProdMode();
}

document.addEventListener('DOMContentLoaded', () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
});
63 changes: 63 additions & 0 deletions configuration/polyfills.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.


/***************************************************************************************************
* APPLICATION IMPORTS
*/
Empty file modified data/data.json
100644 → 100755
Empty file.
22 changes: 22 additions & 0 deletions doc/virtual_hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Host for local browsing compiled version

## Apache2
```
#host here
```

## Nginx
```
server {
listen 80;
server_name your-host.localhost;

root /path/to/your/directory/dist/browser;

location / {
try_files $uri /index.html$is_args$args;
}
}
```

[Back to index](/README.md)
Loading