mirror of
https://github.com/godotengine/godot-csharp-vscode.git
synced 2026-01-04 18:09:54 +03:00
Use webpack for distribution and bump version to 0.1.2
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
out
|
||||
dist
|
||||
node_modules
|
||||
.vscode-test/
|
||||
*.vsix
|
||||
|
||||
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -10,9 +10,9 @@
|
||||
"--extensionDevelopmentPath=${workspaceFolder}"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
"${workspaceFolder}/dist/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "npm: compile-tsc"
|
||||
"preLaunchTask": "npm: compile-tsc-debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
.gitmodules
|
||||
.gitignore
|
||||
.vscode/**
|
||||
.vscode-test/**
|
||||
out/test/**
|
||||
out/**
|
||||
src/**
|
||||
.gitignore
|
||||
vsc-extension-quickstart.md
|
||||
@@ -9,9 +11,8 @@ vsc-extension-quickstart.md
|
||||
**/*.map
|
||||
**/*.ts
|
||||
node_modules/**
|
||||
webpack.config.js
|
||||
thirdparty/**
|
||||
GodotDebugSession/**
|
||||
!GodotDebugSession/bin/Release/*
|
||||
!node_modules/vscode-debugprotocol/**/*
|
||||
!node_modules/promise-socket/**/*
|
||||
!node_modules/chokidar/**/*
|
||||
!dist/**
|
||||
@@ -11,13 +11,13 @@
|
||||
<AssemblyName>GodotDebugSession</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<OutputPath>..\dist\GodotDebugSession\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -26,7 +26,6 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
||||
22
Makefile
22
Makefile
@@ -1,30 +1,34 @@
|
||||
SOLUTION_DIR = "./GodotDebugSession/"
|
||||
SOLUTION_DIR="./GodotDebugSession/"
|
||||
|
||||
GODOT_DEBUG_SESSION_RELEASE = "$(SOLUTION_DIR)/bin/Release/GodotDebugSession.exe"
|
||||
GODOT_DEBUG_SESSION_DEBUG = "$(SOLUTION_DIR)/bin/Debug/GodotDebugSession.exe"
|
||||
GODOT_DEBUG_SESSION="./dist/GodotDebugSession/GodotDebugSession.exe"
|
||||
|
||||
all: vsix
|
||||
all: package
|
||||
@echo "vsix created"
|
||||
|
||||
vsix: build
|
||||
package: build
|
||||
./node_modules/.bin/vsce package
|
||||
|
||||
publish: build
|
||||
./node_modules/.bin/vsce publish
|
||||
|
||||
build: $(GODOT_DEBUG_SESSION_RELEASE) tsc
|
||||
build: $(GODOT_DEBUG_SESSION) tsc
|
||||
@echo "build finished"
|
||||
|
||||
build-debug: $(GODOT_DEBUG_SESSION_DEBUG) tsc
|
||||
build-debug: $(GODOT_DEBUG_SESSION)-debug tsc-debug
|
||||
@echo "build finished"
|
||||
|
||||
tsc:
|
||||
node_modules/.bin/tsc -p ./
|
||||
webpack --mode production
|
||||
|
||||
$(GODOT_DEBUG_SESSION_RELEASE):
|
||||
tsc-debug:
|
||||
node_modules/.bin/tsc -p ./
|
||||
webpack --mode development
|
||||
|
||||
$(GODOT_DEBUG_SESSION):
|
||||
msbuild /p:Configuration=Release $(SOLUTION_DIR)/GodotDebugSession.sln
|
||||
|
||||
$(GODOT_DEBUG_SESSION_DEBUG):
|
||||
$(GODOT_DEBUG_SESSION)-debug:
|
||||
msbuild /p:Configuration=Debug $(SOLUTION_DIR)/GodotDebugSession.sln
|
||||
|
||||
clean:
|
||||
|
||||
16
package.json
16
package.json
@@ -3,7 +3,7 @@
|
||||
"displayName": "C# Tools for Godot",
|
||||
"description": "Debugger and utilities for working with Godot C# projects",
|
||||
"icon": "icon.png",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"publisher": "neikeq",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -21,11 +21,12 @@
|
||||
"workspaceContains:project.godot",
|
||||
"onDebugResolve:godot"
|
||||
],
|
||||
"main": "./out/extension.js",
|
||||
"main": "./dist/extension.bundled.js",
|
||||
"scripts": {
|
||||
"vscode:prepublish": "make build",
|
||||
"compile": "make build",
|
||||
"compile-tsc": "make tsc",
|
||||
"compile-tsc-debug": "make tsc-debug",
|
||||
"watch": "tsc -watch -p ./"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -43,11 +44,14 @@
|
||||
"@types/node": "^10.12.21",
|
||||
"@types/vscode": "^1.28.0",
|
||||
"glob": "^7.1.4",
|
||||
"make": "^0.8.1",
|
||||
"mocha": "^6.1.4",
|
||||
"typescript": "^3.3.1",
|
||||
"ts-loader": "^7.0.3",
|
||||
"tslint": "^5.12.1",
|
||||
"typescript": "^3.3.1",
|
||||
"vsce": "^1.20.0",
|
||||
"make": "^0.8.1"
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11"
|
||||
},
|
||||
"breakpoints": [
|
||||
{
|
||||
@@ -68,7 +72,7 @@
|
||||
"fsharp"
|
||||
]
|
||||
},
|
||||
"program": "./GodotDebugSession/bin/Release/GodotDebugSession.exe",
|
||||
"program": "./dist/GodotDebugSession/GodotDebugSession.exe",
|
||||
"osx": {
|
||||
"runtime": "mono"
|
||||
},
|
||||
@@ -154,4 +158,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
webpack.config.js
Normal file
41
webpack.config.js
Normal file
@@ -0,0 +1,41 @@
|
||||
//@ts-check
|
||||
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
/**@type {import('webpack').Configuration}*/
|
||||
const config = {
|
||||
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
|
||||
|
||||
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
|
||||
output: {
|
||||
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'extension.bundled.js',
|
||||
libraryTarget: 'commonjs2',
|
||||
devtoolModuleFilenameTemplate: '../[resource-path]'
|
||||
},
|
||||
devtool: 'source-map',
|
||||
externals: {
|
||||
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
|
||||
},
|
||||
resolve: {
|
||||
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
|
||||
extensions: ['.ts', '.js']
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
module.exports = config;
|
||||
Reference in New Issue
Block a user