Compare commits
	
		
			2 Commits
		
	
	
		
			2915bd304c
			...
			669d104eb3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 669d104eb3 | |||
| 9fd8d3da28 | 
							
								
								
									
										16
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								.drone.yml
									
									
									
									
									
								
							| @ -10,19 +10,29 @@ steps: | ||||
|   pull: if-not-exists | ||||
|   image: node | ||||
|   volumes: | ||||
|   - name: publish | ||||
|     path: /drone/src/build | ||||
|   - name: publish_lab | ||||
|     path: /drone/src/build_lab | ||||
|   - name: publish_web | ||||
|     path: /drone/src/build_web | ||||
|   - name: node_modules | ||||
|     path: /drone/src/node_modules | ||||
|   commands: | ||||
|   - npm config set registry https://registry.npm.taobao.org | ||||
|   - npm ci | ||||
|   - npm run release-lab | ||||
|   - rm -rf ./build_lab/* | ||||
|   - cp ./build/* ./build_lab | ||||
|   - npm run release-web | ||||
|   - rm -rf ./build_web/* | ||||
|   - cp ./build/* ./build_web | ||||
| 
 | ||||
| volumes: | ||||
| - name: publish | ||||
| - name: publish_lab | ||||
|   host: | ||||
|     path: /http/living-together-lab | ||||
| - name: publish_web | ||||
|   host: | ||||
|     path: /http/living-together-web | ||||
| - name: node_modules | ||||
|   host: | ||||
|     path: /tmp/node_modules/living-together | ||||
|  | ||||
| @ -65,6 +65,11 @@ const Entry = () => ({ | ||||
|     LaboratoryPage: { | ||||
|         import: source("./Page/Laboratory/Laboratory.tsx"), | ||||
|         dependOn: ["Model", "GLRender"] | ||||
|     }, | ||||
| 
 | ||||
|     SimulatorWeb: { | ||||
|         import: source("./Page/SimulatorWeb/SimulatorWeb.tsx"), | ||||
|         dependOn: ["Model", "GLRender"] | ||||
|     } | ||||
| }); | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										56
									
								
								config/webpack.web.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								config/webpack.web.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,56 @@ | ||||
| const {  | ||||
|     Entry, Output, resolve, build, | ||||
|     TypeScriptRules, ScssRules, | ||||
|     HTMLPage, CssPlugin, AutoFixCssPlugin | ||||
| } = require("./webpack.common"); | ||||
| 
 | ||||
| const AllEntry = Entry(); | ||||
| 
 | ||||
| module.exports = (env) => { | ||||
|      | ||||
|     const config = { | ||||
| 
 | ||||
|         entry: { | ||||
|             GLRender: AllEntry.GLRender, | ||||
|             Model: AllEntry.Model, | ||||
|             SimulatorWeb: AllEntry.SimulatorWeb | ||||
|         }, | ||||
| 
 | ||||
|         output: Output("[name].[contenthash].js"), | ||||
|         devtool: 'source-map', | ||||
|         mode: "development", | ||||
|         resolve: resolve(), | ||||
| 
 | ||||
|         optimization: { | ||||
|             runtimeChunk: 'single', | ||||
|             chunkIds: 'named', | ||||
|             moduleIds: 'named', | ||||
|             splitChunks: { | ||||
|                 chunks: 'all', | ||||
|                 minSize: 1000 | ||||
|             } | ||||
|         }, | ||||
| 
 | ||||
|         module: { | ||||
|             rules: [ | ||||
|                 TypeScriptRules(), | ||||
|                 ScssRules() | ||||
|             ] | ||||
|         }, | ||||
|          | ||||
|         plugins: [ | ||||
|             HTMLPage("index.html", "Living Together | Simulator"), | ||||
|             CssPlugin(), | ||||
|             AutoFixCssPlugin() | ||||
|         ], | ||||
|          | ||||
|         devServer: { | ||||
|             static: { | ||||
|                 directory: build("./"), | ||||
|             }, | ||||
|             port: 12000, | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|     return config; | ||||
| }; | ||||
| @ -7,7 +7,10 @@ | ||||
|     "clean": "rimraf ./build/*", | ||||
|     "hmr-lab": "webpack serve --open --config ./config/webpack.lab.js", | ||||
|     "build-lab": "npm run clean & webpack --mode development --config ./config/webpack.lab.js", | ||||
|     "release-lab": "npm run clean & webpack --mode production --no-devtool --config ./config/webpack.lab.js" | ||||
|     "release-lab": "npm run clean & webpack --mode production --no-devtool --config ./config/webpack.lab.js", | ||||
|     "hmr-web": "webpack serve --open --config ./config/webpack.web.js", | ||||
|     "build-web": "npm run clean & webpack --mode development --config ./config/webpack.web.js", | ||||
|     "release-web": "npm run clean & webpack --mode production --no-devtool --config ./config/webpack.web.js" | ||||
|   }, | ||||
|   "keywords": [ | ||||
|     "artwork", | ||||
|  | ||||
							
								
								
									
										0
									
								
								source/Page/SimulatorWeb/SimulatorWeb.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								source/Page/SimulatorWeb/SimulatorWeb.scss
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										14
									
								
								source/Page/SimulatorWeb/SimulatorWeb.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								source/Page/SimulatorWeb/SimulatorWeb.tsx
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | ||||
| import { Component, ReactNode, createRef } from "react"; | ||||
| import { Entry } from "../Entry/Entry"; | ||||
| import "./SimulatorWeb.scss"; | ||||
| 
 | ||||
| class SimulatorWeb extends Component { | ||||
|      | ||||
|     private canvasContRef = createRef<HTMLDivElement>(); | ||||
| 
 | ||||
|     public render(): ReactNode { | ||||
|         return <div>Web</div> | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| Entry.renderComponent(SimulatorWeb); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user