Skip to content

Commit ffcc91b

Browse files
committed
Fixed issue found by @pablopunk with gulpfile, Fixed deps in wrong folder
1 parent 062230f commit ffcc91b

File tree

8 files changed

+201
-298
lines changed

8 files changed

+201
-298
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"Nick Baugh <[email protected]> (http://niftylettuce.com)"
2929
],
3030
"dependencies": {
31-
"@ladjs/env": "^0.0.2",
3231
"cac": "^4.2.2",
3332
"camelcase": "^4.1.0",
3433
"github-username-regex": "^1.0.0",

template/assets/js/core.js

+37-35
Original file line numberDiff line numberDiff line change
@@ -436,41 +436,43 @@ const api = new Frisbee({
436436
$('[data-toggle="popover"]').popover();
437437

438438
// Handle custom file inputs
439-
$(
440-
'body'
441-
).on('change', 'input[type="file"][data-toggle="custom-file"]', function() {
442-
const $input = $(this);
443-
const target = $input.data('target');
444-
const $target = $(target);
445-
446-
if ($target.length === 0)
447-
return console.error('Invalid target for custom file', $input);
448-
449-
if (!$target.attr('data-content'))
450-
return console.error(
451-
'Invalid `data-content` for custom file target',
452-
$input
453-
);
454-
455-
// Set original content so we can revert if user deselects file
456-
if (!$target.attr('data-original-content'))
457-
$target.attr('data-original-content', $target.attr('data-content'));
458-
459-
const input = $input.get(0);
460-
461-
let name =
462-
_.isObject(input) &&
463-
_.isObject(input.files) &&
464-
_.isObject(input.files[0]) &&
465-
_.isString(input.files[0].name)
466-
? input.files[0].name
467-
: $input.val();
468-
469-
if (_.isNull(name) || name === '')
470-
name = $target.attr('data-original-content');
471-
472-
$target.attr('data-content', name);
473-
});
439+
$('body').on(
440+
'change',
441+
'input[type="file"][data-toggle="custom-file"]',
442+
function() {
443+
const $input = $(this);
444+
const target = $input.data('target');
445+
const $target = $(target);
446+
447+
if ($target.length === 0)
448+
return console.error('Invalid target for custom file', $input);
449+
450+
if (!$target.attr('data-content'))
451+
return console.error(
452+
'Invalid `data-content` for custom file target',
453+
$input
454+
);
455+
456+
// Set original content so we can revert if user deselects file
457+
if (!$target.attr('data-original-content'))
458+
$target.attr('data-original-content', $target.attr('data-content'));
459+
460+
const input = $input.get(0);
461+
462+
let name =
463+
_.isObject(input) &&
464+
_.isObject(input.files) &&
465+
_.isObject(input.files[0]) &&
466+
_.isString(input.files[0].name)
467+
? input.files[0].name
468+
: $input.val();
469+
470+
if (_.isNull(name) || name === '')
471+
name = $target.attr('data-original-content');
472+
473+
$target.attr('data-content', name);
474+
}
475+
);
474476

475477
// Handle clipboard copy helper buttons
476478
if (Clipboard.isSupported()) {

template/gulpfile.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ const opn = require('opn');
2929

3030
const config = require('./config');
3131

32-
// create a new publisher
33-
const publisher = awspublish.create(config.aws);
34-
3532
// define custom headers
3633
const headers = {
3734
'Cache-Control': `public, max-age=${ms('1yr')}`
@@ -72,6 +69,8 @@ gulp.task('build', done => {
7269
});
7370

7471
gulp.task('publish', () => {
72+
// create a new publisher
73+
const publisher = awspublish.create(config.aws);
7574
return (
7675
gulp
7776
.src(['build/**/*', '!build/rev-manifest.json'])
@@ -179,8 +178,6 @@ gulp.task('js', ['lint'], done => {
179178
.transform(babelify)
180179
.bundle()
181180
.on('error', function(err) {
182-
console.log('err', err);
183-
console.log('oh knoez!');
184181
gutil.log(err.message);
185182
this.emit('end');
186183
})

template/locales/es.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@
226226
"Cancel": "Cancelar",
227227
"Close this dialog": "Cerrar este diálogo",
228228
"Terms &#124; <span class=\"notranslate\">Lad</span>":
229-
"Terms &#124; <span class=\"notranslate\">Lad</span>",
230-
"Read our terms and conditions of use": "Read our terms and conditions of use"
229+
"Términos y Condiciones &#124; <span class=\"notranslate\">Lad</span>",
230+
"Read our terms and conditions of use":
231+
"Lea nuestros términos y condiciones de uso"
231232
}

template/locales/zh.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,6 @@
208208
"Cancel": "取消",
209209
"Close this dialog": "关闭此对话框",
210210
"Terms &#124; <span class=\"notranslate\">Lad</span>":
211-
"Terms &#124; <span class=\"notranslate\">Lad</span>",
212-
"Read our terms and conditions of use": "Read our terms and conditions of use"
211+
"条款&#124; <span class=\"notranslate\">Lad</span>",
212+
"Read our terms and conditions of use": "阅读我们的使用条款和条件"
213213
}

template/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"jquery-lazy": "^1.7.5",
5151
"jquery-placeholder": "^2.3.1",
5252
"jquery.pointer-events-polyfill": "^0.2.4",
53-
"juice": "niftylettuce/juice",
5453
"kcors": "^2.2.1",
5554
"koa": "^2.3.0",
5655
"koa-404-handler": "^0.0.1",
@@ -78,7 +77,7 @@
7877
"koa-response-time": "^2.0.0",
7978
"koa-router": "^7.2.1",
8079
"koa-simple-ratelimit": "^2.3.2",
81-
"koa-views": "^6.1.0",
80+
"koa-views": "^6.1.1",
8281
"koa-views-render": "^0.0.1",
8382
"lodash": "^4.17.4",
8483
"memwatch-next": "^0.3.0",

0 commit comments

Comments
 (0)