Skip to content

Commit

Permalink
v1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
matortheeternal committed Feb 7, 2018
1 parent 44c679c commit f34eccb
Show file tree
Hide file tree
Showing 9 changed files with 236 additions and 12 deletions.
5 changes: 5 additions & 0 deletions dist/docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ <h2>Patcher Helpers</h2>

<h2>Patcher Locals</h2>
<p>The locals object is passed to all patcher functions. The locals object allows you to persist variables across all steps of your patcher's execution. It's recommended to use the locals object over using variables defined directly in your module because the locals object does not persist between patcher executions.</p>

<h2>Special Patcher Settings</h2>
<p>There are several special patcher settings that are used by UPF internally.</p>

<api-items items="patcherSettings"></api-items>
22 changes: 22 additions & 0 deletions dist/docs/patcherSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"name": "cache",
"type": "object",
"description": "The FormID cache used for form ID consistency when the user regenerates the patch file. You should never write directly to this setting."
},
{
"name": "hide",
"type": "boolean",
"description": "If set to true the patcher settings tab will not be displayed on the manage patchers modal."
},
{
"name": "ignoredFiles",
"type": "array of string",
"description": "Array of filenames to ignore when patching. The `ignore-plugins` directive sets this value."
},
{
"name": "processDeletedRecords",
"type": "boolean",
"description": "If set to true deleted records will not be automatically excluded when loading records in process blocks or when using the `helpers.loadRecords` function."
}
]
13 changes: 11 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,20 @@ ngapp.service('patcherWorker', function(patcherService, progressService, idCache
return cache[filename];
};

let filterDeletedRecords = function(records) {
if (patcherSettings.processDeletedRecords) return records;
return records.filter(function(record) {
return !xelib.GetRecordFlag(record, 'Deleted');
});
};

let getRecords = function(filename, search, overrides) {
let file = getFile(filename),
cacheKey = `${search}_${+overrides}`;
if (!file[cacheKey])
file[cacheKey] = xelib.GetRecords(file.handle, search, overrides);
if (!file[cacheKey]) {
let records = xelib.GetRecords(file.handle, search, overrides);
file[cacheKey] = filterDeletedRecords(records);
}
return file[cacheKey];
};

Expand Down
2 changes: 1 addition & 1 deletion dist/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "unifiedPatchingFramework",
"name": "Unified Patching Framework",
"author": "Mator",
"version": "1.0.0",
"version": "1.1",
"repo": "https://github.com/matortheeternal/zedit-unified-patching-framework",
"released": "9/7/2017",
"updated": "11/20/2017",
Expand Down
2 changes: 1 addition & 1 deletion dist/partials/managePatchersModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<form class="tab-contents">
<ng-include src="currentTab.templateUrl" dyn-controller="currentTab.controller"></ng-include>

<div class="action-button-container" ng-if="onBuildPatchesTab">
<div class="primary-actions" ng-if="onBuildPatchesTab">
<button class="action-btn" ng-click="$broadcast('buildAllPatches')" ng-disabled="noPatchers">Build All</button>
<button class="action-btn positive" ng-click="$broadcast('addPatchPlugin')" ng-disabled="noPatchers">Add Plugin</button>
</div>
Expand Down
23 changes: 20 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
let gulp = require('gulp'),
clean = require('gulp-clean'),
include = require('gulp-include');
const fs = require('fs'),
gulp = require('gulp'),
clean = require('gulp-clean'),
include = require('gulp-include'),
rename = require('gulp-rename'),
zip = require('gulp-zip');

gulp.task('clean', function() {
return gulp.src('dist', {read: false})
Expand All @@ -26,6 +29,20 @@ gulp.task('build', ['clean'], function() {
.pipe(gulp.dest('dist'));
});

gulp.task('release', function() {
let moduleInfo = JSON.parse(fs.readFileSync('module.json')),
moduleId = moduleInfo.id,
moduleVersion = moduleInfo.version,
zipFileName = `${moduleId}-v${moduleVersion}.zip`;

console.log(`Packaging ${zipFileName}`);

gulp.src('dist/**/*', { base: 'dist/'})
.pipe(rename((path) => path.dirname = `${moduleId}/${path.dirname}`))
.pipe(zip(zipFileName))
.pipe(gulp.dest('.'));
});

gulp.task('watch', function() {
gulp.watch('src/**/*.js', ['build']);
gulp.watch('partials/**/*.html', ['build']);
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "unifiedPatchingFramework",
"name": "Unified Patching Framework",
"author": "Mator",
"version": "1.0.0",
"version": "1.1",
"repo": "https://github.com/matortheeternal/zedit-unified-patching-framework",
"released": "9/7/2017",
"updated": "11/20/2017",
Expand Down
171 changes: 170 additions & 1 deletion package-lock.json

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

Loading

0 comments on commit f34eccb

Please sign in to comment.