Skip to content

Commit 97cdf57

Browse files
committed
add gulp-header plugin and update version prior to publish
1 parent 6093935 commit 97cdf57

File tree

5 files changed

+182
-25
lines changed

5 files changed

+182
-25
lines changed

dist/bootstrap-actionable.min.js

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
/*!
2-
* bootstrap-actionable v1.0.0 (http://javatmp.com)
3-
* A small Javascript code that help implement click event actions for <a> and <button> tags by declarative way
4-
* and provide functionalities to load AJAX content in Bootstrap Modal Wrapper instance.
5-
*
6-
* Copyright 2018 JavaTMP
7-
* Licensed under MIT (https://github.com/JavaTMP/bootstrap-actionable/blob/master/LICENSE)
8-
*/
91

102
var gulp = require('gulp');
113
var rename = require('gulp-rename');
124
var uglify = require('gulp-uglify');
135
var del = require('del');
6+
var fs = require('fs');
147
var eslint = require('gulp-eslint');
8+
var header = require('gulp-header');
9+
var pkg = require('./package.json');
10+
11+
var banner = ['/*!',
12+
' * <%= pkg.name %> (http://javatmp.com)',
13+
' * <%= pkg.description %>',
14+
' *',
15+
' * @version <%= pkg.version %>',
16+
' * @link <%= pkg.homepage %>',
17+
' * @copyright 2018 JavaTMP',
18+
' * @license <%= pkg.license %>',
19+
' */',
20+
''].join('\n');
1521

1622
gulp.task('clean', function () {
1723
return del(['./dist']);
@@ -36,6 +42,7 @@ gulp.task('dist', ["clean"], function (cb) {
3642
}))
3743
.pipe(eslint.format())
3844
.pipe(uglify({output: {comments: /^!/}}))
45+
.pipe(header(banner, {pkg: pkg}))
3946
.pipe(rename({suffix: '.min'}))
4047
.pipe(gulp.dest('./dist/'));
4148
});

js/bootstrap-actionable.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/*!
2-
* bootstrap-actionable v1.0.0 (http://javatmp.com)
3-
* A small Javascript code that help implement click event actions for <a> and <button> tags by declarative way
4-
* and provide functionalities to load AJAX content in Bootstrap Modal Wrapper instance.
5-
*
6-
* Copyright 2018 JavaTMP
7-
* Licensed under MIT (https://github.com/JavaTMP/bootstrap-actionable/blob/master/LICENSE)
8-
*/
9-
101
(function (root, factory) {
112
"use strict";
123
// CommonJS module is defined

package-lock.json

Lines changed: 158 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap-actionable",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Actionable plugin is a small Javascript code that help implement click actions for a and button tags by declarative way and provide functionalities to load AJAX content in Bootstrap Modal Wrapper instance.",
55
"keywords": [
66
"bootstrap",
@@ -19,7 +19,8 @@
1919
"gulp": "^3.9.1",
2020
"gulp-eslint": "^4.0.2",
2121
"gulp-rename": "^1.2.2",
22-
"gulp-uglify": "^3.0.0"
22+
"gulp-uglify": "^3.0.0",
23+
"gulp-header": "^2.0.1"
2324
},
2425
"dependencies": {
2526
"jquery": "^3.3.1",

0 commit comments

Comments
 (0)