Skip to content

Commit

Permalink
update dst dir
Browse files Browse the repository at this point in the history
  • Loading branch information
im6 committed Jan 9, 2020
1 parent ceec45e commit 32e63c3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions server/task/copy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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)}`);
Expand All @@ -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;
module.exports = copy;
2 changes: 1 addition & 1 deletion server/task/render/viewModel.json
Original file line number Diff line number Diff line change
@@ -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": [],
Expand Down
2 changes: 1 addition & 1 deletion server/task/render/viewModel_article.json
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down

0 comments on commit 32e63c3

Please sign in to comment.