Skip to content

Commit

Permalink
update build config and README/CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
peps1 committed Jan 7, 2021
1 parent 1c2da55 commit 03db8db
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 36 deletions.
19 changes: 0 additions & 19 deletions .babelrc

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v1.0.0](https://github.com/peps1/airdcpp-advanced-sharing/tree/v1.0.0) (2021-01-07)
[Full git log](https://github.com/peps1/airdcpp-advanced-sharing/compare/v1.0.0-beta.4...v1.0.0)

### Changed
* Updated dependencies
* Some small cleanup cleanup
## [v1.0.0-beta.4](https://github.com/peps1/airdcpp-advanced-sharing/tree/v1.0.0-beta.4) (2020-10-21)
[Full git log](https://github.com/peps1/airdcpp-advanced-sharing/compare/v1.0.0-beta.3...v1.0.0-beta.4)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# airdcpp-advanced-sharing [![GitHub Actions][build-badge]][build] [![npm package][npm-badge]][npm] [![npm downloads][npm-dl-badge]][npm] [![snyk][snyk-badge]][snyk] [![codecov][coverage-badge]][coverage] [![codeclimate][codeclimate-badge]][codeclimate]

Extension advanced sharing options, batch hashing with stop or resume option. Filessytem watcher to refresh on change is planned.
Extension advanced sharing options, batch hashing with stop or resume option.

- [Bug tracker](https://github.com/peps1/airdcpp-advanced-sharing/issues)
- [Changelog](https://github.com/peps1/airdcpp-advanced-sharing/blob/master/CHANGELOG.md)
Expand Down
38 changes: 22 additions & 16 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
var path = require('path');
const { resolve } = require('path')
var webpack = require('webpack');
const path = require('path');
const webpack = require('webpack');

var packageJson = require('./package.json');
const packageJson = require('./package.json');

var release = process.env.NODE_ENV === 'production';
const release = process.env.NODE_ENV === 'production';
const profiling = !!process.env.PROFILING;

var plugins = [
const plugins = [
// Optional binary requires that should be ignored
new webpack.IgnorePlugin(/.*\/build\/.*\/(validation|bufferutil)/),
new webpack.DefinePlugin({
Expand All @@ -17,6 +17,7 @@ var plugins = [
];

console.log('Release: ' + release);
console.log('Profiling: ' + profiling);

if (!release) {
// Required for debugging
Expand All @@ -32,27 +33,32 @@ if (!release) {

module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
entry: release ? resolve('./src/index.ts') : resolve('./src/main.ts'),
entry: release && !profiling ? './src/index.ts' : './src/main.ts',
target: 'node',
output: {
path: path.join(__dirname, 'dist'),
filename: 'main.js',
libraryTarget: 'umd'
},
plugins,
devtool: 'source-map',
resolve: {
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'],
modules: [ path.join(__dirname, 'node_modules') ]
optimization: {
minimize: release && !profiling ? true : false,
},
plugins: plugins,
devtool: 'source-map',
module: {
rules: [
{
// Include ts, tsx, js, and jsx files.
test: /\.(ts|js)x?$/,
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.(ts|js)$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.ts', '.js' ],
modules: [
path.resolve('./src'),
'node_modules'
],
},
}

0 comments on commit 03db8db

Please sign in to comment.