Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheton Wu (RD-TW) committed Mar 27, 2015
2 parents f39f04e + a9fa76e commit 487e014
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "i18next-text",
"description": "Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.",
"version": "0.5.3",
"version": "0.5.4",
"main": [
"dist/*"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/i18next-text.custom.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.
* Cheton Wu <cheton@gmail.com>
* Version 0.5.3
* Version 0.5.4
* MIT Licensed
*/
(function(root, factory) {
Expand Down
2 changes: 1 addition & 1 deletion dist/i18next-text.custom.min.js

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

6 changes: 6 additions & 0 deletions dist/i18next-text.hash.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.
* Cheton Wu <cheton@gmail.com>
* Version 0.5.4
* MIT Licensed
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function(root, factory) {
if (typeof window !== 'undefined') {
Expand Down
6 changes: 6 additions & 0 deletions dist/i18next-text.hash.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/i18next-text.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* i18next-text - Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.
* Cheton Wu <cheton@gmail.com>
* Version 0.5.3
* Version 0.5.4
* MIT Licensed
*/
(function e(t, n, r) {
Expand Down
2 changes: 1 addition & 1 deletion dist/i18next-text.min.js

Large diffs are not rendered by default.

30 changes: 19 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,62 @@ gulp.task('jshint', function() {
.on('error', errorHandler.error);
});

gulp.task('hash', ['hash:debug', 'hash:dist']);
gulp.task('hash:debug', function() {
gulp.task('build-hash', ['build-hash:debug', 'build-hash:uglify']);
gulp.task('build-hash:debug', function() {
return browserify()
.add('./lib/hash/index.js')
.bundle()
.pipe(source('i18next-text.hash.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('hash:dist', ['hash:debug'], function() {
gulp.task('build-hash:uglify', ['build-hash:debug'], function() {
return gulp.src('dist/i18next-text.hash.js')
.pipe(uglify(config.uglify.dist))
.pipe(rename('i18next-text.hash.min.js'))
.pipe(gulp.dest('dist'));
});

gulp.task('build:debug', ['hash'], function() {
gulp.task('build-all', ['build-all:debug', 'build-all:uglify']);
gulp.task('build-all:debug', ['build-hash'], function() {
return gulp.src(['dist/i18next-text.hash.js', 'src/i18next-text.js'])
.pipe(uglify(config.uglify.debug))
.pipe(concat('i18next-text.js'))
.pipe(header(config.banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('build:dist', ['hash'], function() {
gulp.task('build-all:uglify', ['build-hash'], function() {
return gulp.src(['dist/i18next-text.hash.js', 'src/i18next-text.js'])
.pipe(uglify(config.uglify.dist))
.pipe(concat('i18next-text.min.js'))
.pipe(header(config.banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('build:custom-debug',function() {
gulp.task('build-custom', ['build-custom:debug', 'build-custom:uglify']);
gulp.task('build-custom:debug', function() {
return gulp.src(['src/i18next-text.js'])
.pipe(uglify(config.uglify.debug))
.pipe(concat('i18next-text.custom.js'))
.pipe(header(config.banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('build:custom-dist',function() {
gulp.task('build-custom:uglify', function() {
return gulp.src(['src/i18next-text.js'])
.pipe(uglify(config.uglify.dist))
.pipe(concat('i18next-text.custom.min.js'))
.pipe(gulp.dest('dist'));
});

gulp.task('build:post', function() {
return gulp.src(['dist/*.js'])
.pipe(header(config.banner, {pkg: pkg}))
.pipe(gulp.dest('dist'));
});

gulp.task('build', ['jshint'], function(callback) {
runSequence('clean', ['build:debug', 'build:dist', 'build:custom-debug', 'build:custom-dist'], callback);
runSequence('clean',
['build-hash', 'build-all', 'build-custom'],
'build:post',
callback
);
});
gulp.task('default', ['build']);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18next-text",
"version": "0.5.3",
"version": "0.5.4",
"description": "Using i18next translations without having the `key` as strings, you do not need to worry about i18n key naming.",
"homepage": "http://cheton.github.io/i18next-text/",
"author": "Cheton Wu <cheton@gmail.com>",
Expand Down

0 comments on commit 487e014

Please sign in to comment.