Skip to content

Commit

Permalink
Merge pull request #18 from williamdes/master
Browse files Browse the repository at this point in the history
Upgrade dependencies & add a license header & add a browserslist file
  • Loading branch information
srexi authored Aug 8, 2021
2 parents d9a5787 + 6f20984 commit b0668b1
Show file tree
Hide file tree
Showing 8 changed files with 2,849 additions and 4,129 deletions.
9 changes: 9 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# https://github.com/browserslist/browserslist#readme

>= 0.5%
last 5 major versions
not dead
Chrome >= 8
Firefox >= 3
Safari >= 7
ie >= 9
8 changes: 7 additions & 1 deletion dist/purecounter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purecounter.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion dist/purecounter_vanilla.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/purecounter_vanilla.js.map

Large diffs are not rendered by default.

15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"main": "dist/purecounter.js",
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"keywords": [
"javascript",
Expand All @@ -24,11 +24,10 @@
"author": "Stig Rex",
"license": "MIT",
"devDependencies": {
"cross-env": "^5.2.0",
"laravel-mix": "^4.0.16",
"vue-template-compiler": "^2.6.10"
"cross-env": "^7.0.3",
"laravel-mix": "^6.0.25",
"vue-template-compiler": "^2.6.14"
},
"dependencies": {},
"repository": {
"type": "git",
"url": "https://github.com/srexi/purecounterjs.git"
Expand All @@ -37,4 +36,4 @@
"url": "https://github.com/srexi/purecounterjs/issues"
},
"homepage": "https://github.com/srexi/purecounterjs#readme"
}
}
27 changes: 26 additions & 1 deletion webpack.mix.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
let mix = require('laravel-mix');
const mix = require('laravel-mix');
const fs = require('fs');

mix.options({
terser: {
extractComments: false,// Any other value will make the license header be removed
},
});

mix.webpackConfig(webpack => {
const package = JSON.parse(fs.readFileSync(__dirname + '/package.json'));

return {
plugins: [
new webpack.BannerPlugin({
banner: [
'purecounter.js - A simple yet configurable native javascript counter which you can count on.',
'Author: Stig Rex',
'Version: ' + package.version,
'Url: https://github.com/srexi/purecounterjs',
'License: MIT',
].join("\n"),
}),
]
};
});

mix
.js('js/purecounter_vanilla.js', 'dist/')
Expand Down
Loading

0 comments on commit b0668b1

Please sign in to comment.