diff options
author | Victor Häggqvist <[email protected]> | 2016-01-16 22:24:46 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2016-01-16 22:24:46 +0100 |
commit | bf18346798f871ac87665aa0353fcd22ac0479b5 (patch) | |
tree | df8e985aea7119e4be860dc851142ee6e10865e9 | |
parent | 17f9e3dd9cb384e881773a1ba1dc0fb791d04b03 (diff) |
update package files
-rw-r--r-- | .gitignore | 50 | ||||
-rw-r--r-- | bower.json | 6 | ||||
-rw-r--r-- | gulpfile.js | 34 | ||||
-rw-r--r-- | package.json | 3 |
4 files changed, 87 insertions, 6 deletions
@@ -28,3 +28,53 @@ node_modules .lock-wscript bower_components +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm + +*.iml + +## Directory-based project format: +.idea/ +# if you remove the above rule, at least ignore the following: + +# User-specific stuff: +# .idea/workspace.xml +# .idea/tasks.xml +# .idea/dictionaries +# .idea/shelf + +# Sensitive or high-churn files: +# .idea/dataSources.ids +# .idea/dataSources.xml +# .idea/sqlDataSources.xml +# .idea/dynamic.xml +# .idea/uiDesigner.xml + +# Gradle: +# .idea/gradle.xml +# .idea/libraries + +# Mongo Explorer plugin: +# .idea/mongoSettings.xml + +## File-based project format: +*.ipr +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +docs/_build @@ -2,10 +2,10 @@ "name": "touch-imagelightbox", "version": "0.2.0", "authors": [ - "Victor Häggqvist <[email protected]>" + "Victor Häggqvist <[email protected]> (https://victorhaggqvist.com/)" ], - "description": "A touch-friendly image lightbox", - "main": "dist/touch-imagelightbox.min.js", + "description": "A touch-friendly image lightbox, without bells and whistles.", + "main": "dist/LightBox.Core.min.js", "keywords": [ "lightbox", "touch", diff --git a/gulpfile.js b/gulpfile.js index 8fb1871..aecfb9e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -9,6 +9,8 @@ var size = require('gulp-size'); var uglify = require('gulp-uglify'); var webpack = require('webpack-stream'); var concat = require('gulp-concat'); +var header = require('gulp-header'); +var rename = require("gulp-rename"); gulp.task('style', function () { return gulp.src('./style/touch-imagelightbox.scss') @@ -65,25 +67,53 @@ gulp.task('lint', function() { .pipe(eslint.failAfterError()); }); - gulp.task('uglify', ['pack'], function() { return gulp.src('./demo/LightBox.*.js') .pipe(uglify()) + .pipe(rename({suffix: ".min"})) .pipe(gulp.dest('dist')); }); +var bannerPlugins = ['/**', + ' * Image LightBox Plugins - <%= pkg.description %>', + ' * @version v<%= pkg.version %>', + ' * @link <%= pkg.homepage %>', + ' * @license <%= pkg.license %>', + ' * @author <%= pkg.authors%>', + ' */', + ''].join('\n'); + gulp.task('buildjs', ['uglify'], function() { return gulp.src(['./dist/LightBox.*.js', '!./dist/LightBox.Core.js', '!./dist/LightBox.Plugins.js']) .pipe(concat('LightBox.Plugins.js')) + .pipe(rename({suffix: ".min"})) + .pipe(header(bannerPlugins, { pkg : pkg })) + .pipe(gulp.dest('./dist')); +}); + +var banner = ['/**', + ' * Image LightBox - <%= pkg.description %>', + ' * @version v<%= pkg.version %>', + ' * @link <%= pkg.homepage %>', + ' * @license <%= pkg.license %>', + ' * @author <%= pkg.authors%>', + ' */', + ''].join('\n'); + +var pkg = require('./bower.json'); +gulp.task('makecore', ['buildjs'], function() { + gulp.src(['./dist/LightBox.Core.min.js']) + .pipe(header(banner, { pkg : pkg })) .pipe(gulp.dest('./dist')); }); gulp.task('csso', ['style'], function() { return gulp.src('./demo/touch-imagelightbox.css') .pipe(csso()) + .pipe(rename({suffix: ".min"})) .pipe(gulp.dest('./dist')); }); -gulp.task('build', ['buildjs','csso']); +gulp.task('build', ['makecore','csso']); gulp.task('default', ['pack']); diff --git a/package.json b/package.json index de61ad6..cea5ac3 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "gulp-size": "^2.0.0", "gulp-uglify": "^1.5.1", "loglevel": "^1.4.0", - "webpack-stream": "^3.1.0" + "webpack-stream": "^3.1.0", + "gulp-header": "^1.7.1" } } |