File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 44 "scripts" : {
55 "dev" : " web-ext run -s src --target=chromium" ,
66 "compile" : " tsc --noEmit" ,
7+ "zip" : " powershell scripts/build.ps1" ,
78 "lint" : " echo 'TODO'"
89 },
910 "devDependencies" : {
Original file line number Diff line number Diff line change 1+ $sourceFolder = " .\src"
2+ $targetFolder = " .\dist"
3+ $targetFolderForClean = " .\dist\*"
4+ $uglifyPath = " .\node_modules\uglify-js\bin\uglifyjs"
5+
6+ Remove-Item $targetFolderForClean - Recurse - Force
7+ Copy-Item - Path $sourceFolder \* - Destination $targetFolder - Recurse
8+
9+ $folders = Get-ChildItem - path $targetFolder - Recurse - include * .js
10+ Foreach ($fldr in $folders ) {
11+ if ($fldr.Attributes -ne ' Directory' ) {
12+ node $uglifyPath -- output $fldr.FullName $fldr.FullName
13+ Write-Host $fldr.FullName " has been minified."
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments