This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Northwind pages to use esm modules and grid pages instead of …
…legacy namespaces script
- Loading branch information
1 parent
1e2f04f
commit 8ec5078
Showing
29 changed files
with
111 additions
and
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { build } from "@serenity-is/tsbuild"; | ||
|
||
// wwwroot/esm/**/*.js: ESM entry points for own pages | ||
await build({ | ||
}); |
10 changes: 0 additions & 10 deletions
10
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Category/CategoryIndex.cshtml
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Customer/CustomerIndex.cshtml
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
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
10 changes: 0 additions & 10 deletions
10
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Region/RegionIndex.cshtml
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Shipper/ShipperIndex.cshtml
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Supplier/SupplierIndex.cshtml
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/Territory/TerritoryIndex.cshtml
This file was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
src/Serenity.Demo.Northwind/Areas/Serenity.Demo.Northwind/_ViewImports.cshtml
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
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
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { CustomerGrid } from "./CustomerGrid"; | ||
|
||
export default () => gridPageInit(CustomerGrid); |
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,10 @@ | ||
import { gridPageInit, parseQueryString } from "@serenity-is/corelib"; | ||
import { OrderGrid } from "./OrderGrid"; | ||
|
||
export default () => { | ||
const orderGrid = gridPageInit(OrderGrid); | ||
const q = parseQueryString() as any; | ||
if (q.shippingState?.length) { | ||
orderGrid.set_shippingState(parseInt(q.shippingState, 10)); | ||
} | ||
} |
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { ProductGrid } from "./ProductGrid"; | ||
|
||
export default () => gridPageInit(ProductGrid); |
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { RegionGrid } from "./RegionGrid"; | ||
|
||
export default () => gridPageInit(RegionGrid); |
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { ShipperGrid } from "./ShipperGrid"; | ||
|
||
export default () => gridPageInit(ShipperGrid); |
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { SupplierGrid } from "./SupplierGrid"; | ||
|
||
export default () => gridPageInit(SupplierGrid); |
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
4 changes: 4 additions & 0 deletions
4
src/Serenity.Demo.Northwind/Modules/Territory/TerritoryPage.ts
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,4 @@ | ||
import { gridPageInit } from "@serenity-is/corelib"; | ||
import { TerritoryGrid } from "./TerritoryGrid"; | ||
|
||
export default () => gridPageInit(TerritoryGrid); |
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,25 +1,18 @@ | ||
import { build, cleanPlugin } from "@serenity-is/tsbuild"; | ||
import { build } from "@serenity-is/tsbuild"; | ||
|
||
const buildOpt = { | ||
entryPoints: ['./Modules/index.ts'], | ||
outbase: './Modules/', | ||
splitting: false, | ||
clean: false | ||
} | ||
// wwwroot/esm/**/*.js: ESM entry points for own pages | ||
await build({ | ||
}); | ||
|
||
await build(Object.assign({}, buildOpt, { | ||
// dist/index.js: ESM bundle for NPM references | ||
await build({ | ||
clean: false, | ||
entryPoints: ['./Modules/index.ts'], | ||
external: [ | ||
'@serenity-is/*' | ||
], | ||
outbase: './Modules/', | ||
outdir: 'dist/', | ||
plugins: [] | ||
})); | ||
|
||
await build(Object.assign({}, buildOpt, { | ||
format: 'iife', | ||
footer: { | ||
js: 'Serenity.Demo = Serenity.Demo || {}; Serenity.Demo.Northwind = Serenity.Demo.Northwind || {}; Object.assign(Serenity.Demo.Northwind, Serenity._); delete Serenity._;' | ||
}, | ||
globalName: 'Serenity._', | ||
outdir: 'wwwroot/' | ||
})); | ||
plugins: [], | ||
splitting: false | ||
}); |
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