Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cordova to build native app for 📱 🖥️ #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ yarn-error.log*
*.sln
*.sw?
*.env

# Cordova
/src-cordova/platforms
/src-cordova/plugins
/public/cordova.js
31 changes: 24 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{
"name": "webplayer",
"version": "0.2.1",
"license": "GPL-3.0 License",
"email": "contact@jelliti.me",
"url": "https://oussama.jelliti.me",
"name": "radio-player",
"version": "0.2.2",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
"build": "vue-cli-service build",
"cordova-build-android": "cross-env CORDOVA_PLATFORM=android vue-cli-service cordova-build-android",
"cordova-build-browser": "cross-env CORDOVA_PLATFORM=browser vue-cli-service cordova-build-browser",
"cordova-build-electron": "cross-env CORDOVA_PLATFORM=electron vue-cli-service cordova-build-electron",
"cordova-build-ios": "cross-env CORDOVA_PLATFORM=ios vue-cli-service cordova-build-ios",
"cordova-build-only-www-android": "cross-env CORDOVA_PLATFORM=android vue-cli-service cordova-build-only-www-android",
"cordova-build-only-www-browser": "cross-env CORDOVA_PLATFORM=browser vue-cli-service cordova-build-only-www-browser",
"cordova-build-only-www-electron": "cross-env CORDOVA_PLATFORM=electron vue-cli-service cordova-build-only-www-electron",
"cordova-build-only-www-ios": "cross-env CORDOVA_PLATFORM=ios vue-cli-service cordova-build-only-www-ios",
"cordova-build-only-www-osx": "cross-env CORDOVA_PLATFORM=osx vue-cli-service cordova-build-only-www-osx",
"cordova-build-osx": "cross-env CORDOVA_PLATFORM=osx vue-cli-service cordova-build-osx",
"cordova-prepare": "vue-cli-service cordova-prepare",
"cordova-serve-android": "cross-env CORDOVA_PLATFORM=android vue-cli-service cordova-serve-android",
"cordova-serve-browser": "cross-env CORDOVA_PLATFORM=browser vue-cli-service cordova-serve-browser",
"cordova-serve-electron": "cross-env CORDOVA_PLATFORM=electron vue-cli-service cordova-serve-electron",
"cordova-serve-ios": "cross-env CORDOVA_PLATFORM=ios vue-cli-service cordova-serve-ios",
"cordova-serve-osx": "cross-env CORDOVA_PLATFORM=osx vue-cli-service cordova-serve-osx"
},
"dependencies": {
"axios": "^0.21.1",
Expand All @@ -27,6 +40,10 @@
"babel-plugin-transform-remove-console": "^6.9.4",
"sass": "^1.49.7",
"sass-loader": "^10.0.0",
"vue-cli-plugin-cordova": "~2.4.1",
"vue-template-compiler": "^2.6.10"
}
},
"email": "contact@jelliti.me",
"license": "GPL-3.0 License",
"url": "https://oussama.jelliti.me"
}
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<meta name="apple-mobile-web-app-status-bar-style" content="#222336">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="preconnect" href="https://radio.jelliti.me">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto+Condensed:700"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css"/>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Condensed:700"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js"></script>
<title>Joujma FM | Radio Station</title>
<style type="text/css">
Expand Down
8 changes: 8 additions & 0 deletions src-cordova/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store

# Generated by package manager
node_modules/

# Generated by Cordova
/plugins/
/platforms/
27 changes: 27 additions & 0 deletions src-cordova/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="me.jelliti.player" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Radio Player</name>
<description>
Radio player for Azuracast
</description>
<author email="oussama@jelliti.me" href="https://jelliti.me">
Oussama
</author>
<!-- this hook will point your config.xml to the DevServer on Serve -->
<hook type="after_prepare" src="../node_modules/vue-cli-plugin-cordova/serve-config-hook.js" />
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
</widget>
35 changes: 35 additions & 0 deletions src-cordova/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "me.jelliti.player",
"displayName": "Radio Player",
"version": "0.0.1",
"description": "AzuraCast Radio Player",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"ecosystem:cordova"
],
"author": "Apache Cordova Team",
"license": "Apache-2.0",
"devDependencies": {
"cordova-android": "~9.1.0",
"cordova-browser": "~6.0.0",
"cordova-electron": "~1.1.1",
"cordova-ios": "~6.2.0",
"cordova-osx": "~6.0.0",
"cordova-plugin-whitelist": "^1.3.4"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {}
},
"platforms": [
"android",
"ios",
"browser",
"osx",
"electron"
]
}
}
3 changes: 3 additions & 0 deletions src-cordova/www/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
*/
!.gitignore
11 changes: 8 additions & 3 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module.exports = {

}
},

configureWebpack: {
// resolve: {
// alias: {
Expand All @@ -35,9 +36,13 @@ module.exports = {

],
},

productionSourceMap : (process.env.NODE_ENV === 'production'),
transpileDependencies: ["axios","standardized-audio-context"],
devServer: {
proxy: 'https://api.textyl.co/',
publicPath: '',

pluginOptions: {
cordovaPath: 'src-cordova'
}
};
};