Skip to content

Commit

Permalink
add attribution to dist file
Browse files Browse the repository at this point in the history
  • Loading branch information
callmecavs committed Nov 23, 2015
1 parent 9d436e9 commit 0ef675a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions dist/jump.min.js

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

10 changes: 5 additions & 5 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import babelify from 'babelify'
import browserify from 'browserify'
import gulp from 'gulp'
import connect from 'gulp-connect'
import header from 'gulp-header'
import sourcemaps from 'gulp-sourcemaps'
import uglify from 'gulp-uglify'
import assign from 'lodash.assign'
Expand All @@ -24,11 +25,9 @@ const onError = (error) => {
const attribution = [
'/*!',
' * Jump.js <%= pkg.version %> - <%= pkg.description %>',
' * Copyright (c) 2015 <%= pkg.author %> - https://github.com/callmecavs/jump.js',
' * Copyright (c) ' + new Date().getFullYear() + ' <%= pkg.author %> - <%= pkg.homepage %>',
' * License: <%= pkg.license %>',
' */',
'',
''
' */'
].join('\n')

// JS
Expand Down Expand Up @@ -57,7 +56,8 @@ const build = () => {
.pipe(source('jump.min.js'))
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(uglify())
.pipe(header(attribution, { pkg: packageJSON }))
.pipe(uglify({ preserveComments: 'some' }))
.pipe(sourcemaps.write('./maps', { addComment: false }))
.pipe(gulp.dest('dist'))
.pipe(connect.reload())
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jump.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "A small, modern, dependency-free smooth scrolling library.",
"homepage": "https://github.com/callmecavs/jump.js",
"main": "dist/jump.min.js",
Expand Down Expand Up @@ -28,6 +28,7 @@
"browserify": "*",
"gulp": "*",
"gulp-connect": "*",
"gulp-header": "*",
"gulp-sourcemaps": "*",
"gulp-uglify": "*",
"lodash.assign": "*",
Expand Down

0 comments on commit 0ef675a

Please sign in to comment.