Skip to content

Commit

Permalink
✨ init
Browse files Browse the repository at this point in the history
  • Loading branch information
shawjia committed Dec 18, 2018
0 parents commit 0f3ee6f
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Logs
dist
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions pack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const nativefier = require('nativefier').default;
const { version: appVersion } = require('./package.json');

const options = {
name: 'GeekTime',
targetUrl: 'https://account.geekbang.org/dashboard/buy',
arch: 'x64',
platform: 'darwin',
appVersion,
icon: './icon.png',
out: './dist',
overwrite: true,
width: 720,
height: 960,
singleInstance: true,
fileDownloadOptions: {
saveAs: true
}
};

nativefier(options, (err, appPath) => {
if (err) {
console.error(err);
return;
}

console.log(`saved to ${appPath}`);
});
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "geektime-macos",
"version": "0.0.1",
"private": true,
"scripts": {
"package": "node ./pack.js"
},
"dependencies": {
"nativefier": "^7.6.9"
}
}
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# geektime-macos

> 使用 nativefier 创建的极客时间客户端,入口为[订阅列表](https://account.geekbang.org/dashboard/buy),下载地址:[releases](./releases)
## 打包
`npm run package` or `yarn run package`

0 comments on commit 0f3ee6f

Please sign in to comment.