diff --git a/server/task/copy/index.js b/server/task/copy/index.js index 7061a23..89050cc 100644 --- a/server/task/copy/index.js +++ b/server/task/copy/index.js @@ -3,7 +3,7 @@ const fs = require('fs'); const src = path.join(__dirname, '../../../public/'); const dest = path.join(__dirname, '../../../../im6.github.io'); -const jsDest = path.join(__dirname, '../../../../im6.github.io/cdn/0/'); +const jsDest = path.join(__dirname, '../../../../im6.github.io/assets/'); const files = [ 'index.html', @@ -22,9 +22,9 @@ const jsFiles = [ 'build/article1.js', 'build/main.js', 'build/site.js', -] +]; -const copy = (cb) => { +const copy = cb => { console.log('start copy...'); files.forEach(v => { console.log(`copying ${path.join(src, v)}`); @@ -33,10 +33,13 @@ const copy = (cb) => { jsFiles.forEach(v => { console.log(`copying ${path.join(src, v)}`); - fs.copyFileSync(path.join(src, v), path.join(jsDest, v.replace(/(.)+\//, ''))); + fs.copyFileSync( + path.join(src, v), + path.join(jsDest, v.replace(/(.)+\//, '')) + ); }); console.log('copy complete.'); cb(); -} +}; -module.exports = copy; \ No newline at end of file +module.exports = copy; diff --git a/server/task/render/viewModel.json b/server/task/render/viewModel.json index e4687c1..cf1fd24 100644 --- a/server/task/render/viewModel.json +++ b/server/task/render/viewModel.json @@ -1,6 +1,6 @@ { "pretty": null, - "bundleDir": "/cdn/0/", + "bundleDir": "/assets/", "remoteAsset": "//dkny.oss-cn-hangzhou.aliyuncs.com/1/icons", "type": ["2020", "Developer", "Designer", "Architect", "Beginner", "Fun!"], "list": [], diff --git a/server/task/render/viewModel_article.json b/server/task/render/viewModel_article.json index f88345f..e2103b8 100644 --- a/server/task/render/viewModel_article.json +++ b/server/task/render/viewModel_article.json @@ -1,7 +1,7 @@ { "id": 4, "page": 5, - "bundleDir": "/cdn/0/", + "bundleDir": "/assets/", "remoteAsset": "//dkny.oss-cn-hangzhou.aliyuncs.com/1/icons", "main": "article0", "route": "/article/",