-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove wepack config. I am trying to use inbrowser imports and eliminate webpack
- Loading branch information
1 parent
00d644f
commit 10b4d0e
Showing
14 changed files
with
213 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/0.5.16-alpha"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>1A63F7FA-E718-4C0E-8548-76A2B7B41EDF</ProjectGuid> | ||
<NoWarn>NU1503;NU1105</NoWarn> | ||
<BuildCommand>npm run build</BuildCommand> | ||
</PropertyGroup> | ||
<!-- <ItemGroup> | ||
<Script Include="**"/> | ||
<Script Remove="**.d.ts"/> | ||
</ItemGroup> --> | ||
<!-- <PropertyGroup> | ||
<NpmInstallTimeStampFile>node_modules/.install-timestamp</NpmInstallTimeStampFile> | ||
</PropertyGroup> --> | ||
|
||
<!-- <Target | ||
Name="EnsureNpmRestored" | ||
Inputs="$(MSBuildThisFileDirectory)package-lock.json" | ||
Outputs="$(NpmInstallTimeStampFile)" | ||
> | ||
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." /> | ||
<Exec Command="npm install" /> | ||
<Touch Files="$(NpmInstallTimeStampFile)" AlwaysCreate="true"/> | ||
</Target> --> | ||
|
||
<!-- <PropertyGroup> | ||
<JavascriptOutputFile>blazorstate.js</JavascriptOutputFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" /> | ||
<WebpackInputs Remove="src\blazor-state.lib.module.ts" /> | ||
<WebpackInputs Remove="src\Constants.ts" /> | ||
<WebpackInputs Remove="src\DotNet.ts" /> | ||
</ItemGroup> | ||
|
||
<Target | ||
Name="RunBuild" | ||
AfterTargets="ResolveReferences" | ||
Inputs="@(WebpackInputs)" | ||
Outputs="..\BlazorState\wwwroot\$(JavascriptOutputFile)" | ||
DependsOnTargets="EnsureNpmRestored" | ||
> | ||
<Delete Files="..\BlazorState\wwwroot\$(JavascriptOutputFile)" /> | ||
<Exec Command="npm run build" /> | ||
</Target> --> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
{ | ||
"name": "blazorstate", | ||
"version": "0.0.1", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "webpack", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"@types/emscripten": "1.39.6", | ||
"ts-loader": "9.2.8", | ||
"typescript": "4.6.2", | ||
"webpack": "5.70.0", | ||
"webpack-cli": "4.9.2" | ||
} | ||
} | ||
{ | ||
"name": "blazorstate", | ||
"version": "0.0.1", | ||
"description": "", | ||
"scripts": { | ||
"build": "tsc --build --verbose", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"@types/emscripten": "1.39.6", | ||
"typescript": "4.6.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { BlazorState } from './BlazorState.js'; | ||
import { ReduxDevTools } from './ReduxDevTools.js'; | ||
import { | ||
BlazorStateName, | ||
InitializeJavaScriptInteropName, | ||
JsonRequestHandlerName, | ||
ReduxDevToolsFactoryName, | ||
ReduxDevToolsName, | ||
} from './Constants.js'; | ||
|
||
function InitializeJavaScriptInterop(JsonRequestHandler) { | ||
console.log("InitializeJavaScriptInterop"); | ||
window[JsonRequestHandlerName] = JsonRequestHandler; | ||
}; | ||
|
||
function Initialize() { | ||
console.log("Initialize BlazorState"); | ||
if (typeof window !== 'undefined' && !window[BlazorStateName]) { | ||
window[BlazorStateName] = new BlazorState(); | ||
window[InitializeJavaScriptInteropName] = InitializeJavaScriptInterop; | ||
window[ReduxDevToolsFactoryName] = ReduxDevToolsFactory; | ||
} | ||
} | ||
|
||
function ReduxDevToolsFactory(): boolean { | ||
const reduxDevTools = new ReduxDevTools(); | ||
window[ReduxDevToolsName] = reduxDevTools; | ||
return reduxDevTools.IsEnabled; | ||
} | ||
|
||
export function beforeStart(options, extensions) { | ||
Initialize(); | ||
console.log("****beforeStart timewarp-state ****"); | ||
} | ||
|
||
export function afterStarted(blazor) { | ||
console.log("****afterStarted timewarp-state ****"); | ||
} |
Oops, something went wrong.