mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
edge manifest and package edge extension gulp task
This commit is contained in:
parent
88bcde1e70
commit
3d5be620c1
93
gulpfile.js
93
gulpfile.js
@ -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,17 +228,73 @@ 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')
|
||||
.pipe(jeditor(function (manifest) {
|
||||
manifest['-ms-preload'] = {
|
||||
backgroundScript: 'edge/backgroundScriptsAPIBridge.js',
|
||||
contentScript: 'edge/contentScriptsAPIBridge.js'
|
||||
};
|
||||
return manifest;
|
||||
}))
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
return zipDist('dist-edge');
|
||||
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',
|
||||
contentScript: 'edge/contentScriptsAPIBridge.js'
|
||||
};
|
||||
return manifest;
|
||||
}))
|
||||
.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) {
|
||||
|
50
store/windows/AppxManifest.xml
Normal file
50
store/windows/AppxManifest.xml
Normal 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>
|
BIN
store/windows/Assets/icon_150.png
Normal file
BIN
store/windows/Assets/icon_150.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
store/windows/Assets/icon_44.png
Normal file
BIN
store/windows/Assets/icon_44.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
store/windows/Assets/icon_50.png
Normal file
BIN
store/windows/Assets/icon_50.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue
Block a user