Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite6fb0b8

Browse files
committed
chore: for development
1 parent0149f25 commite6fb0b8

File tree

10 files changed

+60
-27
lines changed

10 files changed

+60
-27
lines changed

‎README.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ https://github.com/LoeiFy/Mirror/wiki
1010

1111
[中文说明](https://github.com/LoeiFy/Mirror/wiki/%E4%B8%AD%E6%96%87%E6%95%99%E7%A8%8B)
1212

13-
##Versions
14-
15-
https://github.com/LoeiFy/Mirror/wiki/Versions
16-
1713
##Development
1814

1915
https://github.com/LoeiFy/Mirror/wiki/Development
@@ -22,8 +18,6 @@ https://github.com/LoeiFy/Mirror/wiki/Development
2218

2319
MIT
2420

25-
##Related
21+
##Relevance
2622

2723
![mirror](https://cloud.githubusercontent.com/assets/2193211/12321915/c66d8b12-baeb-11e5-9612-b188f5272e3b.jpg)
28-
29-
`Mirror` by`DJ Okawari`

‎build.js‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
const{ readFileSync}=require('fs')
1+
const{
2+
copySync,
3+
readFileSync,
4+
outputFileSync,
5+
readdirSync,
6+
createWriteStream,
7+
ensureDirSync,
8+
removeSync,
9+
}=require('fs-extra')// eslint-disable-line import/no-extraneous-dependencies
210
const{ join}=require('path')
11+
constarchiver=require('archiver')// eslint-disable-line import/no-extraneous-dependencies
12+
13+
constdir=(...s)=>join(__dirname, ...s)
14+
constindex=readFileSync(dir('docs','index.html'),'utf8')
15+
16+
copySync(dir('docs'),dir('temp'),{
17+
filter(src){
18+
return!src.includes('/index.html')
19+
},
20+
})
21+
outputFileSync(dir('temp','index.html'),index.replace(/hash:'.*?',/,'hash: \'\','))
22+
outputFileSync(dir('temp','CNAME'),'')
23+
ensureDirSync(dir('release'))
24+
25+
constfiles=readdirSync(dir('temp'))
26+
constoutput=createWriteStream(dir('release','mirror.zip'))
27+
constarchive=archiver('zip',{zlib:{level:9}})
28+
29+
output.on('close',()=>{
30+
global.console.log(`mirror.zip [${archive.pointer()} bytes]`)
31+
removeSync(dir('temp'))
32+
copySync(dir('CNAME'),dir('docs','CNAME'))
33+
})
34+
archive.on('error',(err)=>{throwerr})
35+
archive.pipe(output)
36+
files.forEach(file=>archive.file(dir('temp',file),{name:file}))
37+
archive.finalize()

‎docs/index.b8c607cf.js‎

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/index.ba2658b1.js‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎docs/index.ba2658b1.js.map‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎docs/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@
9999
</div>
100100
</div>
101101
<divid="loader"><div></div></div>
102-
<scriptsrc="./index.ba2658b1.js"></script>
102+
<scriptsrc="./index.b8c607cf.js"></script>
103103
</body>
104104
</html>

‎falco.config.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ module.exports = {
1111
mode:NODE_ENV ?'production' :'development',
1212
esModules:false,
1313
output,
14+
sourceMap:false,
1415
targets:{ios:10},
1516
}

‎index.sample.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
repository:'Recordum',
1616
authors:'LoeiFy',
1717
ignores:'17,13',
18-
hash:'deWEAEAEUaPUbdPcCeCcPdUbUbcfdXAWbcOPOOEFbWlycm9yLmFtMDIwMC5jb20=',
18+
host:'',
19+
hash:'',
1920
perpage:5,
2021
}
2122
</script>

‎package.json‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"description":"A blog tool powered by GitHub issues",
66
"scripts": {
77
"start":"falco -c -m src/index.js",
8-
"build":"rm -rf docs && NODE_ENV=docs falco -c -o docs -m src/index.js",
8+
"prebuild":"rm -rf docs",
9+
"build":"NODE_ENV=docs falco -c -o docs -m src/index.js",
10+
"postbuild":"node ./build.js",
911
"lint":"eslint ."
1012
},
1113
"repository": {
@@ -19,8 +21,10 @@
1921
},
2022
"homepage":"https://github.com/LoeiFy/Mirror",
2123
"devDependencies": {
24+
"archiver":"^3.0.0",
2225
"eslint":"^5.15.1",
2326
"eslint-config-airbnb-base":"^13.1.0",
24-
"eslint-plugin-import":"^2.16.0"
27+
"eslint-plugin-import":"^2.16.0",
28+
"fs-extra":"^7.0.1"
2529
}
2630
}

‎release/mirror.zip‎

28.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp