Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/main.js

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

21 changes: 21 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var gulp = require('gulp');
var concat = require('gulp-concat');
var watch = require('gulp-watch');
var uglify = require('gulp-uglify');
var babel = require('gulp-babel');
var textTransformation = require('gulp-text-simple');

// Very handcrafted (fragile) function to transform source into a copy-pastable bookmark :(
Expand All @@ -17,13 +18,33 @@ gulp.task('watch', function () {
return watch('src/*.js', function () {
return gulp.src('src/*.js')
.pipe(concat('main.js'))
.pipe(babel({
presets: [
["env", {
"targets": {
// The % refers to the global coverage of users from browserslist
"browsers": [ ">0.25%", "not ie 11", "not op_mini all"]
}
}]
]
}))
.pipe(gulp.dest('temp/'));
});
});

gulp.task('build', function () {
return gulp.src('src/*.js')
.pipe(concat('main.js'))
.pipe(babel({
presets: [
["env", {
"targets": {
// The % refers to the global coverage of users from browserslist
"browsers": [ ">0.25%", "not ie 11", "not op_mini all"]
}
}]
]
}))
.pipe(uglify('main.js'))
.pipe(wrappedBookmarkify())
.pipe(gulp.dest('dist/'));
Expand Down
21 changes: 14 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@
<title>Bookmark focus playground</title>
<meta name="description" content="Bookmark focus playground">
<meta name="author" content="Jay Kid">

<!-- <link rel="stylesheet" href="css/styles.css?v=1.0"> -->

<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>

<body>
<!-- A11y -->
<!-- Borrowed from https://webaim.org/techniques/css/invisiblecontent/ :) -->
<style>
.screen-reader-only {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
}
</style>
<form>
<fieldset>
<legend>Personal information</legend>
<div>
<span class="screen-reader-only" id="input-description">The fake user input that does nothing</span>
<label for="username">Name: <abbr title="required">*</abbr></label>
<input aria-hidden="false" aria-busy="false" id="username" type="text" name="username">
<input aria-describedby="input-description" aria-hidden="false" aria-busy="false" id="username" type="text" name="username">
</div>
</fieldset>
<fieldset>
Expand Down
Loading