Skip to content
This repository has been archived by the owner on Apr 10, 2022. It is now read-only.

Commit

Permalink
Merge branch 'electron-web'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
xiandanin committed Dec 29, 2019
2 parents e0851fc + 69f0eb1 commit d8d9c64
Show file tree
Hide file tree
Showing 99 changed files with 3,179 additions and 1,921 deletions.
35 changes: 25 additions & 10 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,43 @@
"env": {
"main": {
"presets": [
["env", {
"targets": { "node": 7 }
}],
[
"env",
{
"targets": {
"node": 7
}
}
],
"stage-0"
]
},
"renderer": {
"presets": [
["env", {
"modules": false
}],
[
"env",
{
"modules": false
}
],
"stage-0"
]
},
"web": {
"presets": [
["env", {
"modules": false
}],
[
"env",
{
"modules": false
}
],
"stage-0"
]
}
},
"plugins": ["transform-runtime"]
"plugins": [
"transform-runtime",
"transform-es2015-modules-commonjs",
"transform-async-to-generator"
]
}
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 1 addition & 1 deletion .electron-vue/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function startElectron () {
}

electronProcess = spawn(electron, args)

electronProcess.stdout.on('data', data => {
electronLog(data, 'blue')
})
Expand Down
4 changes: 2 additions & 2 deletions .electron-vue/webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const path = require('path')
const { dependencies } = require('../package.json')
const webpack = require('webpack')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const MinifyPlugin = require("babel-minify-webpack-plugin")

let mainConfig = {
entry: {
Expand Down Expand Up @@ -73,7 +73,7 @@ if (process.env.NODE_ENV !== 'production') {
*/
if (process.env.NODE_ENV === 'production') {
mainConfig.plugins.push(
new BabiliWebpackPlugin(),
new MinifyPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"'
})
Expand Down
12 changes: 7 additions & 5 deletions .electron-vue/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const path = require('path')
const {dependencies} = require('../package.json')
const webpack = require('webpack')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const MinifyPlugin = require('babel-minify-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
Expand All @@ -20,7 +20,6 @@ const {VueLoaderPlugin} = require('vue-loader')
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/webpack-configurations.html#white-listing-externals
*/
let whiteListedModules = ['vue', 'element-ui']

let rendererConfig = {
devtool: '#cheap-module-eval-source-map',
entry: {
Expand Down Expand Up @@ -48,7 +47,7 @@ let rendererConfig = {
{
loader: 'sass-resources-loader',
options: {
resources: path.resolve(__dirname, '../src/renderer/styles/app.scss')
resources: path.resolve(__dirname, '../src/renderer/assets/scss/app.scss')
}
}
]
Expand Down Expand Up @@ -132,6 +131,8 @@ let rendererConfig = {
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
title: process.env.npm_package_build_productName,
description: process.env.npm_package_description,
templateParameters (compilation, assets, options) {
return {
compilation: compilation,
Expand Down Expand Up @@ -164,7 +165,8 @@ let rendererConfig = {
resolve: {
alias: {
'@': path.join(__dirname, '../src/renderer'),
'vue$': 'vue/dist/vue.esm.js'
'vue$': 'vue/dist/vue.esm.js',
'~': path.resolve(),
},
extensions: ['.js', '.vue', '.json', '.css', '.node']
},
Expand All @@ -189,7 +191,7 @@ if (process.env.NODE_ENV === 'production') {
rendererConfig.devtool = ''

rendererConfig.plugins.push(
new BabiliWebpackPlugin(),
new MinifyPlugin(),
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../static'),
Expand Down
8 changes: 4 additions & 4 deletions .electron-vue/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ process.env.BABEL_ENV = 'web'
const path = require('path')
const webpack = require('webpack')

const BabiliWebpackPlugin = require('babili-webpack-plugin')
const MinifyPlugin = require('babel-minify-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
const {VueLoaderPlugin} = require('vue-loader')

let webConfig = {
devtool: '#cheap-module-eval-source-map',
Expand Down Expand Up @@ -52,7 +52,7 @@ let webConfig = {
{
test: /\.js$/,
use: 'babel-loader',
include: [ path.resolve(__dirname, '../src/renderer') ],
include: [path.resolve(__dirname, '../src/renderer')],
exclude: /node_modules/
},
{
Expand Down Expand Up @@ -131,7 +131,7 @@ if (process.env.NODE_ENV === 'production') {
webConfig.devtool = ''

webConfig.plugins.push(
new BabiliWebpackPlugin(),
new MinifyPlugin(),
new CopyWebpackPlugin([
{
from: path.join(__dirname, '../static'),
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
src/renderer/assets/*
35 changes: 24 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
// https://eslint.org/docs/user-guide/configuring

module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
'parser': 'babel-eslint',
'ecmaVersion': 2017,
'sourceType': 'module'
},
env: {
node: true,
browser: true,
node: true
},
extends: 'standard',
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
globals: {
__static: true
},
plugins: [
'html'
'vue'
],
'rules': {
'no-unused-vars': 0,
// allow paren-less arrow functions
'arrow-parens': 0,
// add your custom rules here
rules: {
// 关闭缩进检查
'indent': 0,
'vue/require-v-for-key': 'off',
'no-unused-vars': 'off',
'vue/no-unused-components': 'off',
'vue/valid-v-for': 'warn',
// allow async-await
'generator-star-spacing': 0,
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: issue_template
about: 默认/通用
title: ''
labels: ''
assignees: ''

---

>操作系统版本:
>磁力搜版本:
#### 问题描述:


#### 异常日志:
```
```
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ npm-debug.log
npm-debug.log.*
thumbs.db
!.gitkeep
.idea
workspace.xml
src/dist
Project_Default.xml
package-lock.json
build/icons/.icns.iconset
.idea
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLinters/eslint.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/magnetW.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_install:
| tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi
install:
- nvm install 7
- nvm install 10
- curl -o- -L https://yarnpkg.com/install.sh | bash
- source ~/.bashrc
- npm install -g xvfb-maybe
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
最近太忙实在无暇维护规则,所以可能已经有大部分源站失效了,有条件的可以[参考文档](https://magnetw.app/advanced/rule-write.html#%E6%89%8B%E5%8A%A8%E9%87%87%E9%9B%86)提交PR

[![GitHub release](https://img.shields.io/github/release/xiandanin/magnetW)](https://github.com/xiandanin/magnetW/releases)
[![GitHub stars](https://img.shields.io/github/stars/xiandanin/magnetW)](https://github.com/xiandanin/magnetW/stars)
[![GitHub forks](https://img.shields.io/github/forks/xiandanin/magnetW)](https://github.com/xiandanin/magnetW/forks)
[![GitHub license](https://img.shields.io/github/license/xiandanin/magnetW)](https://github.com/xiandanin/magnetW/blob/master/LICENSE)
![Support Platforms](https://camo.githubusercontent.com/a50c47295f350646d08f2e1ccd797ceca3840e52/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6d61634f5325323025374325323057696e646f77732532302537432532304c696e75782d6c69676874677265792e737667)

<font size="4">[[中文文档]](http://magnetw.app/guide/)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[https://magnetw.app](https://magnetw.app/)</font>
<font size="4">[[使用指南]](http://magnetw.app/guide/)</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="4">[[中文文档]](https://github.com/xiandanin/magnetW/wiki)</font>

## 简介
`magnetW`基于[magnetX](https://github.com/youusername/magnetX)的规则原理,将各个磁力站的搜索结果统一格式化

magnetW全面升级3.x,网页版不再更新 [https://biedian.me](https://biedian.me/)(需要梯子)

## 安装
[Github Releases](https://github.com/xiandanin/magnetW/releases)下载对应平台
或者
[文档页](https://magnetw.app/)下载对应平台
>Linux版未测试

## 截图
![](/screenshots/app.gif)
Expand Down
Binary file modified build/icons/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build/icons/icon.icns
Binary file not shown.
Binary file modified build/icons/icon.ico
Binary file not shown.
Empty file removed dist/web/.gitkeep
Empty file.
Loading

0 comments on commit d8d9c64

Please sign in to comment.