mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
rename: dist => build, releases => dist
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,5 +9,5 @@ webfonts/
|
|||||||
*.crx
|
*.crx
|
||||||
*.pem
|
*.pem
|
||||||
*.zip
|
*.zip
|
||||||
releases/
|
build/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
|||||||
22
gulpfile.js
22
gulpfile.js
@@ -12,7 +12,7 @@ const gulp = require('gulp'),
|
|||||||
del = require('del');
|
del = require('del');
|
||||||
|
|
||||||
const paths = {
|
const paths = {
|
||||||
releases: './releases/',
|
build: './build/',
|
||||||
dist: './dist/',
|
dist: './dist/',
|
||||||
libDir: './src/lib/',
|
libDir: './src/lib/',
|
||||||
npmDir: './node_modules/',
|
npmDir: './node_modules/',
|
||||||
@@ -21,18 +21,18 @@ const paths = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const fontsFilter = [
|
const fontsFilter = [
|
||||||
'!dist/popup/fonts/*',
|
'!build/popup/fonts/*',
|
||||||
'dist/popup/fonts/Open_Sans*.woff',
|
'build/popup/fonts/Open_Sans*.woff',
|
||||||
'dist/popup/fonts/fontawesome*.woff'
|
'build/popup/fonts/fontawesome*.woff'
|
||||||
];
|
];
|
||||||
|
|
||||||
function dist(browserName, manifest) {
|
function dist(browserName, manifest) {
|
||||||
return gulp.src(paths.dist + '**/*')
|
return gulp.src(paths.build + '**/*')
|
||||||
.pipe(filter(['**', '!dist/edge/**/*'].concat(fontsFilter)))
|
.pipe(filter(['**', '!build/edge/**/*'].concat(fontsFilter)))
|
||||||
.pipe(gulpif('popup/index.html', replace('__BROWSER__', browserName)))
|
.pipe(gulpif('popup/index.html', replace('__BROWSER__', browserName)))
|
||||||
.pipe(gulpif('manifest.json', jeditor(manifest)))
|
.pipe(gulpif('manifest.json', jeditor(manifest)))
|
||||||
.pipe(zip(`dist-${browserName}.zip`))
|
.pipe(zip(`dist-${browserName}.zip`))
|
||||||
.pipe(gulp.dest(paths.releases));
|
.pipe(gulp.dest(paths.dist));
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task('dist', ['dist:firefox', 'dist:chrome', 'dist:opera', 'dist:edge']);
|
gulp.task('dist', ['dist:firefox', 'dist:chrome', 'dist:opera', 'dist:edge']);
|
||||||
@@ -63,12 +63,12 @@ gulp.task('dist:chrome', (cb) => {
|
|||||||
|
|
||||||
// Since Edge extensions require makeappx to be run we temporarily store it in a folder.
|
// Since Edge extensions require makeappx to be run we temporarily store it in a folder.
|
||||||
gulp.task('dist:edge', (cb) => {
|
gulp.task('dist:edge', (cb) => {
|
||||||
const edgePath = paths.releases + 'Edge/';
|
const edgePath = paths.dist + 'Edge/';
|
||||||
const extensionPath = edgePath + 'Extension/';
|
const extensionPath = edgePath + 'Extension/';
|
||||||
const appxPath = paths.releases + 'dist-edge.appx';
|
const appxPath = paths.dist + 'dist-edge.appx';
|
||||||
|
|
||||||
return del([edgePath, appxPath])
|
return del([edgePath, appxPath])
|
||||||
.then(() => edgeCopyDist(paths.dist + '**/*', extensionPath))
|
.then(() => edgeCopyBuild(paths.build + '**/*', extensionPath))
|
||||||
.then(() => edgeCopyAssets('./store/windows/**/*', edgePath))
|
.then(() => edgeCopyAssets('./store/windows/**/*', edgePath))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// makeappx.exe must be in your system's path already
|
// makeappx.exe must be in your system's path already
|
||||||
@@ -79,7 +79,7 @@ gulp.task('dist:edge', (cb) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function edgeCopyDist(source, dest) {
|
function edgeCopyBuild(source, dest) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
gulp.src(source)
|
gulp.src(source)
|
||||||
.on('error', reject)
|
.on('error', reject)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CleanWebpackPlugin([
|
new CleanWebpackPlugin([
|
||||||
path.resolve(__dirname, 'dist/*')
|
path.resolve(__dirname, 'build/*')
|
||||||
]),
|
]),
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
name: 'popup/vendor',
|
name: 'popup/vendor',
|
||||||
@@ -100,6 +100,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
path: path.resolve(__dirname, 'dist')
|
path: path.resolve(__dirname, 'build')
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user