Skip to content

Commit

Permalink
在打包时,包含 Discussion.Web 项目的 wwwroot/dist 文件夹
Browse files Browse the repository at this point in the history
  • Loading branch information
Jijie Chen committed Oct 13, 2018
1 parent d0add5b commit ec0b0ba
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 83 deletions.
18 changes: 17 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ Task("Default")
}
});

Task("clean")
.Does(() =>{
var directoriesToDelete = new DirectoryPath[]{
Directory("./src/Discussion.Web/publish"),
Directory("./src/Discussion.Web/wwwroot/dist"),
Directory("./src/Discussion.Admin/ClientApp/dist")
}.Where(DirectoryExists).ToArray();
DeleteDirectories(directoriesToDelete, new DeleteDirectorySettings {
Recursive = true,
Force = true
});
DotNetCoreClean("./dotnetclub.sln");
});

Task("build")
.Does(() =>
{
Expand All @@ -36,7 +52,6 @@ Task("build")
});
DoInDirectory("./src/Discussion.Web/wwwroot", () =>
{
Execute("npm run clean");
Execute("npm run dev");
Execute("npm run prod");
});
Expand Down Expand Up @@ -111,6 +126,7 @@ Task("package")


Task("ci")
.IsDependentOn("clean")
.IsDependentOn("build")
.IsDependentOn("test")
.IsDependentOn("package");
Expand Down
2 changes: 1 addition & 1 deletion src/Discussion.Web/Discussion.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<StartupObject>Discussion.Web.Startup</StartupObject>
<DnClubExcludes>publish\**;logs\**;wwwroot\dist\**;dotnetclub.db</DnClubExcludes>
<DnClubExcludes>publish\**;logs\**;dotnetclub.db</DnClubExcludes>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.15.2" />
Expand Down
83 changes: 2 additions & 81 deletions src/Discussion.Web/wwwroot/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -912,26 +912,6 @@ cacache@^10.0.4:
unique-filename "^1.1.0"
y18n "^4.0.0"

cacache@^11.2.0:
version "11.2.0"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965"
integrity sha512-IFWl6lfK6wSeYCHUXh+N1lY72UDrpyrYQJNIVQf48paDuWbv5RbAtJYf/4gUQFObTCHZwdZ5sI8Iw7nqwP6nlQ==
dependencies:
bluebird "^3.5.1"
chownr "^1.0.1"
figgy-pudding "^3.1.0"
glob "^7.1.2"
graceful-fs "^4.1.11"
lru-cache "^4.1.3"
mississippi "^3.0.0"
mkdirp "^0.5.1"
move-concurrently "^1.0.1"
promise-inflight "^1.0.1"
rimraf "^2.6.2"
ssri "^6.0.0"
unique-filename "^1.1.0"
y18n "^4.0.0"

cache-base@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
Expand Down Expand Up @@ -1946,11 +1926,6 @@ fastparse@^1.1.1:
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
integrity sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=

figgy-pudding@^3.1.0, figgy-pudding@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w==

file-loader@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-2.0.0.tgz#39749c82f020b9e85901dcff98e8004e6401cfde"
Expand Down Expand Up @@ -1978,15 +1953,6 @@ find-cache-dir@^1.0.0:
make-dir "^1.0.0"
pkg-dir "^2.0.0"

find-cache-dir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d"
integrity sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==
dependencies:
commondir "^1.0.1"
make-dir "^1.0.0"
pkg-dir "^3.0.0"

find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
Expand Down Expand Up @@ -3023,7 +2989,7 @@ lower-case@^1.1.1:
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=

lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.3:
lru-cache@^4.0.1, lru-cache@^4.1.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
integrity sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==
Expand Down Expand Up @@ -3219,22 +3185,6 @@ mississippi@^2.0.0:
stream-each "^1.1.0"
through2 "^2.0.0"

mississippi@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022"
integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==
dependencies:
concat-stream "^1.5.0"
duplexify "^3.4.2"
end-of-stream "^1.1.0"
flush-write-stream "^1.0.0"
from2 "^2.1.0"
parallel-transform "^1.1.0"
pump "^3.0.0"
pumpify "^1.3.3"
stream-each "^1.1.0"
through2 "^2.0.0"

mixin-deep@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe"
Expand Down Expand Up @@ -4214,14 +4164,6 @@ pump@^2.0.0, pump@^2.0.1:
end-of-stream "^1.1.0"
once "^1.3.1"

pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"

pumpify@^1.3.3:
version "1.5.1"
resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce"
Expand Down Expand Up @@ -4839,13 +4781,6 @@ ssri@^5.2.4:
dependencies:
safe-buffer "^5.1.1"

ssri@^6.0.0:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==
dependencies:
figgy-pudding "^3.5.1"

stable@~0.1.6:
version "0.1.8"
resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
Expand Down Expand Up @@ -5163,7 +5098,7 @@ uglify-es@^3.3.4:
commander "~2.13.0"
source-map "~0.6.1"

uglify-js@3.4.x, uglify-js@^3.0.0:
uglify-js@3.4.x:
version "3.4.9"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==
Expand All @@ -5185,20 +5120,6 @@ uglifyjs-webpack-plugin@^1.2.4:
webpack-sources "^1.1.0"
worker-farm "^1.5.2"

uglifyjs-webpack-plugin@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.0.1.tgz#f346af53ed496ce72fef462517d417f62bec3010"
integrity sha512-1HhCHkOB6wRCcv7htcz1QRPVbWPEY074RP9vzt/X0LF4xXm9l4YGd0qja7z88abDixQlnVwBjXsTBs+Xsn/eeQ==
dependencies:
cacache "^11.2.0"
find-cache-dir "^2.0.0"
schema-utils "^1.0.0"
serialize-javascript "^1.4.0"
source-map "^0.6.1"
uglify-js "^3.0.0"
webpack-sources "^1.1.0"
worker-farm "^1.5.2"

union-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
Expand Down

0 comments on commit ec0b0ba

Please sign in to comment.