diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ed98ddc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI +on: + push: + branches: + - main + +jobs: + Build: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - run: node build.js + - run: mkdir www + - run: cp -r build download github ico lang license open plugin progressed star status www + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + commit_message: ${{ github.event.head_commit.message }} + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./www \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0fb5c99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +node_modules +www/* +!www/forkmeongithub.png + +npm-debug.log* +lerna-debug.log +yarn-error.log +package-lock.json + +.DS_Store +.cache +.vscode +.idea +.env + +*.mpassword +*.bak +*.tem +*.temp +#.swp +*.*~ +~*.* + +# IDEA +*.iml +*.ipr +*.iws +.idea/ \ No newline at end of file diff --git a/build.js b/build.js index 6468678..07e95dd 100644 --- a/build.js +++ b/build.js @@ -25,7 +25,7 @@ function initData(dirname) { const filesArr = [] files.forEach(async (_filename, idx) => { _filepath = path.join(dirname, _filename) - if (_filename !== '.git' && _filename !== '.github' && _filename !== 'svg' && _filename !== '.DS_Store') { + if (_filename !== '.git' && _filename !== '.github' && _filename !== 'www' && _filename !== 'svg' && _filename !== '.DS_Store') { if (isDir(_filepath)) { data[_filename] = await initData(_filepath); } else if (isFile(_filepath)) { @@ -39,7 +39,7 @@ function initData(dirname) { ; (async () => { await initData(path_root); - fs.writeFileSync(path.join(path_root, 'data.json'), JSON.stringify(data, null, 4)); + fs.writeFileSync(path.join(path_root, 'data.json'), JSON.stringify(data, null, 2)); let ulStr = ''; let svgTotal = 0; @@ -61,7 +61,7 @@ function initData(dirname) { console.log(); console.log(` => 共有 \x1b[32;1m${svgTotal}\x1b[0m 个 SVG 文件`); const htmlStr = fs.readFileSync(path.join(path_root, 'template.html'), 'utf8'); - fs.writeFileSync(path.join(path_root, 'index.html'), htmlStr.replace('{{content}}', ulStr)); + fs.writeFileSync(path.join(path_root, 'www', 'index.html'), htmlStr.replace('{{content}}', ulStr)); console.log(" => 写入文件 ok!!"); console.log(); const mdStr = fs.readFileSync(path.join(path_root, 'README.md'), 'utf8'); diff --git a/data.json b/data.json index 96c9411..94eaf74 100644 --- a/data.json +++ b/data.json @@ -1,250 +1,250 @@ { - "build": [ - "build/failing.svg", - "build/inaccessible.svg", - "build/invalid.svg", - "build/passing.svg" - ], - "download": [ - "download/amazon.svg", - "download/appstore.svg", - "download/chrome-web-store.svg", - "download/googleplay.svg", - "download/macos.svg", - "download/made-for-iphone.svg", - "download/made_for_iPod.svg", - "download/white-amazon.svg", - "download/white-appstore.svg", - "download/white-chrome-web-store.svg", - "download/white-googleplay.svg", - "download/white-macos.svg", - "download/white-made-for-iphone.svg", - "download/white-made_for_iPod.svg", - "download/white-window.svg", - "download/window.svg" - ], - "github": [ - "github/alt-follow.svg", - "github/alt-fork.svg", - "github/alt-star.svg", - "github/alt.svg", - "github/black-follow.svg", - "github/black-fork.svg", - "github/black-star.svg", - "github/black.svg", - "github/green-alt-follow.svg", - "github/green-alt-fork.svg", - "github/green-alt-star.svg", - "github/green-alt.svg", - "github/green-follow.svg", - "github/green-fork.svg", - "github/green-star.svg", - "github/green.svg", - "github/w-alt-follow.svg", - "github/w-alt-fork.svg", - "github/w-alt-star.svg", - "github/w-alt.svg", - "github/w-follow.svg", - "github/w-fork.svg", - "github/w-star.svg", - "github/w.svg" - ], - "ico": [ - "ico/58.svg", - "ico/alipay-1.svg", - "ico/alipay.svg", - "ico/awesome.svg", - "ico/baidu.svg", - "ico/bower.svg", - "ico/cctv.svg", - "ico/csdn.svg", - "ico/email.svg", - "ico/express.svg", - "ico/facebook.svg", - "ico/gitee.svg", - "ico/gitter.svg", - "ico/google+.svg", - "ico/group.svg", - "ico/grunt-build-with.svg", - "ico/grunt.svg", - "ico/gulp-build-with.svg", - "ico/gulp.svg", - "ico/hexo.svg", - "ico/linkedin.svg", - "ico/linux.svg", - "ico/min-app-store.svg", - "ico/min-awesome.svg", - "ico/min-bibei.svg", - "ico/min-free.svg", - "ico/min-hot.svg", - "ico/min-oss.svg", - "ico/min-tuijian.svg", - "ico/mysql.svg", - "ico/nodejs.svg", - "ico/npm.svg", - "ico/qq.svg", - "ico/qqweibo.svg", - "ico/qzone.svg", - "ico/reddit.svg", - "ico/redhat.svg", - "ico/redis.svg", - "ico/sass.svg", - "ico/segmentfault.svg", - "ico/stackoverflow.svg", - "ico/stylus.svg", - "ico/tudou.svg", - "ico/twitter-follow.svg", - "ico/twitter-tweet.svg", - "ico/twitter.svg", - "ico/ubuntu.svg", - "ico/wechat.svg", - "ico/weibo.svg", - "ico/xitu.svg", - "ico/xunlei.svg", - "ico/youku.svg", - "ico/zhihu.svg" - ], - "lang": [ - "lang/chinese.svg", - "lang/english.svg" - ], - "license": [ - "license/apache.svg", - "license/bsd.svg", - "license/gpl.svg", - "license/lgpl.svg", - "license/mit.svg", - "license/mozilla.svg" - ], - "open": [ - "open/open-in-gitpod.svg", - "open/open-in-vscode.svg" - ], - "plugin": [ - "plugin/angularjs.svg", - "plugin/jquery.svg", - "plugin/jslite.svg", - "plugin/vue.svg", - "plugin/zepto.svg" - ], - "progressed": [ - "progressed/0.svg", - "progressed/1.svg", - "progressed/10.svg", - "progressed/100.svg", - "progressed/11.svg", - "progressed/12.svg", - "progressed/13.svg", - "progressed/14.svg", - "progressed/15.svg", - "progressed/16.svg", - "progressed/17.svg", - "progressed/18.svg", - "progressed/19.svg", - "progressed/2.svg", - "progressed/20.svg", - "progressed/21.svg", - "progressed/22.svg", - "progressed/23.svg", - "progressed/24.svg", - "progressed/25.svg", - "progressed/26.svg", - "progressed/27.svg", - "progressed/28.svg", - "progressed/29.svg", - "progressed/3.svg", - "progressed/30.svg", - "progressed/31.svg", - "progressed/32.svg", - "progressed/33.svg", - "progressed/34.svg", - "progressed/35.svg", - "progressed/36.svg", - "progressed/37.svg", - "progressed/38.svg", - "progressed/39.svg", - "progressed/4.svg", - "progressed/40.svg", - "progressed/41.svg", - "progressed/42.svg", - "progressed/43.svg", - "progressed/44.svg", - "progressed/45.svg", - "progressed/46.svg", - "progressed/47.svg", - "progressed/48.svg", - "progressed/49.svg", - "progressed/5.svg", - "progressed/50.svg", - "progressed/51.svg", - "progressed/52.svg", - "progressed/53.svg", - "progressed/54.svg", - "progressed/55.svg", - "progressed/56.svg", - "progressed/57.svg", - "progressed/58.svg", - "progressed/59.svg", - "progressed/6.svg", - "progressed/60.svg", - "progressed/61.svg", - "progressed/62.svg", - "progressed/63.svg", - "progressed/64.svg", - "progressed/65.svg", - "progressed/66.svg", - "progressed/67.svg", - "progressed/68.svg", - "progressed/69.svg", - "progressed/7.svg", - "progressed/70.svg", - "progressed/71.svg", - "progressed/72.svg", - "progressed/73.svg", - "progressed/74.svg", - "progressed/75.svg", - "progressed/76.svg", - "progressed/77.svg", - "progressed/78.svg", - "progressed/79.svg", - "progressed/8.svg", - "progressed/80.svg", - "progressed/81.svg", - "progressed/82.svg", - "progressed/83.svg", - "progressed/84.svg", - "progressed/85.svg", - "progressed/86.svg", - "progressed/87.svg", - "progressed/88.svg", - "progressed/89.svg", - "progressed/9.svg", - "progressed/90.svg", - "progressed/91.svg", - "progressed/92.svg", - "progressed/93.svg", - "progressed/94.svg", - "progressed/95.svg", - "progressed/96.svg", - "progressed/97.svg", - "progressed/98.svg", - "progressed/99.svg" - ], - "star": [ - "star/black.svg", - "star/gray.svg", - "star/red.svg", - "star/red0.svg", - "star/red1.svg", - "star/red2.svg", - "star/red3.svg", - "star/red4.svg", - "star/red5.svg" - ], - "status": [ - "status/no-dependencies.svg", - "status/pod-invalid.svg", - "status/stable.svg", - "status/wheel-no.svg" - ] + "build": [ + "build/failing.svg", + "build/inaccessible.svg", + "build/invalid.svg", + "build/passing.svg" + ], + "download": [ + "download/amazon.svg", + "download/appstore.svg", + "download/chrome-web-store.svg", + "download/googleplay.svg", + "download/macos.svg", + "download/made-for-iphone.svg", + "download/made_for_iPod.svg", + "download/white-amazon.svg", + "download/white-appstore.svg", + "download/white-chrome-web-store.svg", + "download/white-googleplay.svg", + "download/white-macos.svg", + "download/white-made-for-iphone.svg", + "download/white-made_for_iPod.svg", + "download/white-window.svg", + "download/window.svg" + ], + "github": [ + "github/alt-follow.svg", + "github/alt-fork.svg", + "github/alt-star.svg", + "github/alt.svg", + "github/black-follow.svg", + "github/black-fork.svg", + "github/black-star.svg", + "github/black.svg", + "github/green-alt-follow.svg", + "github/green-alt-fork.svg", + "github/green-alt-star.svg", + "github/green-alt.svg", + "github/green-follow.svg", + "github/green-fork.svg", + "github/green-star.svg", + "github/green.svg", + "github/w-alt-follow.svg", + "github/w-alt-fork.svg", + "github/w-alt-star.svg", + "github/w-alt.svg", + "github/w-follow.svg", + "github/w-fork.svg", + "github/w-star.svg", + "github/w.svg" + ], + "ico": [ + "ico/58.svg", + "ico/alipay-1.svg", + "ico/alipay.svg", + "ico/awesome.svg", + "ico/baidu.svg", + "ico/bower.svg", + "ico/cctv.svg", + "ico/csdn.svg", + "ico/email.svg", + "ico/express.svg", + "ico/facebook.svg", + "ico/gitee.svg", + "ico/gitter.svg", + "ico/google+.svg", + "ico/group.svg", + "ico/grunt-build-with.svg", + "ico/grunt.svg", + "ico/gulp-build-with.svg", + "ico/gulp.svg", + "ico/hexo.svg", + "ico/linkedin.svg", + "ico/linux.svg", + "ico/min-app-store.svg", + "ico/min-awesome.svg", + "ico/min-bibei.svg", + "ico/min-free.svg", + "ico/min-hot.svg", + "ico/min-oss.svg", + "ico/min-tuijian.svg", + "ico/mysql.svg", + "ico/nodejs.svg", + "ico/npm.svg", + "ico/qq.svg", + "ico/qqweibo.svg", + "ico/qzone.svg", + "ico/reddit.svg", + "ico/redhat.svg", + "ico/redis.svg", + "ico/sass.svg", + "ico/segmentfault.svg", + "ico/stackoverflow.svg", + "ico/stylus.svg", + "ico/tudou.svg", + "ico/twitter-follow.svg", + "ico/twitter-tweet.svg", + "ico/twitter.svg", + "ico/ubuntu.svg", + "ico/wechat.svg", + "ico/weibo.svg", + "ico/xitu.svg", + "ico/xunlei.svg", + "ico/youku.svg", + "ico/zhihu.svg" + ], + "lang": [ + "lang/chinese.svg", + "lang/english.svg" + ], + "license": [ + "license/apache.svg", + "license/bsd.svg", + "license/gpl.svg", + "license/lgpl.svg", + "license/mit.svg", + "license/mozilla.svg" + ], + "open": [ + "open/open-in-gitpod.svg", + "open/open-in-vscode.svg" + ], + "plugin": [ + "plugin/angularjs.svg", + "plugin/jquery.svg", + "plugin/jslite.svg", + "plugin/vue.svg", + "plugin/zepto.svg" + ], + "progressed": [ + "progressed/0.svg", + "progressed/1.svg", + "progressed/10.svg", + "progressed/100.svg", + "progressed/11.svg", + "progressed/12.svg", + "progressed/13.svg", + "progressed/14.svg", + "progressed/15.svg", + "progressed/16.svg", + "progressed/17.svg", + "progressed/18.svg", + "progressed/19.svg", + "progressed/2.svg", + "progressed/20.svg", + "progressed/21.svg", + "progressed/22.svg", + "progressed/23.svg", + "progressed/24.svg", + "progressed/25.svg", + "progressed/26.svg", + "progressed/27.svg", + "progressed/28.svg", + "progressed/29.svg", + "progressed/3.svg", + "progressed/30.svg", + "progressed/31.svg", + "progressed/32.svg", + "progressed/33.svg", + "progressed/34.svg", + "progressed/35.svg", + "progressed/36.svg", + "progressed/37.svg", + "progressed/38.svg", + "progressed/39.svg", + "progressed/4.svg", + "progressed/40.svg", + "progressed/41.svg", + "progressed/42.svg", + "progressed/43.svg", + "progressed/44.svg", + "progressed/45.svg", + "progressed/46.svg", + "progressed/47.svg", + "progressed/48.svg", + "progressed/49.svg", + "progressed/5.svg", + "progressed/50.svg", + "progressed/51.svg", + "progressed/52.svg", + "progressed/53.svg", + "progressed/54.svg", + "progressed/55.svg", + "progressed/56.svg", + "progressed/57.svg", + "progressed/58.svg", + "progressed/59.svg", + "progressed/6.svg", + "progressed/60.svg", + "progressed/61.svg", + "progressed/62.svg", + "progressed/63.svg", + "progressed/64.svg", + "progressed/65.svg", + "progressed/66.svg", + "progressed/67.svg", + "progressed/68.svg", + "progressed/69.svg", + "progressed/7.svg", + "progressed/70.svg", + "progressed/71.svg", + "progressed/72.svg", + "progressed/73.svg", + "progressed/74.svg", + "progressed/75.svg", + "progressed/76.svg", + "progressed/77.svg", + "progressed/78.svg", + "progressed/79.svg", + "progressed/8.svg", + "progressed/80.svg", + "progressed/81.svg", + "progressed/82.svg", + "progressed/83.svg", + "progressed/84.svg", + "progressed/85.svg", + "progressed/86.svg", + "progressed/87.svg", + "progressed/88.svg", + "progressed/89.svg", + "progressed/9.svg", + "progressed/90.svg", + "progressed/91.svg", + "progressed/92.svg", + "progressed/93.svg", + "progressed/94.svg", + "progressed/95.svg", + "progressed/96.svg", + "progressed/97.svg", + "progressed/98.svg", + "progressed/99.svg" + ], + "star": [ + "star/black.svg", + "star/gray.svg", + "star/red.svg", + "star/red0.svg", + "star/red1.svg", + "star/red2.svg", + "star/red3.svg", + "star/red4.svg", + "star/red5.svg" + ], + "status": [ + "status/no-dependencies.svg", + "status/pod-invalid.svg", + "status/stable.svg", + "status/wheel-no.svg" + ] } \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 34dc40f..0000000 --- a/index.html +++ /dev/null @@ -1,312 +0,0 @@ - - -
- -