@armyc2.c5isr.renderer/mil-sym-ts-web 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +57 -0
- package/buildNode.bat +2 -0
- package/buildWeb.bat +2 -0
- package/dist/C5Ren.d.ts +6970 -0
- package/dist/C5Ren.js +2 -0
- package/dist/C5Ren.js.map +1 -0
- package/dist/LICENSE +201 -0
- package/dist/README.md +57 -0
- package/dist/armyc2.c5isr.renderer-mil-sym-ts-web-2.2.0.tgz +0 -0
- package/dist/manifest.json +4 -0
- package/dist/package.json +16 -0
- package/index.ts +169 -0
- package/package.bak +50 -0
- package/package.json +40 -0
- package/package.node.json +43 -0
- package/package.pack.json +19 -0
- package/package.packWeb.json +16 -0
- package/package.web.json +40 -0
- package/src/main/ts/android/graphics/Bitmap.ts +7 -0
- package/src/main/ts/android/graphics/Paint.ts +26 -0
- package/src/main/ts/android/graphics/Path.ts +78 -0
- package/src/main/ts/android/graphics/PointF.ts +14 -0
- package/src/main/ts/android/graphics/Rect.ts +18 -0
- package/src/main/ts/android/graphics/RectF.ts +50 -0
- package/src/main/ts/android/graphics/Region.ts +36 -0
- package/src/main/ts/android/graphics/Typeface.ts +11 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/BasicShapes.ts +99 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/CChannelPoints2.ts +34 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/CELineArray.ts +193 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/Channels.ts +2971 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/DISMSupport.ts +4008 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/POINT2.ts +93 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/Shape2.ts +89 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/TacticalLines.ts +515 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/arraysupport.ts +5403 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/countsupport.ts +1084 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/flot.ts +2173 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/lineutility.ts +4934 -0
- package/src/main/ts/armyc2/c5isr/JavaLineArray/ref.ts +7 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/Modifier2.ts +5601 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/P1.ts +14 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/TGLight.ts +648 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsChannelUtility.ts +647 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsMETOC.ts +2994 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/clsUtility.ts +2663 -0
- package/src/main/ts/armyc2/c5isr/JavaTacticalRenderer/mdlGeodesic.ts +669 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipPolygon2.ts +971 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsClipQuad.ts +871 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer.ts +3507 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsRenderer2.ts +500 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtility.ts +1089 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityCPOF.ts +2656 -0
- package/src/main/ts/armyc2/c5isr/RenderMultipoints/clsUtilityGE.ts +1419 -0
- package/src/main/ts/armyc2/c5isr/data/genc.json +1407 -0
- package/src/main/ts/armyc2/c5isr/data/msd.json +17311 -0
- package/src/main/ts/armyc2/c5isr/data/mse.json +18500 -0
- package/src/main/ts/armyc2/c5isr/data/svgd.json +31214 -0
- package/src/main/ts/armyc2/c5isr/data/svge.json +30558 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/AffineTransform.ts +10 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Area.ts +437 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BasicStroke.ts +429 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BasicTypes.ts +7 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/BufferedImage.ts +35 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Font.ts +111 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/FontMetrics.ts +29 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/FontRenderContext.ts +18 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/GeneralPath.ts +211 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Graphics2D.ts +80 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/IPathIterator.ts +33 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/ImageIO.ts +16 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Line2D.ts +726 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/PathIterator.ts +141 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Point.ts +112 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Point2D.ts +261 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Polygon.ts +391 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle.ts +567 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.ts +445 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Shape.ts +31 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/Stroke.ts +18 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/TextLayout.ts +45 -0
- package/src/main/ts/armyc2/c5isr/graphics2d/TexturePaint.ts +25 -0
- package/src/main/ts/armyc2/c5isr/renderer/IIconRenderer.ts +15 -0
- package/src/main/ts/armyc2/c5isr/renderer/IconRenderer.ts +22 -0
- package/src/main/ts/armyc2/c5isr/renderer/MilStdIconRenderer.ts +269 -0
- package/src/main/ts/armyc2/c5isr/renderer/ModifierRenderer.ts +9882 -0
- package/src/main/ts/armyc2/c5isr/renderer/PatternFillRenderer.ts +146 -0
- package/src/main/ts/armyc2/c5isr/renderer/SinglePointSVGRenderer.ts +1265 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/arc.ts +64 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/bcurve.ts +95 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/ellipse.ts +93 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/line.ts +114 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/path.ts +555 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/pathiterator.ts +62 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/point.ts +120 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/rectangle.ts +431 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/roundedrectangle.ts +99 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/types.ts +25 -0
- package/src/main/ts/armyc2/c5isr/renderer/shapes/utilities.ts +203 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.ts +104 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Color.ts +481 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.ts +40 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/DrawRules.ts +1323 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/EntityCode.ts +51 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.ts +736 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/GENCLookup.ts +106 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/GeoPixelConversion3D.ts +84 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/IMultiPointRenderer.ts +87 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/IPointConversion.ts +34 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ImageInfo.ts +324 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUCache.ts +127 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LRUEntry.ts +18 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.ts +111 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MODrawRules.ts +219 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MSInfo.ts +1008 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MSLookup.ts +882 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.ts +380 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/MilStdSymbol.ts +797 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.ts +1699 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversion.ts +178 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConversionDummy.ts +45 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/PointConverter3D.ts +126 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RectUtilities.ts +118 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererException.ts +11 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererSettings.ts +1201 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/RendererUtilities.ts +591 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGInfo.ts +29 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGLookup.ts +753 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGSymbolInfo.ts +137 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SVGTextInfo.ts +438 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEvent.ts +19 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsChangedEventListener.ts +10 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SettingsEventListener.ts +5 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/Shape2SVG.ts +404 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeInfo.ts +525 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/ShapeUtilities.ts +55 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolDimensionInfo.ts +36 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolID.ts +1055 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/SymbolUtilities.ts +2085 -0
- package/src/main/ts/armyc2/c5isr/renderer/utilities/TextInfo.ts +157 -0
- package/src/main/ts/armyc2/c5isr/web/render/GeoPixelConversion.ts +86 -0
- package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandler.ts +3798 -0
- package/src/main/ts/armyc2/c5isr/web/render/MultiPointHandlerSVG.ts +412 -0
- package/src/main/ts/armyc2/c5isr/web/render/PointConverter.ts +124 -0
- package/src/main/ts/armyc2/c5isr/web/render/SymbolModifiers.ts +26 -0
- package/src/main/ts/armyc2/c5isr/web/render/WebRenderer.ts +677 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/JavaRendererUtilities.ts +484 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/LineInfo.ts +62 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/SymbolInfo.ts +46 -0
- package/src/main/ts/armyc2/c5isr/web/render/utilities/TextInfo.ts +51 -0
- package/src/main/ts/org/gavaghan/geodesy/Angle.ts +31 -0
- package/src/main/ts/org/gavaghan/geodesy/Ellipsoid.ts +71 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticCalculator.ts +200 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticCurve.ts +55 -0
- package/src/main/ts/org/gavaghan/geodesy/GeodeticMeasurement.ts +68 -0
- package/src/main/ts/org/gavaghan/geodesy/GlobalCoordinates.ts +103 -0
- package/src/main/ts/org/gavaghan/geodesy/GlobalPosition.ts +90 -0
- package/test/ExportSPImages.js +692 -0
- package/test/MPWW.html +556 -0
- package/test/MPWorker.js +318 -0
- package/test/SPWorker.js +233 -0
- package/test/SVGWW.html +363 -0
- package/test/singlePointTester3.html +751 -0
- package/tsconfig.json +54 -0
- package/typedoc.json +30 -0
- package/updateVersion.js +21 -0
- package/webpack.config.js +34 -0
- package/webpackn.config.js +28 -0
- package/webpackr.config.js +47 -0
- package/webpackw.config.js +23 -0
package/tsconfig.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "./src",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
/*"paths": {
|
|
7
|
+
"*": ["types/*"]
|
|
8
|
+
},*/
|
|
9
|
+
//"outDir": "./dist/out-tsc",
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"strict": false,
|
|
12
|
+
"noImplicitOverride": true,
|
|
13
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
14
|
+
"noImplicitReturns": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"declaration": true,
|
|
18
|
+
"declarationMap": true,
|
|
19
|
+
"downlevelIteration": true,
|
|
20
|
+
"experimentalDecorators": true,
|
|
21
|
+
"importHelpers": true,
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
"esModuleInterop": true,
|
|
24
|
+
"target": "es2022",
|
|
25
|
+
"lib": [
|
|
26
|
+
"dom",
|
|
27
|
+
"dom.iterable",
|
|
28
|
+
"ESNext"
|
|
29
|
+
],
|
|
30
|
+
"allowJs": false,
|
|
31
|
+
"skipLibCheck": true,
|
|
32
|
+
"noEmit": false,
|
|
33
|
+
"module": "CommonJS",
|
|
34
|
+
//"moduleResolution": "bundler",
|
|
35
|
+
"isolatedModules": true,
|
|
36
|
+
"jsx": "preserve",
|
|
37
|
+
"incremental": true,
|
|
38
|
+
"noUnusedLocals": false,
|
|
39
|
+
"noUnusedParameters": false,
|
|
40
|
+
},
|
|
41
|
+
//"include": ["./src/**/*"],
|
|
42
|
+
"exclude": [
|
|
43
|
+
//"./plugins/**/*",
|
|
44
|
+
//"./typings/**/*",
|
|
45
|
+
//"test.ts",
|
|
46
|
+
"node_modules",
|
|
47
|
+
"./dist/**/*" // This is what fixed it!
|
|
48
|
+
],
|
|
49
|
+
"ts-node": {
|
|
50
|
+
"compilerOptions": {
|
|
51
|
+
"module": "node16"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/typedoc.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Comments are supported, like tsconfig.tson
|
|
3
|
+
"entryPoints": ["src/main/ts/armyc2/c5isr/graphics2d/Point.ts",
|
|
4
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/LogLevel.ts",
|
|
5
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/ErrorLogger.ts",
|
|
6
|
+
"src/main/ts/armyc2/c5isr/graphics2d/Point2D.ts",
|
|
7
|
+
"src/main/ts/armyc2/c5isr/graphics2d/Rectangle2D.ts",
|
|
8
|
+
"src/main/ts/armyc2/c5isr/graphics2d/Font.ts",
|
|
9
|
+
"src/main/ts/armyc2/c5isr/graphics2d/TexturePaint.ts",
|
|
10
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/AffiliationColors.ts",
|
|
11
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/DistanceUnit.ts",
|
|
12
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/GENCLookup.ts",
|
|
13
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/MilStdAttributes.ts",
|
|
14
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/MilStdSymbol.ts",
|
|
15
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/Modifiers.ts",
|
|
16
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/SymbolID.ts",
|
|
17
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/Color.ts",
|
|
18
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/RendererSettings.ts",
|
|
19
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/MSLookup.ts",
|
|
20
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/MSInfo.ts",
|
|
21
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/SVGInfo.ts",
|
|
22
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/ShapeInfo.ts",
|
|
23
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/TextInfo.ts",
|
|
24
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/SVGSymbolInfo.ts",
|
|
25
|
+
"src/main/ts/armyc2/c5isr/renderer/utilities/SymbolUtilities.ts",
|
|
26
|
+
"src/main/ts/armyc2/c5isr/renderer/MilStdIconRenderer.ts",
|
|
27
|
+
"src/main/ts/armyc2/c5isr/web/render/WebRenderer.ts",
|
|
28
|
+
"index.ts"],
|
|
29
|
+
"out": "docs"
|
|
30
|
+
}
|
package/updateVersion.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
|
|
3
|
+
const version = process.argv[2];
|
|
4
|
+
if (!version) {
|
|
5
|
+
console.error("Usage: node updateVersion.js [version]");
|
|
6
|
+
process.exit(1);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Define multiple package files
|
|
10
|
+
const packageFiles = ["package.web.json", "package.node.json", "package.pack.json"];
|
|
11
|
+
|
|
12
|
+
packageFiles.forEach((file) => {
|
|
13
|
+
if (fs.existsSync(file)) {
|
|
14
|
+
let packageData = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
15
|
+
packageData.version = version;
|
|
16
|
+
fs.writeFileSync(file, JSON.stringify(packageData, null, 2));
|
|
17
|
+
console.log(`Updated ${file} to version ${version}`);
|
|
18
|
+
} else {
|
|
19
|
+
console.warn(`Skipping: ${file} not found.`);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const CopyPlugin = require("copy-webpack-plugin");
|
|
2
|
+
const path = require('path');
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: './dist/index.js',
|
|
5
|
+
mode: 'development', //production
|
|
6
|
+
target: "web",
|
|
7
|
+
devtool: 'inline-source-map',
|
|
8
|
+
watch: true,
|
|
9
|
+
output: {
|
|
10
|
+
filename: 'C5RenDebug.js',
|
|
11
|
+
path: path.resolve(__dirname, 'dist'),
|
|
12
|
+
library: 'C5Ren',
|
|
13
|
+
libraryTarget: 'umd',
|
|
14
|
+
},
|
|
15
|
+
resolve: {
|
|
16
|
+
extensions: ['.ts', '.js'],
|
|
17
|
+
},
|
|
18
|
+
module: {
|
|
19
|
+
rules: [
|
|
20
|
+
{
|
|
21
|
+
test: /\.ts$/,
|
|
22
|
+
use: 'ts-loader',
|
|
23
|
+
exclude: /node_modules/,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
plugins: [
|
|
28
|
+
new CopyPlugin({
|
|
29
|
+
patterns: [
|
|
30
|
+
{ from: "./src/main/ts/armyc2/c5isr/data/*", to: "[name][ext]" }
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
34
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: './dist/index.js',
|
|
5
|
+
mode: 'production', //production
|
|
6
|
+
target: "node",
|
|
7
|
+
devtool: 'source-map',
|
|
8
|
+
watch: true,
|
|
9
|
+
output: {
|
|
10
|
+
filename: 'C5Ren.js',
|
|
11
|
+
path: path.resolve(__dirname, 'dist'),
|
|
12
|
+
publicPath: '/',
|
|
13
|
+
library: 'C5Ren',
|
|
14
|
+
libraryTarget: 'umd',
|
|
15
|
+
},
|
|
16
|
+
resolve: {
|
|
17
|
+
extensions: ['.ts', '.js', ".json"],
|
|
18
|
+
},
|
|
19
|
+
plugins: [
|
|
20
|
+
new WebpackManifestPlugin({
|
|
21
|
+
fileName: 'manifest.json',
|
|
22
|
+
})],
|
|
23
|
+
externals: {
|
|
24
|
+
canvas: "commonjs canvas"
|
|
25
|
+
},
|
|
26
|
+
module: {
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const CopyPlugin = require("copy-webpack-plugin");
|
|
2
|
+
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
module.exports = {
|
|
5
|
+
entry: './dist/index.js',
|
|
6
|
+
mode: 'production', //production
|
|
7
|
+
target: "web",
|
|
8
|
+
devtool: 'source-map',
|
|
9
|
+
watch: true,
|
|
10
|
+
output: {
|
|
11
|
+
filename: 'C5Ren.js',
|
|
12
|
+
path: path.resolve(__dirname, 'dist'),
|
|
13
|
+
publicPath: '/',
|
|
14
|
+
library: 'C5Ren',
|
|
15
|
+
libraryTarget: 'umd',
|
|
16
|
+
},
|
|
17
|
+
resolve: {
|
|
18
|
+
extensions: ['.ts', '.js'],
|
|
19
|
+
},
|
|
20
|
+
plugins: [
|
|
21
|
+
new WebpackManifestPlugin({
|
|
22
|
+
fileName: 'manifest.json',
|
|
23
|
+
})],
|
|
24
|
+
module: {
|
|
25
|
+
rules: [
|
|
26
|
+
{
|
|
27
|
+
test: /\.json$/,
|
|
28
|
+
type: 'asset/resource',
|
|
29
|
+
generator: {
|
|
30
|
+
filename: 'data/[name].[contenthash][ext]' // Stores JSON separately in 'data/' folder
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
test: /\.ts$/,
|
|
35
|
+
use: 'ts-loader',
|
|
36
|
+
exclude: /node_modules/,
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
/*plugins: [
|
|
41
|
+
new CopyPlugin({
|
|
42
|
+
patterns: [
|
|
43
|
+
{ from: "./src/main/ts/armyc2/c5isr/data/*", to: "[name][ext]" }
|
|
44
|
+
],
|
|
45
|
+
}),
|
|
46
|
+
],//*/
|
|
47
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: './dist/index.js',
|
|
5
|
+
mode: 'production', //production
|
|
6
|
+
target: "web",
|
|
7
|
+
devtool: 'source-map',
|
|
8
|
+
watch: true,
|
|
9
|
+
output: {
|
|
10
|
+
filename: 'C5Ren.js',
|
|
11
|
+
path: path.resolve(__dirname, 'dist'),
|
|
12
|
+
publicPath: '/',
|
|
13
|
+
library: 'C5Ren',
|
|
14
|
+
libraryTarget: 'umd',
|
|
15
|
+
},
|
|
16
|
+
resolve: {
|
|
17
|
+
extensions: ['.ts', '.js', ".json"],
|
|
18
|
+
},
|
|
19
|
+
plugins: [
|
|
20
|
+
new WebpackManifestPlugin({
|
|
21
|
+
fileName: 'manifest.json',
|
|
22
|
+
})],
|
|
23
|
+
};
|