Skip to content

Commit

Permalink
v8.2.0
Browse files Browse the repository at this point in the history
- Added optimize-js
- Removed unit tests
  • Loading branch information
cferdinandi committed Sep 23, 2016
1 parent 9c38e59 commit 6eade1f
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 466 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A handy little script that lets users save and reuse form data.

## Getting Started

Compiled and production-ready code can be found in the `dist` directory. The `src` directory contains development code. Unit tests are located in the `test` directory.
Compiled and production-ready code can be found in the `dist` directory. The `src` directory contains development code.

### 1. Include Form Saver on your site.

Expand Down Expand Up @@ -121,7 +121,7 @@ You can install Form Saver with your favorite package manager.

## Working with the Source Files

If you would prefer, you can work with the development code in the `src` directory using the included [Gulp build system](http://gulpjs.com/). This compiles, lints, and minifies code, and runs unit tests. It's the same build system that's used by [Kraken](http://cferdinandi.github.io/kraken/), so it includes some unnecessary tasks and Sass variables but can be dropped right in to the boilerplate without any configuration.
If you would prefer, you can work with the development code in the `src` directory using the included [Gulp build system](http://gulpjs.com/). This compiles, lints, and minifies code.

### Dependencies
Make sure these are installed first.
Expand All @@ -136,7 +136,6 @@ Make sure these are installed first.
3. When it's done installing, run one of the task runners to get going:
* `gulp` manually compiles files.
* `gulp watch` automatically compiles files when changes are made and applies changes using [LiveReload](http://livereload.com/).
* `gulp test` compiles files and runs unit tests.



Expand Down
2 changes: 1 addition & 1 deletion dist/css/form-saver.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* form-saver v8.1.1: Save and reuse form data
* form-saver v8.2.0: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
Expand Down
9 changes: 2 additions & 7 deletions dist/css/form-saver.min.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
/*! form-saver v8.1.1 | (c) 2016 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/form-saver */
/*!
* form-saver v8.1.1: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
*/.form-saver{display:none;visibility:hidden}.js-form-saver .form-saver{display:block;visibility:visible}
/*! form-saver v8.2.0 | (c) 2016 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/form-saver */
.form-saver{display:none;visibility:hidden}.js-form-saver .form-saver{display:block;visibility:visible}
30 changes: 15 additions & 15 deletions dist/js/form-saver.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* form-saver v8.1.1: Save and reuse form data
* form-saver v8.2.0: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
Expand All @@ -13,7 +13,7 @@
} else {
root.formSaver = factory(root);
}
})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) {
})(typeof global !== 'undefined' ? global : this.window || this.global, (function (root) {

'use strict';

Expand Down Expand Up @@ -242,14 +242,14 @@
};

// Add field data to array
forEach(formFields, function (field) {
forEach(formFields, (function (field) {
prepareField(field);
});
}));

// Display save success message
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
displayStatus( status, settings.saveMessage, settings.saveClass );
});
}));

// Save form data in localStorage
localStorage.setItem( formSaverID, JSON.stringify(formSaverData) );
Expand Down Expand Up @@ -287,9 +287,9 @@
sessionStorage.setItem(formSaverID + '-formSaverMessage', formMessage);
location.reload(false);
} else {
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
status.innerHTML = formMessage;
});
}));
}
};

Expand Down Expand Up @@ -343,14 +343,14 @@
};

// Populate form with data from localStorage
forEach(formFields, function (field) {
forEach(formFields, (function (field) {
populateField(field);
});
}));

// If page was reloaded and delete success message exists, display it
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
displayStatus(status);
});
}));

settings.callbackLoad( form ); // Run callbacks after load

Expand Down Expand Up @@ -406,9 +406,9 @@
document.documentElement.className += (document.documentElement.className ? ' ' : '') + settings.initClass;

// Get saved form data on page load
forEach(forms, function (form) {
forEach(forms, (function (form) {
formSaver.loadForm( form, settings );
});
}));

// Listen for click events
document.addEventListener('click', eventHandler, false);
Expand All @@ -422,4 +422,4 @@

return formSaver;

});
}));
4 changes: 2 additions & 2 deletions dist/js/form-saver.min.js

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

2 changes: 1 addition & 1 deletion docs/dist/css/form-saver.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* form-saver v8.1.1: Save and reuse form data
* form-saver v8.2.0: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
Expand Down
9 changes: 2 additions & 7 deletions docs/dist/css/form-saver.min.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
/*! form-saver v8.1.1 | (c) 2016 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/form-saver */
/*!
* form-saver v8.1.1: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
*/.form-saver{display:none;visibility:hidden}.js-form-saver .form-saver{display:block;visibility:visible}
/*! form-saver v8.2.0 | (c) 2016 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/form-saver */
.form-saver{display:none;visibility:hidden}.js-form-saver .form-saver{display:block;visibility:visible}
30 changes: 15 additions & 15 deletions docs/dist/js/form-saver.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* form-saver v8.1.1: Save and reuse form data
* form-saver v8.2.0: Save and reuse form data
* (c) 2016 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/form-saver
Expand All @@ -13,7 +13,7 @@
} else {
root.formSaver = factory(root);
}
})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) {
})(typeof global !== 'undefined' ? global : this.window || this.global, (function (root) {

'use strict';

Expand Down Expand Up @@ -242,14 +242,14 @@
};

// Add field data to array
forEach(formFields, function (field) {
forEach(formFields, (function (field) {
prepareField(field);
});
}));

// Display save success message
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
displayStatus( status, settings.saveMessage, settings.saveClass );
});
}));

// Save form data in localStorage
localStorage.setItem( formSaverID, JSON.stringify(formSaverData) );
Expand Down Expand Up @@ -287,9 +287,9 @@
sessionStorage.setItem(formSaverID + '-formSaverMessage', formMessage);
location.reload(false);
} else {
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
status.innerHTML = formMessage;
});
}));
}
};

Expand Down Expand Up @@ -343,14 +343,14 @@
};

// Populate form with data from localStorage
forEach(formFields, function (field) {
forEach(formFields, (function (field) {
populateField(field);
});
}));

// If page was reloaded and delete success message exists, display it
forEach(formStatus, function (status) {
forEach(formStatus, (function (status) {
displayStatus(status);
});
}));

settings.callbackLoad( form ); // Run callbacks after load

Expand Down Expand Up @@ -406,9 +406,9 @@
document.documentElement.className += (document.documentElement.className ? ' ' : '') + settings.initClass;

// Get saved form data on page load
forEach(forms, function (form) {
forEach(forms, (function (form) {
formSaver.loadForm( form, settings );
});
}));

// Listen for click events
document.addEventListener('click', eventHandler, false);
Expand All @@ -422,4 +422,4 @@

return formSaver;

});
}));
Loading

0 comments on commit 6eade1f

Please sign in to comment.