Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Oct 16, 2014
1 parent f336784 commit fe7b4ac
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 3 deletions.
7 changes: 7 additions & 0 deletions build/url-debug.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/*
Copyright 2014, modulex-url@1.0.3
MIT Licensed
build time: Thu, 16 Oct 2014 03:43:03 GMT
*/
/*
combined modules:
url
*/
Expand Down Expand Up @@ -103,6 +108,8 @@ function encodeSpecialChars(str, specialCharsReg) {
}

var url = {
version: '1.0.3',

/**
* parse a url to a structured object
* @param {String} str url string
Expand Down
5 changes: 5 additions & 0 deletions build/url-deps.js
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*
Copyright 2014, modulex-url@1.0.3
MIT Licensed
build time: Thu, 16 Oct 2014 03:43:03 GMT
*/
modulex.config("requires",{"url":["modulex-querystring","modulex-path"]});
5 changes: 5 additions & 0 deletions build/url-deps.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*
Copyright 2014, modulex-url@1.0.3
MIT Licensed
build time: Thu, 16 Oct 2014 03:43:03 GMT
*/
{"url":["modulex-querystring","modulex-path"]}
2 changes: 1 addition & 1 deletion build/url.js

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

18 changes: 17 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var jscs = require('gulp-jscs');
var replace = require('gulp-replace');

var wrapper = require('gulp-wrapper');
var date = new Date();
var header = ['/*',
'Copyright ' + date.getFullYear() + ', ' + packageInfo.name + '@' + packageInfo.version,
packageInfo.license + ' Licensed',
'build time: ' + (date.toGMTString()),
'*/', ''].join('\n');

gulp.task('lint', function () {
return gulp.src('./lib/**/*.js')
.pipe(jshint())
Expand All @@ -28,6 +35,12 @@ gulp.task('clean', function () {
}).pipe(clean());
});

gulp.task('tag',function(done){
var cp = require('child_process');
var version = packageInfo.version;
cp.exec('git tag '+version +' | git push origin '+version+':'+version+' | git push origin master:master',done);
});

gulp.task('build', ['lint'], function () {
return gulp.src('./lib/url.js')
.pipe(modulex({
Expand All @@ -40,6 +53,9 @@ gulp.task('build', ['lint'], function () {
}
}))
.pipe(replace(/@VERSION@/g, packageInfo.version))
.pipe(wrapper({
header: header
}))
.pipe(gulp.dest(build))
.pipe(filter('url-debug.js'))
.pipe(replace(/@DEBUG@/g, ''))
Expand Down
2 changes: 2 additions & 0 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ function encodeSpecialChars(str, specialCharsReg) {
}

var url = {
version: '@VERSION@',

/**
* parse a url to a structured object
* @param {String} str url string
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "modulex-url",
"version": "1.0.2",
"version": "1.0.3",
"author": "yiminghe <yiminghe@gmail.com>",
"engines": {
"node": "~0.10"
Expand Down Expand Up @@ -48,13 +48,15 @@
"node-jscover-handler": "^1.0.3",
"precommit-hook": "^1.0.7",
"serve-index": "^1.1.6",
"gulp-wrapper": "^0.1.5",
"serve-static": "^1.5.3"
},
"precommit": [
"lint"
],
"scripts": {
"lint": "gulp lint",
"publish": "gulp tag",
"browser-test": "mocha-phantomjs http://localhost:8007/tests/runner.html",
"browser-test-build": "mocha-phantomjs http://localhost:8007/tests/runner.html?build",
"browser-test-cover": "mocha-phantomjs -R node_modules/node-jscover/lib/reporters/mocha/console http://localhost:8007/tests/runner.html?coverage"
Expand Down

0 comments on commit fe7b4ac

Please sign in to comment.