Skip to content

Commit

Permalink
Merge pull request #256 from WJSoftware/JP/RefactorPkg
Browse files Browse the repository at this point in the history
feat: Reorganize package contents
  • Loading branch information
webJose authored Dec 24, 2024
2 parents 4787b91 + 1820026 commit 12be2cb
Show file tree
Hide file tree
Showing 9 changed files with 246 additions and 1,066 deletions.
4 changes: 0 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/src"
schedule:
interval: "daily"
8 changes: 3 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": [
"./build-npm.ps1"
],
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": [],
"label": "Build",
Expand All @@ -20,7 +18,7 @@
},
"problemMatcher": [],
"label": "npm: test",
"detail": "Run unit tests"
"detail": "Run unit tests."
}
]
}
10 changes: 3 additions & 7 deletions build-npm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,15 @@ begin {
Invoke-Call { npm run test }
}
}
[string] $path = Resolve-Path .\src\package.json
[string] $path = Resolve-Path .\package.json
if ($VerUpgrade -ne '') {
if ($PSCmdlet.ShouldProcess($path, "Package version increment: $VerUpgrade")) {
Set-Location .\src
if ($PreId -ne '') {
npm version $VerUpgrade --preid $PreId --no-git-tag-version
}
else {
npm version $VerUpgrade --no-git-tag-version
}
Set-Location ..\
}
}
else {
Expand All @@ -87,18 +85,16 @@ begin {
Invoke-Call { npx tsc }
}
Copy-Item .\src\vite-plugin-single-spa.d.ts .\out
Copy-Item .\src\package.json .\out
Copy-Item .\README.md .\out -Force
if (-not (Test-Path .\out\ex)) {
New-Item .\out\ex -ItemType Directory
}
Copy-Item .\src\ex.d.ts .\out\ex\index.d.ts
if (!$Publish -and -not $WhatIfPreference) {
Write-Output "Running npm publish in dry run mode."
npm publish .\out --dry-run
npm publish --dry-run
}
elseif ($PSCmdlet.ShouldProcess($path, "Publish NPM package")) {
npm publish .\out
npm publish
}
elseif ($WhatIfPreference) {
Write-Verbose "NOTE: Running npm publish in dry run mode using sample data for illustration purposes only."
Expand Down
Loading

0 comments on commit 12be2cb

Please sign in to comment.