Skip to content

Commit 88859bd

Browse files
feat: rename build file
1 parent 203fbbc commit 88859bd

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node_modules/
22
/coverage
33
/.idea
4-
/jquery.marker-animation.min.js
4+
/build
55
/travis-ci
66
/gh-pages
77
.work/

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"name": "jquery.marker-animation",
33
"version": "1.4.3",
44
"description": "Marker animation jQuery plugin",
5-
"main": "jquery.marker-animation.min.js",
5+
"main": "build/index.js",
6+
"files": [
7+
"build"
8+
],
69
"scripts": {
710
"start": "yarn build",
811
"test": "yarn lint && yarn cover",

webpack.config.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
const SpeedMeasurePlugin = require( 'speed-measure-webpack-plugin' );
22
const DuplicatePackageCheckerPlugin = require( 'duplicate-package-checker-webpack-plugin' );
3-
const smp = new SpeedMeasurePlugin();
43
const webpack = require( 'webpack' );
54
const pkg = require( './package' );
65
const path = require( 'path' );
76

87
const banner = `${ pkg.name } ${ pkg.version } - ${ pkg.description }\nCopyright (c) ${ new Date().getFullYear() } ${ pkg.author } - ${ pkg.homepage }\nLicense: ${ pkg.license }`;
98

109
const webpackConfig = {
11-
'context': path.resolve( __dirname, 'src' ),
12-
'entry': './index.js',
13-
'output': {
14-
'path': __dirname,
15-
'filename': `${ pkg.name }.min.js`,
16-
'library': 'MarkerAnimation',
17-
'libraryTarget': 'umd',
10+
context: path.resolve( __dirname, 'src' ),
11+
entry: './index.js',
12+
output: {
13+
path: path.resolve( __dirname, 'build' ),
14+
filename: 'index.js',
15+
library: 'MarkerAnimation',
16+
libraryTarget: 'umd',
1817
},
19-
'module': {
20-
'rules': [
18+
module: {
19+
rules: [
2120
{
22-
'test': /\.js$/,
23-
'exclude': /node_modules/,
24-
'loader': 'babel-loader',
21+
test: /\.js$/,
22+
exclude: /node_modules/,
23+
loader: 'babel-loader',
2524
},
2625
],
2726
},
@@ -33,10 +32,10 @@ const webpackConfig = {
3332
amd: 'jquery',
3433
},
3534
},
36-
'plugins': [
35+
plugins: [
3736
new webpack.BannerPlugin( banner ),
3837
new DuplicatePackageCheckerPlugin(),
3938
],
4039
};
4140

42-
module.exports = smp.wrap( webpackConfig );
41+
module.exports = ( new SpeedMeasurePlugin() ).wrap( webpackConfig );

0 commit comments

Comments
 (0)