Skip to content

Commit

Permalink
Release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RALMAZ committed Apr 7, 2019
1 parent 8f07d2b commit 907e040
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 7,174 deletions.
4 changes: 3 additions & 1 deletion .electron-vue/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function build () {

function pack (config) {
return new Promise((resolve, reject) => {
config.mode = 'production'
webpack(config, (err, stats) => {
if (err) reject(err.stack || err)
else if (stats.hasErrors()) {
Expand Down Expand Up @@ -99,6 +100,7 @@ function pack (config) {

function web () {
del.sync(['dist/web/*', '!.gitkeep'])
webConfig.mode = 'production'
webpack(webConfig, (err, stats) => {
if (err || stats.hasErrors()) console.log(err)

Expand Down Expand Up @@ -127,4 +129,4 @@ function greeting () {
})
} else console.log(chalk.yellow.bold('\n lets-build'))
console.log()
}
}
32 changes: 22 additions & 10 deletions .electron-vue/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ function logStats (proc, data) {
function startRenderer () {
return new Promise((resolve, reject) => {
rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer)

rendererConfig.mode = 'development'
const compiler = webpack(rendererConfig)
hotMiddleware = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500
hotMiddleware = webpackHotMiddleware(compiler, {
log: false,
heartbeat: 2500
})

compiler.plugin('compilation', compilation => {
compilation.plugin('html-webpack-plugin-after-emit', (data, cb) => {
compiler.hooks.compilation.tap('compilation', compilation => {
compilation.hooks.htmlWebpackPluginAfterEmit.tapAsync('html-webpack-plugin-after-emit', (data, cb) => {
hotMiddleware.publish({ action: 'reload' })
cb()
})
})

compiler.plugin('done', stats => {
compiler.hooks.done.tap('done', stats => {
logStats('Renderer', stats)
})

Expand All @@ -80,10 +80,10 @@ function startRenderer () {
function startMain () {
return new Promise((resolve, reject) => {
mainConfig.entry.main = [path.join(__dirname, '../src/main/index.dev.js')].concat(mainConfig.entry.main)

mainConfig.mode = 'development'
const compiler = webpack(mainConfig)

compiler.plugin('watch-run', (compilation, done) => {
compiler.hooks.watchRun.tapAsync('watch-run', (compilation, done) => {
logStats('Main', chalk.white.bold('compiling...'))
hotMiddleware.publish({ action: 'compiling' })
done()
Expand Down Expand Up @@ -114,8 +114,20 @@ function startMain () {
}

function startElectron () {
electronProcess = spawn(electron, ['--inspect=5858', path.join(__dirname, '../dist/electron/main.js')])
var args = [
'--inspect=5858',
path.join(__dirname, '../dist/electron/main.js')
]

// detect yarn or npm and process commandline args accordingly
if (process.env.npm_execpath.endsWith('yarn.js')) {
args = args.concat(process.argv.slice(3))
} else if (process.env.npm_execpath.endsWith('npm-cli.js')) {
args = args.concat(process.argv.slice(2))
}

electronProcess = spawn(electron, args)

electronProcess.stdout.on('data', data => {
electronLog(data, 'blue')
})
Expand Down
26 changes: 19 additions & 7 deletions .electron-vue/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ const webpack = require('webpack')

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

/**
* List of node_modules to include in webpack bundle
Expand All @@ -30,12 +31,21 @@ let rendererConfig = {
],
module: {
rules: [
{
test: /\.scss$/,
use: ['vue-style-loader', 'css-loader', 'sass-loader']
},
{
test: /\.sass$/,
use: ['vue-style-loader', 'css-loader', 'sass-loader?indentedSyntax']
},
{
test: /\.less$/,
use: ['vue-style-loader', 'css-loader', 'less-loader']
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
use: ['vue-style-loader', 'css-loader']
},
{
test: /\.html$/,
Expand All @@ -58,7 +68,8 @@ let rendererConfig = {
extractCSS: process.env.NODE_ENV === 'production',
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!sass-loader'
scss: 'vue-style-loader!css-loader!sass-loader',
less: 'vue-style-loader!css-loader!less-loader'
}
}
}
Expand Down Expand Up @@ -98,7 +109,8 @@ let rendererConfig = {
__filename: process.env.NODE_ENV !== 'production'
},
plugins: [
new ExtractTextPlugin('styles.css'),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({filename: 'styles.css'}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
Expand Down
26 changes: 19 additions & 7 deletions .electron-vue/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const webpack = require('webpack')

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

let webConfig = {
devtool: '#cheap-module-eval-source-map',
Expand All @@ -17,12 +18,21 @@ let webConfig = {
},
module: {
rules: [
{
test: /\.scss$/,
use: ['vue-style-loader', 'css-loader', 'sass-loader']
},
{
test: /\.sass$/,
use: ['vue-style-loader', 'css-loader', 'sass-loader?indentedSyntax']
},
{
test: /\.less$/,
use: ['vue-style-loader', 'css-loader', 'less-loader']
},
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
use: ['vue-style-loader', 'css-loader']
},
{
test: /\.html$/,
Expand All @@ -42,7 +52,8 @@ let webConfig = {
extractCSS: true,
loaders: {
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
scss: 'vue-style-loader!css-loader!sass-loader'
scss: 'vue-style-loader!css-loader!sass-loader',
less: 'vue-style-loader!css-loader!less-loader'
}
}
}
Expand Down Expand Up @@ -70,7 +81,8 @@ let webConfig = {
]
},
plugins: [
new ExtractTextPlugin('styles.css'),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({filename: 'styles.css'}),
new HtmlWebpackPlugin({
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ npm-debug.log
npm-debug.log.*
thumbs.db
!.gitkeep
package-lock.json
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Logo by <a href="https://github.com/nunojesus">@nunojesus</a>
> Hearty welcome issue and contribution

### Current v 0.0.2
### Current v 0.0.3

## Download for [Windows](https://github.com/RALMAZ/Record-Player/releases/download/0.0.2/Radio.Record.Setup.0.0.2.exe)
## Download for [Windows](https://github.com/RALMAZ/Record-Player/releases/download/0.0.3/Radio.Record.Setup.0.0.3.exe)

## Download for Mac - `Disabled, build for Mac not updated to 0.0.2`
## Download for Mac - `Disabled, build for Mac not updated to 0.0.3`


## License
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ init:

install:
- ps: Install-Product node 8 x64
- choco install yarn --ignore-dependencies
- git reset --hard HEAD
- yarn
- node --version
Expand Down
91 changes: 45 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "record-radio",
"version": "0.0.0",
"author": "Roman ALmazov <ralmaz@fex.net>",
"description": "electron based record radio player",
"name": "record-player",
"version": "0.0.3",
"author": "Roman Almazov <ralmaz[email protected]>",
"description": "Electron based Record Radio player",
"license": "MIT",
"main": "./dist/electron/main.js",
"scripts": {
Expand All @@ -17,7 +17,7 @@
"postinstall": ""
},
"build": {
"productName": "Radio Record",
"productName": "Record Player",
"appId": "org.ralmaz.electron-vue",
"directories": {
"output": "build"
Expand All @@ -41,65 +41,64 @@
]
},
"mac": {
"icon": "build/icons/icon.icns",
"publish": [
"github"
]
"icon": "build/icons/icon.icns"
},
"win": {
"icon": "build/icons/icon.ico",
"publish": [
"github"
]
"icon": "build/icons/icon.ico"
},
"linux": {
"icon": "build/icons",
"publish": [
"github"
]
"icon": "build/icons"
}
},
"dependencies": {
"vue": "^2.5.16",
"axios": "^0.18.0",
"discord-rpc": "^3.0.1",
"electron-dl": "^1.12.0",
"electron-json-storage": "^4.1.6",
"vue-electron": "^1.0.6",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-electron": "^1.0.0",
"sass-loader": "^7.1.0",
"vue": "^2.3.3",
"vue-electron": "^1.0.6"
"discord-rpc": "^3.0.1",
"electron-dl": "^1.14.0",
"electron-json-storage": "^4.1.6"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"ajv": "^6.5.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.24.1",
"babel-register": "^6.26.0",
"babili-webpack-plugin": "^0.1.2",
"cfonts": "^1.1.3",
"chalk": "^2.1.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.4",
"cfonts": "^2.1.2",
"chalk": "^2.4.1",
"copy-webpack-plugin": "^4.5.1",
"cross-env": "^5.1.6",
"css-loader": "^0.28.11",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^2.0.0",
"electron-builder": "^19.19.1",
"electron-debug": "^1.4.0",
"electron-devtools-installer": "^2.2.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.30.1",
"electron": "^2.0.4",
"electron-debug": "^1.5.0",
"electron-devtools-installer": "^2.2.4",
"electron-builder": "^20.19.2",
"mini-css-extract-plugin": "0.4.0",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"style-loader": "^0.18.2",
"url-loader": "^0.5.9",
"node-sass": "^4.9.2",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"url-loader": "^1.0.1",
"vue-html-loader": "^1.2.4",
"vue-loader": "^13.0.5",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"webpack": "^3.5.2",
"webpack-dev-server": "^2.7.1",
"webpack-hot-middleware": "^2.18.2"
"vue-loader": "^15.2.4",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack-cli": "^3.0.8",
"webpack": "^4.15.1",
"webpack-dev-server": "^3.1.4",
"webpack-hot-middleware": "^2.22.2",
"webpack-merge": "^4.1.3"
}
}
8 changes: 5 additions & 3 deletions src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
<body>
<div id="app"></div>
<!-- Set `__static` path to static files in production -->
<script>
if (process.env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
</script>
<% if (!process.browser) { %>
<script>
if (process.env.NODE_ENV !== 'development') window.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
</script>
<% } %>

<!-- webpack builds are automatically injected -->
</body>
Expand Down
Loading

0 comments on commit 907e040

Please sign in to comment.