Skip to content

Commit

Permalink
chore: setup automatic release
Browse files Browse the repository at this point in the history
  • Loading branch information
Pustelto committed Oct 25, 2020
1 parent 15f1d62 commit 2019097
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
44 changes: 43 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,32 @@
]
},
"scripts": {
"vscode:prepublish": "webpack --mode production",
"release": "semantic-release",
"postinstall": "husky install && node ./node_modules/vscode/bin/install",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
"test": "node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@babel/core": "7.12.3",
"@babel/plugin-transform-runtime": "7.12.1",
"@babel/preset-env": "7.12.1",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/exec": "5.0.0",
"@semantic-release/git": "9.0.0",
"@types/mocha": "2.2.42",
"@types/node": "7.0.43",
"babel-loader": "8.1.0",
"eslint": "5.15.3",
"husky": "5.0.0-beta.0",
"semantic-release": "17.2.1",
"semantic-release-vsce": "3.0.1",
"typescript": "3.3.3",
"vscode": "1.1.33"
"vscode": "1.1.33",
"webpack": "5.2.0",
"webpack-cli": "4.1.0"
},
"dependencies": {
"prism-languages": "0.4.0",
Expand All @@ -218,5 +227,38 @@
]
]
}
},
"release": {
"repositoryUrl": "[email protected]:Pustelto/Bracketeer.git",
"branches": [
"master",
"next"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "./CHANGELOG.md"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
"@semantic-release/github",
[
"@semantic-release/exec",
{
"publish": "./vsce_publish.sh"
}
]
],
"debug": true,
"dryRun": true,
"ci": false
}
}
3 changes: 3 additions & 0 deletions vsce_publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

vsce publish
41 changes: 41 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"use strict";

const path = require("path");

const config = {
target: "node",
entry: "./src/extension.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "extension.js",
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../[resource-path]",
},
externals: {
vscode: "vscode", // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
plugins: ["@babel/plugin-transform-runtime"],
},
},
},
],
},
};

if (process.env.NODE_ENVIRONMENT !== "production") {
config.devtool = "source-map";
}
module.exports = config;

0 comments on commit 2019097

Please sign in to comment.