Skip to content

Commit

Permalink
add min. version
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksejs Gordejevs committed Oct 20, 2016
1 parent b1e2a6b commit e73fd0b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 42 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ module provides details such as the following:
"source":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79..."
}

```
```

### LICENSE

[MIT](LICENSE)
30 changes: 2 additions & 28 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,7 @@
"email": "[email protected]",
"url": "https://github.com/biggora"
},
"contributors": [
{
"name": "Kacper Glowacki",
"url": "https://github.com/kacperus"
},
{
"name": "elisee",
"url": "https://github.com/elisee"
},
{
"name": "Bitdeli Chef",
"url": "https://github.com/bitdeli-chef"
},
{
"name": "Nicolas Tobo",
"url": "https://github.com/nicolastobo"
},
{
"name": "Samy Pess?",
"url": "https://github.com/SamyPesse"
},
{
"name": "Artem Nezvigin",
"url": "https://github.com/artnez"
}
],
"contributors": [],
"keywords": [
"useragent",
"user-agent",
Expand All @@ -55,9 +30,8 @@
"**/.*",
"node_modules",
"test",
"Gruntfile.js",
"gulpfile.js",
"index.js",
"bower_components",
"tests"
],
"authors": [
Expand Down
15 changes: 9 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by aleksejs.gordejevs on 10/20/2016.
*/
var gulp = require('gulp');
var pathToLib = './lib/**';
var pathToLib = './lib/';
var size = require('gulp-filesize');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
Expand All @@ -14,11 +14,14 @@ var gulpFilter = require('gulp-filter');


gulp.task('uglify-js', ['clean-js'], function () {
var filter = gulpFilter(['**/*.js', '!*.min.js']);
return gulp.src(pathToLib)
var filter = gulpFilter(['*/*.js', '!*.min.js']);
return gulp.src(pathToLib + '*')
.pipe(filter)
// .pipe(sourcemaps.init({loadMaps: true}))
.pipe(uglify())
.pipe(uglify({
mangle:false,
preserveComments: 'license'
}))
.pipe(rename({suffix: '.min'}))
.pipe(size())
// .pipe(sourcemaps.write('./'))
Expand All @@ -27,13 +30,13 @@ gulp.task('uglify-js', ['clean-js'], function () {

gulp.task('clean-js', function () {
var filter = gulpFilter(['**/*.min.js','**/*.js.map']);
return gulp.src(pathToLib, {read: false})
return gulp.src(pathToLib + '**', {read: false})
.pipe(filter)
.pipe(rimraf({force: true}));
});

gulp.task('jshint', function () {
var filter = gulpFilter(['**/*.js', '!*.min.js']);
var filter = gulpFilter(['/*.js', '!*.min.js']);
return gulp.src(pathToLib)
.pipe(filter)
.pipe(jshint())
Expand Down
9 changes: 3 additions & 6 deletions lib/device-uuid.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/**
* Created by aleksejs.gordejevs on 10/19/2016.
*/
/*!
* express-useragent.js v1.0.0 (https://github.com/biggora/express-useragent/)
* Copyright 2011-2015 Alexey Gordeyev
* Licensed under MIT (https://github.com/biggora/express-useragent/blob/master/LICENSE)
* device-uuid.js v1.0.0 (https://github.com/biggora/device-uuid/)
* Copyright 2016 Alexey Gordeyev
* Licensed under MIT (https://github.com/biggora/device-uuid/blob/master/LICENSE)
*/
/*global
screen, window, navigator
Expand Down
6 changes: 6 additions & 0 deletions lib/device-uuid.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"device",
"uuid"
],
"main": "./index.js",
"main": "./lib/device-uuid.js",
"scripts": {
"test": "nodeunit test/browsers.js test/bots_test.js",
"express": "node test/express.js",
Expand Down

0 comments on commit e73fd0b

Please sign in to comment.