edge manifest and package edge extension gulp task

This commit is contained in:
Kyle Spearrin 2017-09-01 22:45:33 -04:00
parent 88bcde1e70
commit 3d5be620c1
5 changed files with 117 additions and 26 deletions

View File

@ -206,21 +206,6 @@ gulp.task('dist:move', function () {
return merge(tasks);
});
gulp.task('dist:edge', ['dist'], function () {
var moves = [
{
src: ['src/edge/**/*'],
dest: paths.dist + 'edge'
}
];
var tasks = moves.map(function (move) {
return gulp.src(move.src).pipe(gulp.dest(move.dest));
});
return merge(tasks);
});
gulp.task('dist', ['build'], function (cb) {
return runSequence(
'dist:clean',
@ -243,8 +228,55 @@ gulp.task('dist-firefox', ['dist'], function (cb) {
return zipDist('dist-firefox');
});
gulp.task('dist-edge', ['dist:edge'], function (cb) {
gulp.src(paths.dist + 'manifest.json')
gulp.task('dist-edge', ['dist'], function (cb) {
// move dist to temp extension folder
new Promise(function (resolve, reject) {
gulp.src(paths.dist + '**/*')
.on('error', reject)
.pipe(gulp.dest('temp/Extension/'))
.on('end', resolve);
}).then(function () {
// move windows store files to temp folder
return new Promise(function (resolve, reject) {
gulp.src('store/windows/**/*')
.on('error', reject)
.pipe(gulp.dest('temp/'))
.on('end', resolve);
});
}).then(function () {
// delete dist folder
return new Promise(function (resolve, reject) {
rimraf(paths.dist, function () {
resolve();
})
});
}).then(function () {
// move temp back to dist
return new Promise(function (resolve, reject) {
gulp.src('temp/**/*')
.on('error', reject)
.pipe(gulp.dest(paths.dist))
.on('end', resolve);
});
}).then(function () {
// delete temp folder
return new Promise(function (resolve, reject) {
rimraf('temp', function () {
resolve();
})
});
}).then(function () {
// move src edge folder to dist
return new Promise(function (resolve, reject) {
gulp.src('src/edge/**/*')
.on('error', reject)
.pipe(gulp.dest(paths.dist + 'Extension/edge'))
.on('end', resolve);
});
}).then(function () {
// modify manifest with edge preload stuff
return new Promise(function (resolve, reject) {
gulp.src(paths.dist + 'Extension/manifest.json')
.pipe(jeditor(function (manifest) {
manifest['-ms-preload'] = {
backgroundScript: 'edge/backgroundScriptsAPIBridge.js',
@ -252,8 +284,17 @@ gulp.task('dist-edge', ['dist:edge'], function (cb) {
};
return manifest;
}))
.pipe(gulp.dest(paths.dist));
return zipDist('dist-edge');
.on('error', reject)
.pipe(gulp.dest(paths.dist + 'Extension'))
.on('end', resolve);
});
}).then(function () {
// makeappx.exe must be in your system's path already
child.spawn('makeappx.exe', ['pack', '/h', 'SHA256', '/d', paths.dist, '/p', paths.dist + 'bitwarden.appx']);
cb();
}, function () {
cb();
});
});
gulp.task('dist-other', ['dist'], function (cb) {

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
IgnorableNamespaces="uap3">
<Identity
Name="8bitSolutionsLLC.bitwarden-FreePasswordManager"
Publisher="CN=14D52771-DE3C-4886-B8BF-825BA7690418"
Version="1.15.1.0"/>
<Properties>
<DisplayName>bitwarden - Free Password Manager</DisplayName>
<PublisherDisplayName>8bit Solutions LLC</PublisherDisplayName>
<Logo>Assets/icon_50.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop"
MinVersion="10.0.14393.0"
MaxVersionTested="10.0.14800.0" />
</Dependencies>
<Resources>
<Resource Language="en-us"/>
</Resources>
<Applications>
<Application Id="App">
<uap:VisualElements
AppListEntry="none"
DisplayName="bitwarden - Free Password Manager"
Square150x150Logo="Assets/icon_150.png"
Square44x44Logo="Assets/icon_44.png"
Description="bitwarden is a secure and free password manager for all of your devices."
BackgroundColor="white">
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.appExtension">
<uap3:AppExtension Name="com.microsoft.edge.extension"
Id="EdgeExtension"
PublicFolder="Extension"
DisplayName="bitwarden - Free Password Manager">
</uap3:AppExtension>
</uap3:Extension>
</Extensions>
</Application>
</Applications>
</Package>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB