[ENHANCEMENT]: Android native
This commit is contained in:
parent
52f7a2eed2
commit
b95bb89066
28 changed files with 522 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
|||
build/*.js
|
||||
config/*.js
|
||||
dist/*.js
|
||||
tmp/*.js
|
||||
src/tmp/*.js
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
.DS_Store
|
||||
tmp/
|
||||
src/tmp/
|
||||
node_modules/
|
||||
dist/
|
||||
src/statics/spells.json
|
||||
|
|
10
README.md
10
README.md
|
@ -21,10 +21,16 @@ App contains content from the SRD and is restricted and covered by the OGL. You
|
|||
$ npm install
|
||||
|
||||
# serve with hot reload at localhost:8080
|
||||
$ npm run dev
|
||||
$ npm run dev_web
|
||||
|
||||
# build for production with minification
|
||||
$ npm run build
|
||||
$ npm run build_web # or build_app
|
||||
|
||||
# build cordova (android, iOS potentially in future) release
|
||||
$ npm run build_app_cordova
|
||||
# sign apk with android studio or jarsigner
|
||||
# install on device
|
||||
$ adp install cordova/platforms/android/build/apk/<BUILT-FILE.apk>
|
||||
|
||||
# lint code
|
||||
$ npm run lint
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
'use strict'
|
||||
|
||||
const args = require('yargs').argv
|
||||
|
||||
const fs = require('fs')
|
||||
const spells = require('../src/spells_original.json')
|
||||
|
||||
|
@ -14,6 +16,8 @@ const hashCode = function (str) {
|
|||
return hash
|
||||
}
|
||||
|
||||
console.log('Processing spells...', args.web ? 'for web!' : 'for apps!')
|
||||
|
||||
let spellsWithIDs = spells.map(spell => {
|
||||
spell.id = hashCode(spell.name).toString()
|
||||
return spell
|
||||
|
@ -29,11 +33,21 @@ let indexedSpells = spellsWithIDs.map(spell => {
|
|||
}
|
||||
})
|
||||
|
||||
let dirs = ['tmp']
|
||||
let dirs = ['dist', 'dist/statics', 'src/tmp']
|
||||
dirs.forEach(dir => {
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir)
|
||||
}
|
||||
})
|
||||
fs.writeFileSync('./src/statics/spells.json', JSON.stringify(spellsWithIDs))
|
||||
fs.writeFileSync('./tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
|
||||
|
||||
fs.writeFileSync('./src/tmp/spells_index.js', `export default ${JSON.stringify(indexedSpells)};`)
|
||||
|
||||
if (args.web) {
|
||||
fs.writeFileSync('./dist/statics/spells.json', JSON.stringify(spellsWithIDs));
|
||||
fs.writeFileSync('./src/tmp/spells.js', `export default []; // Will fetch from web`)
|
||||
}
|
||||
else {
|
||||
fs.writeFileSync('./src/tmp/spells.js', `export default ${JSON.stringify(spellsWithIDs)};`)
|
||||
}
|
||||
|
||||
console.log('Processed spells')
|
|
@ -1,6 +1,5 @@
|
|||
process.env.NODE_ENV = 'production'
|
||||
|
||||
require('./generate_index')
|
||||
require('colors')
|
||||
|
||||
var
|
||||
|
|
|
@ -2,5 +2,5 @@ var
|
|||
shell = require('shelljs'),
|
||||
path = require('path')
|
||||
|
||||
shell.rm('-rf', path.resolve(__dirname, '../dist ../tmp'))
|
||||
shell.rm('-rf', path.resolve(__dirname, '../dist ../src/tmp'))
|
||||
console.log(' Cleaned build artifacts.\n')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
process.env.NODE_ENV = 'development'
|
||||
|
||||
require('./generate_index')
|
||||
require('colors')
|
||||
|
||||
var
|
||||
|
|
22
cordova/.idea/compiler.xml
generated
Normal file
22
cordova/.idea/compiler.xml
generated
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
<entry name="!?*.aj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
3
cordova/.idea/copyright/profiles_settings.xml
generated
Normal file
3
cordova/.idea/copyright/profiles_settings.xml
generated
Normal file
|
@ -0,0 +1,3 @@
|
|||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
24
cordova/.idea/cordova.iml
generated
Normal file
24
cordova/.idea/cordova.iml
generated
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration>
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/../gen" />
|
||||
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/../gen" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/../../cordova/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/../../cordova/res" />
|
||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/../../cordova/assets" />
|
||||
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/../../cordova/libs" />
|
||||
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/../../cordova/proguard_logs" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
14
cordova/.idea/misc.xml
generated
Normal file
14
cordova/.idea/misc.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="false" assert-keyword="false" jdk-15="false" />
|
||||
</project>
|
8
cordova/.idea/modules.xml
generated
Normal file
8
cordova/.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/cordova.iml" filepath="$PROJECT_DIR$/.idea/cordova.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
291
cordova/.idea/workspace.xml
generated
Normal file
291
cordova/.idea/workspace.xml
generated
Normal file
|
@ -0,0 +1,291 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
|
||||
<ignored path="cordova.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="CreatePatchCommitExecutor">
|
||||
<option name="PATCH_PATH" value="" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FavoritesManager">
|
||||
<favorites_list name="cordova" />
|
||||
</component>
|
||||
<component name="GenerateSignedApkSettings">
|
||||
<option name="KEY_STORE_PATH" value="$USER_HOME$/android/keystore/sharpshark28-keystore.jks" />
|
||||
<option name="KEY_ALIAS" value="key0" />
|
||||
</component>
|
||||
<component name="GradleLocalSettings">
|
||||
<option name="externalProjectsViewState">
|
||||
<projects_view />
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="y" value="23" />
|
||||
<option name="width" value="1440" />
|
||||
<option name="height" value="873" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="AndroidView" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents />
|
||||
<hideEmptyPackages />
|
||||
<abbreviatePackageNames />
|
||||
<autoscrollToSource />
|
||||
<autoscrollFromSource />
|
||||
<sortByType />
|
||||
<manualOrder />
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scope" />
|
||||
<pane id="AndroidView">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="cordova" />
|
||||
<option name="myItemType" value="com.android.tools.idea.navigator.nodes.AndroidViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="ProjectPane" />
|
||||
<pane id="Scratches" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="android.sdk.path" value="$USER_HOME$/Library/Android/sdk" />
|
||||
<property name="settings.editor.selected.configurable" value="android.sdk-updates" />
|
||||
<property name="settings.editor.splitter.proportion" value="0.2" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/platforms/android/build/outputs/apk/android-release-unsigned.apk" />
|
||||
<property name="ExportedModule" value="cordova" />
|
||||
<property name="ExportedApkPath" value="$PROJECT_DIR$/cordova.apk" />
|
||||
<property name="AndroidRunProguardForReleaseBuild" value="false" />
|
||||
<property name="project.structure.last.edited" value="Modules" />
|
||||
<property name="project.structure.proportion" value="0.0" />
|
||||
<property name="project.structure.side.proportion" value="0.0" />
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Remote" factoryName="Remote">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
<option name="SHMEM_ADDRESS" value="javadebug" />
|
||||
<option name="HOST" value="localhost" />
|
||||
<option name="PORT" value="5005" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="TestNG" factoryName="TestNG">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="ANNOTATION_TYPE" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<envs />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="Applet" default="true" selected="false">
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="HTML_FILE_NAME" />
|
||||
<option name="HTML_USED" value="false" />
|
||||
<option name="WIDTH" value="400" />
|
||||
<option name="HEIGHT" value="300" />
|
||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="JUnit" default="true" selected="false">
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
|
||||
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="ShelveChangesManager" show_recycled="false">
|
||||
<option name="remove_strategy" value="false" />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="c5c4ced8-75d2-4b8c-a2ac-45d7a9743afa" name="Default" comment="" />
|
||||
<created>1502571896668</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1502571896668</updated>
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
|
||||
<editor active="false" />
|
||||
<layout>
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Android Monitor" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24892704" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Android Model" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="Vcs.Log.UiProperties">
|
||||
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||
<collection />
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager />
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ArtifactsStructureConfigurable.UI">
|
||||
<settings>
|
||||
<artifact-editor />
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
<state key="FacetStructureConfigurable.UI">
|
||||
<settings>
|
||||
<last-edited>Android</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
<state key="GlobalLibrariesConfigurable.UI">
|
||||
<settings>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
<state key="JdkListConfigurable.UI">
|
||||
<settings>
|
||||
<last-edited>1.8</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
<state key="ModuleStructureConfigurable.UI">
|
||||
<settings>
|
||||
<last-edited>Android|cordova</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
<state key="ProjectLibrariesConfigurable.UI">
|
||||
<settings>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
2
cordova/.npmignore
Normal file
2
cordova/.npmignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
# OS X
|
||||
.DS_Store
|
31
cordova/config.xml
Normal file
31
cordova/config.xml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="io.cordova.myspells" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>My Spells DnD5e</name>
|
||||
<description>
|
||||
My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.
|
||||
</description>
|
||||
<author email="joe@wroten.me" href="https://www.wroten.me/">
|
||||
Joe Wroten
|
||||
</author>
|
||||
<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="android">
|
||||
<icon density="ldpi" src="res/android/ldpi.png" />
|
||||
<icon density="mdpi" src="res/android/mdpi.png" />
|
||||
<icon density="hdpi" src="res/android/hdpi.png" />
|
||||
<icon density="xhdpi" src="res/android/xhdpi.png" />
|
||||
<icon density="xxhdpi" src="res/android/xxhdpi.png" />
|
||||
<icon density="xxxhdpi" src="res/android/xxxhdpi.png" />
|
||||
</platform>
|
||||
<engine name="android" spec="^6.2.3" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
|
||||
</widget>
|
23
cordova/hooks/README.md
Normal file
23
cordova/hooks/README.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!--
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
-->
|
||||
# Cordova Hooks
|
||||
|
||||
Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. See Hooks Guide for more details: http://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html#Hooks%20Guide.
|
24
cordova/package.json
Normal file
24
cordova/package.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "my_spells_app",
|
||||
"displayName": "My Spells - Cordova",
|
||||
"version": "1.0.0",
|
||||
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Joe Wroten <joe@wroten.me>",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"cordova-android": "^6.2.3",
|
||||
"cordova-plugin-whitelist": "^1.3.2"
|
||||
},
|
||||
"cordova": {
|
||||
"plugins": {
|
||||
"cordova-plugin-whitelist": {}
|
||||
},
|
||||
"platforms": [
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
29
cordova/res/README.md
Normal file
29
cordova/res/README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!--
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
-->
|
||||
|
||||
Note that these image resources are not copied into a project when a project
|
||||
is created with the CLI. Although there are default image resources in a
|
||||
newly-created project, those come from the platform-specific project template,
|
||||
which can generally be found in the platform's `template` directory. Until
|
||||
icon and splashscreen support is added to the CLI, these image resources
|
||||
aren't used directly.
|
||||
|
||||
See https://issues.apache.org/jira/browse/CB-5145
|
BIN
cordova/res/android/hdpi.png
Normal file
BIN
cordova/res/android/hdpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.4 KiB |
BIN
cordova/res/android/ldpi.png
Normal file
BIN
cordova/res/android/ldpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
cordova/res/android/mdpi.png
Normal file
BIN
cordova/res/android/mdpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
BIN
cordova/res/android/xhdpi.png
Normal file
BIN
cordova/res/android/xhdpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
BIN
cordova/res/android/xxhdpi.png
Normal file
BIN
cordova/res/android/xxhdpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
cordova/res/android/xxxhdpi.png
Normal file
BIN
cordova/res/android/xxxhdpi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
1
cordova/www
Symbolic link
1
cordova/www
Symbolic link
|
@ -0,0 +1 @@
|
|||
../dist
|
12
package.json
12
package.json
|
@ -1,13 +1,16 @@
|
|||
{
|
||||
"name": "my_spells",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"description": "My Spells is an open source web-based application to elegantly view spells and save them to your local spellbook.",
|
||||
"author": "Joe Wroten <joe@wroten.me>",
|
||||
"license": "ISC",
|
||||
"scripts": {
|
||||
"clean": "node build/script.clean.js",
|
||||
"dev": "node build/script.dev.js",
|
||||
"build": "node build/script.build.js",
|
||||
"dev_web": "node build/process_spells.js --web && node build/script.dev.js ",
|
||||
"dev_app_cordova": "cd cordova && cordova run --device android",
|
||||
"build_web": "node build/process_spells.js --web && node build/script.build.js",
|
||||
"build_app": "node build/process_spells.js && node build/script.build.js",
|
||||
"build_app_cordova": "cd cordova && cordova build --release",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -67,6 +70,7 @@
|
|||
"webpack-dev-middleware": "^1.8.4",
|
||||
"webpack-hot-middleware": "^2.17.0",
|
||||
"webpack-merge": "^4.0.0",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
"whatwg-fetch": "^2.0.3",
|
||||
"yargs": "^8.0.2"
|
||||
}
|
||||
}
|
||||
|
|
18
src/App.vue
18
src/App.vue
|
@ -25,6 +25,7 @@ import 'whatwg-fetch'
|
|||
import { state, dispatch } from './store'
|
||||
import Header from './components/Header'
|
||||
import Footer from './components/Footer'
|
||||
import bakedInSpells from './tmp/spells'
|
||||
|
||||
Vue.component('nav-header', Header)
|
||||
Vue.component('nav-footer', Footer)
|
||||
|
@ -50,11 +51,18 @@ function fetchFailure (reason) {
|
|||
}
|
||||
|
||||
function fetchSpells () {
|
||||
fetch('./statics/spells.json')
|
||||
.then(response => response.json())
|
||||
.then(fetchSuccess)
|
||||
.catch(fetchFailure)
|
||||
.then(() => { Loading.hide() })
|
||||
console.log('WOW DATA', bakedInSpells)
|
||||
if (bakedInSpells.length) {
|
||||
fetchSuccess(bakedInSpells)
|
||||
Loading.hide()
|
||||
}
|
||||
else {
|
||||
fetch('./statics/spells.json')
|
||||
.then(response => response.json())
|
||||
.then(fetchSuccess)
|
||||
.catch(fetchFailure)
|
||||
.then(() => { Loading.hide() })
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { LocalStorage } from 'quasar'
|
||||
import indexedSpells from '../tmp/spells_index'
|
||||
import indexedSpells from './tmp/spells_index'
|
||||
|
||||
export let state = {
|
||||
indexedSpells,
|
||||
|
|
Loading…
Add table
Reference in a new issue