v0.3: Extension #3
@ -18,5 +18,8 @@
|
|||||||
"ecmaFeatures": {
|
"ecmaFeatures": {
|
||||||
"jsx": true
|
"jsx": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"VERSION": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Startpage",
|
"name": "Startpage",
|
||||||
"version": "0.2.0",
|
"version": "$VERSION",
|
||||||
"description": "Startpage",
|
"description": "Startpage",
|
||||||
"developer": {
|
"developer": {
|
||||||
"name": "Djeeberjr"
|
"name": "Djeeberjr"
|
||||||
|
@ -4,10 +4,18 @@
|
|||||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
const Webpack = require("webpack");
|
||||||
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
const DEVELOPMENT = process.env.NODE_ENV === "development";
|
const DEVELOPMENT = process.env.NODE_ENV === "development";
|
||||||
|
|
||||||
|
const version = require('child_process')
|
||||||
|
.execSync("git describe --abbrev=0")
|
||||||
|
.toString()
|
||||||
|
.replace("v", "")
|
||||||
|
.trim();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: path.join(__dirname, "src"),
|
context: path.join(__dirname, "src"),
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -65,9 +73,15 @@ module.exports = {
|
|||||||
new MiniCssExtractPlugin(),
|
new MiniCssExtractPlugin(),
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{
|
{
|
||||||
from : "manifest.json",
|
from: "manifest.json",
|
||||||
to: ".."
|
to: "..",
|
||||||
|
transform(content) {
|
||||||
|
return content.toString().replace("$VERSION", version);
|
||||||
}
|
}
|
||||||
])
|
}
|
||||||
|
]),
|
||||||
|
new Webpack.DefinePlugin({
|
||||||
|
VERSION: JSON.stringify(version),
|
||||||
|
})
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user