Skip to content

Commit

Permalink
Merge in esoui (#47)
Browse files Browse the repository at this point in the history
* Version 1.2.8 (#32) (#33)

* Support group points (#21)
* Reset settings (#23)

* Use AreUnitsEqual instead of "myName = name" (#34)

* Update uiLoop.lua

* Fix improveloop (#37)

* Use ZO_Group_GetUnitTagForGroupIndex instead of `"group" .. index`

* Change scope : function to loop

* new loop & remove groupSize

* Improve isOnline

* New condition for main loop

* Improve visibility

* Breadcrumb & SSOnCurrentMap

* Hack SetHidden with SetAlpha to prevent issue

* Version number 1.2.9

* Esoui (#39)

* Version 1.2.8 (#32)

* Support group points (#21)
* Reset settings (#23)

* Version 1.2.9 (#38)

* Version 1.2.8 (#32) (#33)

* Support group points (#21)
* Reset settings (#23)

* Use AreUnitsEqual instead of "myName = name" (#34)

* Update uiLoop.lua

* Fix improveloop (#37)

* Use ZO_Group_GetUnitTagForGroupIndex instead of `"group" .. index`

* Change scope : function to loop

* new loop & remove groupSize

* Improve isOnline

* New condition for main loop

* Improve visibility

* Breadcrumb & SSOnCurrentMap

* Hack SetHidden with SetAlpha to prevent issue

* Version number 1.2.9

* Fix memberRoles (#41)

* Version 1.2.9b (#42) (#43)

* Version 1.2.8 (#32) (#33)

* Support group points (#21)
* Reset settings (#23)

* Use AreUnitsEqual instead of "myName = name" (#34)

* Update uiLoop.lua

* Fix improveloop (#37)

* Use ZO_Group_GetUnitTagForGroupIndex instead of `"group" .. index`

* Change scope : function to loop

* new loop & remove groupSize

* Improve isOnline

* New condition for main loop

* Improve visibility

* Breadcrumb & SSOnCurrentMap

* Hack SetHidden with SetAlpha to prevent issue

* Version number 1.2.9

* Esoui (#39)

* Version 1.2.8 (#32)

* Support group points (#21)
* Reset settings (#23)

* Version 1.2.9 (#38)

* Version 1.2.8 (#32) (#33)

* Support group points (#21)
* Reset settings (#23)

* Use AreUnitsEqual instead of "myName = name" (#34)

* Update uiLoop.lua

* Fix improveloop (#37)

* Use ZO_Group_GetUnitTagForGroupIndex instead of `"group" .. index`

* Change scope : function to loop

* new loop & remove groupSize

* Improve isOnline

* New condition for main loop

* Improve visibility

* Breadcrumb & SSOnCurrentMap

* Hack SetHidden with SetAlpha to prevent issue

* Version number 1.2.9

* Fix memberRoles (#41)

* Improve gulp script (#44)

* Remove GRUNT folder

* Add Gulp

* Update version 100025 & 1.3.0

* Improve package lock

* Update README
  • Loading branch information
GuimDev authored Nov 25, 2018
1 parent aec0249 commit 48026e0
Show file tree
Hide file tree
Showing 15 changed files with 3,511 additions and 814 deletions.
82 changes: 41 additions & 41 deletions ProvisionsTeamFormation.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
## Title: |c00C000Prov|r's TeamFormation 1.2.9b
## Description: Affiche et gère la formation du groupe. (Show and Manage group formation)
## Author: |c00C000Provision|r
## SavedVariables: ProvTFSV
## OptionalDependsOn: LibStub LibAddonMenu-2.0
## APIVersion: 100024
## Version: 1.2.9b
; LibAddonMenu-2.0 r26 : A library to aid in the creation of option panels.
libs/LibStub/LibStub.lua
libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua
libs/LibAddonMenu-2.0/controls/panel.lua
libs/LibAddonMenu-2.0/controls/submenu.lua
libs/LibAddonMenu-2.0/controls/button.lua
libs/LibAddonMenu-2.0/controls/checkbox.lua
libs/LibAddonMenu-2.0/controls/colorpicker.lua
libs/LibAddonMenu-2.0/controls/custom.lua
libs/LibAddonMenu-2.0/controls/description.lua
libs/LibAddonMenu-2.0/controls/dropdown.lua
libs/LibAddonMenu-2.0/controls/editbox.lua
libs/LibAddonMenu-2.0/controls/header.lua
libs/LibAddonMenu-2.0/controls/slider.lua
libs/LibAddonMenu-2.0/controls/texture.lua
libs/LibAddonMenu-2.0/controls/iconpicker.lua
libs/LibAddonMenu-2.0/controls/divider.lua
; END
; TeamFormation
lang/en.lua
lang/$(language).lua
header.lua
function/Error.lua
function/Color.lua
function/LAM2Panel.lua
function/uiLoop.lua
TeamFormation.lua
TeamFormation.xml
Bindings.xml
## Title: |c00C000Prov|r's TeamFormation 1.3.0
## Description: Affiche et gère la formation du groupe. (Show and Manage group formation)
## Author: |c00C000Provision|r
## SavedVariables: ProvTFSV
## OptionalDependsOn: LibStub LibAddonMenu-2.0
## APIVersion: 100025, 100026
## Version: 1.3.0

; LibAddonMenu-2.0 r26 : A library to aid in the creation of option panels.
libs/LibStub/LibStub.lua
libs/LibAddonMenu-2.0/LibAddonMenu-2.0.lua
libs/LibAddonMenu-2.0/controls/panel.lua
libs/LibAddonMenu-2.0/controls/submenu.lua
libs/LibAddonMenu-2.0/controls/button.lua
libs/LibAddonMenu-2.0/controls/checkbox.lua
libs/LibAddonMenu-2.0/controls/colorpicker.lua
libs/LibAddonMenu-2.0/controls/custom.lua
libs/LibAddonMenu-2.0/controls/description.lua
libs/LibAddonMenu-2.0/controls/dropdown.lua
libs/LibAddonMenu-2.0/controls/editbox.lua
libs/LibAddonMenu-2.0/controls/header.lua
libs/LibAddonMenu-2.0/controls/slider.lua
libs/LibAddonMenu-2.0/controls/texture.lua
libs/LibAddonMenu-2.0/controls/iconpicker.lua
libs/LibAddonMenu-2.0/controls/divider.lua
; END

; TeamFormation
lang/en.lua
lang/$(language).lua

header.lua

function/Error.lua
function/Color.lua
function/LAM2Panel.lua
function/uiLoop.lua
TeamFormation.lua
TeamFormation.xml

Bindings.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ProvisionsTeamFormation 1.2.8
ProvisionsTeamFormation 1.3.0
=============

TeamFormation is a user Interface for The Elder Scrolls Online, designed to show the positions and health of your teammates, like a radar.
Expand Down
3 changes: 3 additions & 0 deletions builderGulp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
archive/
build/
node_modules/
73 changes: 73 additions & 0 deletions builderGulp/Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
const path = require('path'),
gulp = require('gulp'),
zip = require('gulp-zip'),
del = require('del'),
fs = require('fs'),
addonConfig = require('./config.js');

const buildFolderPATH = path.resolve(__dirname, addonConfig.buildFolder),
deployFolderPATH = path.resolve(addonConfig.esoAddonDir, addonConfig.modName),
archiveFolderPATH = path.resolve(__dirname, addonConfig.archiveFolder),
sourceFiles = addonConfig.sourceFiles.map((str) => str.replace(/\//g, path.sep)),
outputFolderBuild = path.resolve(buildFolderPATH, addonConfig.modName);

process.chdir(path.resolve(__dirname, "../"));

const cleanBuild = () => del([
buildFolderPATH,
]);

const cleanDeploy = () => del([
deployFolderPATH,
], {force: true});

const generateBuild = () =>
gulp.src(sourceFiles)
.pipe(gulp.dest(outputFolderBuild))
;

const generateDeploy = () =>
gulp.src(outputFolderBuild + path.sep + "**")
.pipe(gulp.dest(deployFolderPATH))
;

const generateArchive = (buildFolderPATH) =>
gulp.src(outputFolderBuild + path.sep + "**")
.pipe(zip(`${addonConfig.modName}_${getVersion()}.zip`))
.pipe(gulp.dest(archiveFolderPATH))
;

function getVersion() {
const txtFile = getFileContent(addonConfig.modName + ".txt");

const version = (txtFile.match(/\n\#\# Version\: (\d{1,3}\.\d{1,3}\.\d{1,3}[a-z]?)/) || [])[1];

if (!version) {
console.log("Bad version in header of " + addonConfig.modName + ".txt");
process.exit();
}

for (let i = 0, content, match, file; i < addonConfig.filesWithVersionNumber.length; i++) {
file = addonConfig.filesWithVersionNumber[i];
content = getFileContent(file[0]);
match = content.match(new RegExp(version, "g")) || [];
if (match.length !== file[1]) {
console.log(`Error: Version not find. ${file[0]} ${match.length}/${file[1]}`);
console.log(`Current version: ${version}`);
process.exit();
}
}

return version;
}

function getFileContent(filename) {
return fs.readFileSync(filename).toString();
}

gulp.task("clean", cleanBuild);
gulp.task("clean-deploy", cleanDeploy);

gulp.task("build", gulp.series(cleanBuild, generateBuild));
gulp.task("deploy", gulp.series("build", cleanDeploy, generateDeploy));
gulp.task("archive", gulp.series("build", generateArchive));
24 changes: 24 additions & 0 deletions builderGulp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Dependencies
- [Node.js](https://nodejs.org) - Follow link to install for your platform
- [Gulp-cli](https://yarnpkg.com/) - To use `gulp` command. Install Gulp-cli after Node.js with `npm install gulp-cli -g`

# Configure
See '[config.js](./config.js)' for available configurations.
- `modName`: Name of the mod. (duh)
- `defaultBuildFolder`: Destination for 'built' addon files.
- `archiveFolder`: Destination for zip.
- `sourceFiles`: Provides the list of files to be deployed. New files that should be included with the addon need to be added to the list.
- `filesWithVersionNumber`: Provides the list of files which contain version number. Gulp will alert you if you forgot to update version in your file.
- `esoAddonDir`: Specifies where to deploy game files. It looks to see if the `ESO_ADDONS_PATH` environment variable is set.

Set `ESO_ADDONS_PATH` environment variable to `C:\Users\YOUR-NAME\Documents\Elder Scrolls Online\live\AddOns` (replace `YOUR-NAME`).

# Available commands

1. `gulp build`
- Copy addon files to 'build' directory specified in [config.js](./config.js).
2. `gulp deploy`
- Build and copy files from 'build' folder into the folder defined in `esoAddonDir` in [config.js](config.js).
3. `gulp archive`
- Build and ZIP files from 'build' folder in `archiveFolder` in [config.js](config.js).

33 changes: 33 additions & 0 deletions builderGulp/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const defaultBuildFolder = "build";

const addonConfig = {
modName: "ProvisionsTeamFormation",
buildFolder: defaultBuildFolder,
archiveFolder: "archive",

// Set addon directory in environment vars or set default above. Mine is set to "C:\\Users\\Mike\\Documents\\Elder Scrolls Online\\live\\AddOns"
esoAddonDir: process.env["ESO_ADDONS_PATH"] || defaultBuildFolder,
sourceFiles: [
"function/**",
"lang/**",
"libs/**",
"Bindings.xml",
"header.lua",
"ProvisionsTeamFormation.txt",
"README.md",
"TeamFormation.lua",
"TeamFormation.xml",
"TF_low.jpg"
],
filesWithVersionNumber: [
["ProvisionsTeamFormation.txt", 2],
["README.md", 1],
["header.lua", 1]
]
};

module.exports = addonConfig;

function getFileContent(filename) {
return fs.readFileSync(filename).toString();
}
Loading

0 comments on commit 48026e0

Please sign in to comment.