Skip to content

Commit

Permalink
Merge pull request #53 from rishiqing/beta
Browse files Browse the repository at this point in the history
beta
  • Loading branch information
qinyang912 authored May 13, 2019
2 parents 13a60eb + 40603a2 commit 3911f76
Show file tree
Hide file tree
Showing 117 changed files with 2,726 additions and 3,934 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
30 changes: 30 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# http://editorconfig.org

# A special property that should be specified at the top of the file outside of
# any sections. Set to true to stop .editor config file search on current file
root = true

[*]
# Indentation style
# Possible values - tab, space
indent_style = space

# Indentation size in single-spaced characters
# Possible values - an integer, tab
indent_size = 2

# Line ending file format
# Possible values - lf, crlf, cr
end_of_line = lf

# File character encoding
# Possible values - latin1, utf-8, utf-16be, utf-16le
charset = utf-8

# Denotes whether to trim whitespace at the end of lines
# Possible values - true, false
trim_trailing_whitespace = true

# Denotes whether file should end with a newline
# Possible values - true, false
insert_final_newline = true
17 changes: 17 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,26 @@ node_modules
# Optional REPL history
.node_repl_history


# local env files
.env.local
.env.*.local

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*


package
dir
pack
dmg
.sass-cache
.DS_Store
package*
/dist
5 changes: 5 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
4 changes: 2 additions & 2 deletions .rishiqing-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default:
notify:
title: 'rishiqing-electron-deploy' # 推送时候的标题,可自定义,默认是rishiqing-deploy
title: '日事清-pc端' # 推送时候的标题,可自定义,默认是rishiqing-deploy
nodes: # 定义在哪些环节需要通知 , 在发布的时候,node需要有一些默认值
- 'after-build' # 在所有build执行完之后,通知
- 'after-convert' # 在所有convert执行之后,通知
Expand Down Expand Up @@ -393,4 +393,4 @@ mac-release:
secretAccessKey: ${ALY_OSS_Access_Key}
bucket: 'rishiqing-client'
endpoint: 'http://oss-cn-shenzhen.aliyuncs.com'
prefix: 'pc-autoupdate/mac/release'
prefix: 'pc-autoupdate/mac/release'
117 changes: 0 additions & 117 deletions Gruntfile.js

This file was deleted.

5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
83 changes: 83 additions & 0 deletions copy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
const fs = require('fs')
const path = require('path')
const argv = require('yargs').argv
var env = argv.env
const target = 'dir'
const from_dir = ['common','native','res','dist','utils','download.js','main.js','package.json','page.js','preference.js']

const tar_path = path.join(__dirname,target)
if (env !== 'beta') {
env = 'release'
}
function deleteFolder(current) {
var files = []
if( fs.existsSync(current) ) {
files = fs.readdirSync(current)
files.forEach(function(file,index){
var curPath = path.join(current,file)
if(fs.statSync(curPath).isDirectory()) {
deleteFolder(curPath)
} else {
fs.unlinkSync(curPath)
}
})
fs.rmdirSync(current)
}
}
function copyFile(srcPath, tarPath) {
if (srcPath === path.join(__dirname,'package.json')) {
var result = JSON.parse(fs.readFileSync(srcPath))
result.env = env
result.name = 'rishiqing'
result.releaseTime = (new Date()).toString()
delete result.devDependencies
delete result.scripts
fs.writeFileSync(tarPath, JSON.stringify(result))
} else {
var rs = fs.createReadStream(srcPath)
var ws = fs.createWriteStream(tarPath)
rs.pipe(ws)
}
}
function copyFolder(srcDir, tarDir, cb) {
fs.stat(srcDir,function (err,stats) {
if (stats.isDirectory()) {
fs.mkdir(tarDir,function () {
fs.readdir(srcDir,function (err,files) {
files.forEach(function (file) {
var srcPath = path.join(srcDir, file)
var tarPath = path.join(tarDir, file)
fs.stat(srcPath,function (err,statss) {
if(statss.isDirectory()) {
fs.mkdir(tarPath, function(err) {
copyFolder(srcPath,tarPath)
})
} else {
copyFile(srcPath, tarPath)
}
})
})
})
})
} else {
copyFile(srcDir, tarDir)
}
})
}

// 存在目录,删除再创建,不存在,直接创建
fs.exists(tar_path, function(exists) {
if (exists) {
deleteFolder(tar_path)
}
fs.mkdir(tar_path,function(err){
if (err) {
return console.error(err)
}
from_dir.forEach(function (dir) {
copyFolder(path.join(__dirname,dir) , path.join(tar_path,dir))
})
})
})


2 changes: 1 addition & 1 deletion download.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Download extends Page {
};
}
get loadURL () {
return `file://${path.join(__dirname, '/fe/download/index.html')}`;
return packageJson.env === 'dev' ? 'http://localhost:8080/download' : `file://${path.join(__dirname, '/dist/download/index.html')}`;
}
constructor () {
super();
Expand Down
51 changes: 0 additions & 51 deletions fe/alertTip.js

This file was deleted.

3 changes: 0 additions & 3 deletions fe/alias.js

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added fe/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
20 changes: 0 additions & 20 deletions fe/checkThirdLoginPage.js

This file was deleted.

Loading

0 comments on commit 3911f76

Please sign in to comment.