Skip to content

Commit

Permalink
release: v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
surunzi committed Jan 6, 2020
1 parent 9066bb1 commit 5c4ced7
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 48 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/node_modules/
eruda-geolocation.min.js
eruda-geolocation.js
eruda-geolocation.js.map
package-lock.json
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v2.0.0 (6 Jan 2020)

* feat: theme support
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 liriliri
Copyright (c) 2018-present liriliri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 22 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Eruda-geolocation</title>
</head>
<body>
<script src="node_modules/eruda/eruda.min.js"></script>
<script>eruda.init({tool: []});</script>
<script src="assets/eruda-geolocation.js"></script>
<script>eruda.add(erudaGeolocation).show('geolocation').show();</script>
</body>
</html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
/>
<title>Eruda-geolocation</title>
</head>
<body>
<script src="node_modules/eruda/eruda.js"></script>
<script>
eruda.init({ tool: [] })
</script>
<script src="assets/eruda-geolocation.js"></script>
<script>
eruda
.add(erudaGeolocation)
.show('geolocation')
.show()
</script>
</body>
</html>
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "eruda-geolocation",
"version": "1.1.0",
"version": "2.0.0",
"description": "Eruda plugin for testing geolocation",
"main": "eruda-geolocation.js",
"scripts": {
"dev": "webpack-dev-server --host 0.0.0.0",
"build": "webpack && webpack -p",
"ci": "npm run format && npm run lint && npm run build",
"format": "prettier *.js eustia/*.js src/*.js src/style.scss --write",
"format": "prettier *.js eustia/*.js src/*.js src/style.scss index.html --write",
"lint": "eslint src/**/*.js"
},
"keywords": [
Expand All @@ -28,20 +28,26 @@
"homepage": "https://github.com/liriliri/eruda-geolocation#readme",
"devDependencies": {
"autoprefixer": "^7.2.2",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"css-loader": "^0.28.10",
"eruda": "^1.4.2",
"eslint": "^4.12.1",
"babel-preset-env": "^1.7.0",
"css-loader": "^0.28.7",
"eruda": "^2.0.0",
"eslint": "^5.4.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^3.1.0",
"handlebars": "^4.0.11",
"handlebars-loader": "^1.6.0",
"node-sass": "^4.7.2",
"postcss": "^6.0.14",
"postcss-class-prefix": "^0.3.0",
"postcss-loader": "^2.0.9",
"prettier": "^1.13.5",
"prettier": "^1.14.2",
"sass-loader": "^6.0.6",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7"
Expand Down
7 changes: 3 additions & 4 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
position: absolute;
bottom: 0;
left: 0;
background: #fff;
background: var(--darker-background);
padding: 10px;
color: #263238;
color: var(--foreground);
width: 100%;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.08),
0 3px 1px -2px rgba(0, 0, 0, 0.2);
border-top: 1px solid var(--border);
z-index: 1000;
}
}
28 changes: 7 additions & 21 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
var autoprefixer = require('autoprefixer'),
postcss = require('postcss'),
webpack = require('webpack'),
pkg = require('./package.json'),
classPrefix = require('postcss-class-prefix')
const autoprefixer = require('autoprefixer')
const postcss = require('postcss')
const webpack = require('webpack')
const pkg = require('./package.json')
const classPrefix = require('postcss-class-prefix')

var isProduction = process.argv.indexOf('-p') > -1,
banner = pkg.name + ' v' + pkg.version + ' ' + pkg.homepage
const banner = pkg.name + ' v' + pkg.version + ' ' + pkg.homepage

var exports = {
devtool: 'source-map',
Expand All @@ -30,7 +29,7 @@ var exports = {
loader: 'babel-loader',
options: {
presets: ['env'],
plugins: ['transform-runtime']
plugins: ['transform-runtime', 'transform-object-rest-spread']
}
}
},
Expand Down Expand Up @@ -73,17 +72,4 @@ var exports = {
plugins: [new webpack.BannerPlugin(banner)]
}

if (isProduction) {
exports.devtool = false
exports.output.filename = 'eruda-geolocation.min.js'
exports.plugins = exports.plugins.concat([
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
comments: /eruda-geolocation/
})
])
}

module.exports = exports

0 comments on commit 5c4ced7

Please sign in to comment.