Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDEV-5995 Support for webpack 5 #151

Merged
merged 26 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<PackageVersion Include="WebViewControl-WPF" Version="$(WebViewVersion)" />
<PackageVersion Include="WebViewControl-WPF-ARM64" Version="$(WebViewVersion)" />

<PackageVersion Include="ViewGenerator" Version="1.0.330" />
<PackageVersion Include="ViewGenerator" Version="1.0.351" />
<PackageVersion Include="ViewGeneratorCore" Version="1.0.229" />

<PackageVersion Include="NLog" Version="4.6.2" />
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="3.9.7" />
<PackageVersion Include="Microsoft.TypeScript.MSBuild" Version="5.2.2" />

<PackageVersion Include="nunit" Version="3.12.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="3.17.0" />
Expand Down
4 changes: 4 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<add key="Nuget" value="https://api.nuget.org/v3/index.json" />
<add key="Avalonia" value="https://nuget.avaloniaui.net/repository/outsystems-feed/" />
<add key="AvaloniaNightlyBuilds" value="https://www.myget.org/F/avalonia-ci/api/v2" />
<add key="Local" value="/Users/miguel.alves/Documents/git/ReactView/nuget" />
</packageSources>

<packageSourceMapping>
Expand All @@ -27,6 +28,9 @@
<packageSource key="AvaloniaNightlyBuilds">
<package pattern="*" />
</packageSource>
<packageSource key="Local">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>

3 changes: 2 additions & 1 deletion ReactViewResources/AMDLoader/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"removeComments": true,
"allowSyntheticDefaultImports": true
"allowSyntheticDefaultImports": true,
"ignoreDeprecations": "5.0"
},
"compileOnSave": false,
"exclude": [
Expand Down
1 change: 1 addition & 0 deletions ReactViewResources/Loader/Public/ViewFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class InternalViewFrame<T> extends React.Component<IInternalViewFrameProps<T>, {

private get fullName() {
const parentName = this.parentView.name;
// @ts-ignore
return (parentName ? (parentName + ".") : "") + this.props.name;
}

Expand Down
3 changes: 2 additions & 1 deletion ReactViewResources/Loader/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"removeComments": true,
"allowSyntheticDefaultImports": true,
"outFile": "_Loader.js",
"allowUmdGlobalAccess": true
"allowUmdGlobalAccess": true,
"ignoreDeprecations": "5.0"
},
"compileOnSave": false,
"exclude": [
Expand Down
9 changes: 6 additions & 3 deletions Sample.Avalonia/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
{
"compilerOptions": {
"incremental": true,
"baseUrl": ".",
"module": "amd",
"target": "es2017",
"jsx": "react",
"moduleResolution": "node",
"sourceMap": false,
"allowJs": true,
"rootDir": ".",
"forceConsistentCasingInFileNames": true,
"forceConsistentCasingInFileNames": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true
},
"compileOnSave": false,
"buildOnSave": false,
"exclude": [
"dist",
"Generated"
"Generated",
"node_modules"
]
}
2 changes: 2 additions & 0 deletions ViewGenerator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{51A18A04-276C-4AD4-8607-C9A96E8C34B3}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
Directory.Build.targets = Directory.Build.targets
EndProjectSection
EndProject
Global
Expand Down
2 changes: 1 addition & 1 deletion ViewGenerator/ViewGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<AssemblyTitle>ViewGenerator</AssemblyTitle>
<Product>ViewGenerator</Product>
<Description>Generates .NET View bindings from typescript</Description>
<Version>1.0.332</Version>
<Version>1.0.351</Version>
<PackageId>ViewGenerator</PackageId>
<PackageTags>Library</PackageTags>

Expand Down
2 changes: 1 addition & 1 deletion ViewGenerator/ViewGenerator.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<developmentDependency>true</developmentDependency>
<dependencies>
<dependency id="ViewGeneratorCore" version="1.0.226" />
<dependency id="ViewPacker" version="1.0.20" />
<dependency id="ViewPacker" version="1.0.21" />
</dependencies>
</metadata>
<files>
Expand Down
6 changes: 3 additions & 3 deletions ViewGenerator/build/ViewGenerator.targets
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@
<CallTarget Condition="'@(VG_Workers_Inputs)' != ''" Targets="VG_GenerateWorkersBundle" />

<!-- Main bundle generation -->
<Exec Command="&quot;$(ViewGeneratorNodeJsExe)&quot; &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/$(WP_ConfigFileName).config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --useCache=$(WP_UseCache) --pluginsRelativePath='$(PluginsRelativePath)' --assemblyName='$(AssemblyName)'" />
<Exec Command="node &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/$(WP_ConfigFileName).config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --env useCache=$(WP_UseCache) --env pluginsRelativePath='$(PluginsRelativePath)' --env assemblyName='$(AssemblyName)'" />
alvesmiguel1 marked this conversation as resolved.
Show resolved Hide resolved

<Touch Files="VG_Build.cache" AlwaysCreate="true" />
</Target>

<!-- Default stylesheet related target -->
<Target Name="VG_GenerateDefaultStyleSheet" >
<Exec Command="&quot;$(ViewGeneratorNodeJsExe)&quot; &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/webpack_stylesheets.config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --entryPath='@(DefaultStyleSheet)' --assemblyName='$(AssemblyName)'" />
<Exec Command="node &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/webpack_stylesheets.config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --env entryPath='@(DefaultStyleSheet)' --env assemblyName='$(AssemblyName)'" />
</Target>

<!-- Workers related target -->
<Target Name="VG_GenerateWorkersBundle" >
<Exec Command="&quot;$(ViewGeneratorNodeJsExe)&quot; &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/webpack_workers.config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --useCache=$(WP_UseCache)" />
<Exec Command="node &quot;$(ViewPackerToolScript)&quot; --config='$(ViewGeneratorToolsPath)/webpack/webpack_workers.config.js' --mode=$(WP_Mode) --devtool=$(WP_DevTool) --env useCache=$(WP_UseCache)" />
</Target>

<!-- /// -->
Expand Down
2 changes: 2 additions & 0 deletions ViewGenerator/contentFiles/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ declare module "*.html" {
export = value;
}

declare module '*.scss';

declare module "PluginsProvider" {
export interface Type<T> extends Function { new(...args: any[]): T; }

Expand Down
Loading
Loading