Skip to content

Commit

Permalink
Integrates Code Painter. Automated cleanup of source files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Jun 29, 2014
1 parent 90784ef commit cb7b990
Show file tree
Hide file tree
Showing 13 changed files with 316 additions and 289 deletions.
12 changes: 12 additions & 0 deletions .codepainterrc
@@ -0,0 +1,12 @@
{
"indent_style": "space",
"indent_size": 2,
"insert_final_newline": true,
"quote_type": "single",
"space_after_anonymous_functions": true,
"space_after_control_statements": true,
"spaces_around_operators": true,
"trim_trailing_whitespace": true,
"spaces_in_brackets": false,
"end_of_line": "lf"
}
14 changes: 14 additions & 0 deletions Gruntfile.js
Expand Up @@ -7,6 +7,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-codepainter');
grunt.loadNpmTasks('grunt-dox');

var banner = [
Expand Down Expand Up @@ -110,6 +111,19 @@ module.exports = function(grunt) {
tagMessage: 'Version %VERSION%',
push: false
}
},
codepainter: {
source: {
options: {
json: '.codepainterrc'
},
files: [{
expand: true,
cwd: 'src/',
src: ['shifty.!(intro|outro|const)*.js'],
dest: 'src/'
}]
}
}
});

Expand Down
8 changes: 4 additions & 4 deletions dist/doc/src/shifty.core.js.html
Expand Up @@ -273,10 +273,10 @@
defaults(targetState, currentState);

this._easing = composeEasingObject(
currentState, config.easing || DEFAULT_EASING);
currentState, config.easing || DEFAULT_EASING);

this._filterArgs =
[currentState, this._originalState, targetState, this._easing];
[currentState, this._originalState, targetState, this._easing];

applyFilter(this, 'tweenCreated');
return this;
Expand All @@ -299,8 +299,8 @@
var self = this;
this._timeoutHandler = function () {
timeoutHandler(self, self._timestamp, self._duration, self._currentState,
self._originalState, self._targetState, self._easing, self._step,
self._scheduleFunction);
self._originalState, self._targetState, self._easing, self._step,
self._scheduleFunction);
};

this._timeoutHandler();
Expand Down
4 changes: 2 additions & 2 deletions dist/doc/src/shifty.interpolate.js.html
Expand Up @@ -237,7 +237,7 @@
</pre></div></div></div><div class="section"><p data-section-title class="title"><a href="#">Source</a></p><div data-section-content class="content"><pre><code class="language-javascript">Tweenable.interpolate = function (from, targetState, position, easing) {
var current = Tweenable.shallowCopy({}, from);
var easingObject = Tweenable.composeEasingObject(
from, easing || 'linear');
from, easing || 'linear');

mockTweenable.set({});

Expand All @@ -254,7 +254,7 @@
Tweenable.applyFilter(mockTweenable, 'beforeTween');

var interpolatedValues = getInterpolatedValues(
from, current, targetState, position, easingObject);
from, current, targetState, position, easingObject);

// Transform values back into their original format
Tweenable.applyFilter(mockTweenable, 'afterTween');
Expand Down
4 changes: 2 additions & 2 deletions dist/doc/src/shifty.token.js.html
Expand Up @@ -341,8 +341,8 @@ <h2>Easing support</h2>
<p><code>translateX</code> and <code>translateY</code> are not in sync anymore, because <code>easeInQuad</code> was specified for <code>translateX</code> and <code>bounce</code> for <code>translateY</code>. Mixing and matching easing curves can make for some interesting motion in your animations.</p>

<p>The order of the space-separated easing curves correspond the token values they apply to. If there are more token values than easing curves listed, the last easing curve listed is used.</p></div></div><div class="section"><p data-section-title class="title"><a href="#">Source</a></p><div data-section-content class="content"><pre><code class="language-javascript">function token () {
// Functionality for this extension runs implicitly if it is loaded.
}</code></pre></div></div></div></article></div></div><!-- Foundation JS--><script type="text/javascript">document.write('<script src=' +
// Functionality for this extension runs implicitly if it is loaded.
}</code></pre></div></div></div></article></div></div><!-- Foundation JS--><script type="text/javascript">document.write('<script src=' +
('__proto__' in {} ? 'http://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min' : 'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min') +
'.js><\/script>')
</script><script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/foundation.min.js"></script><script src="http://cdnjs.cloudflare.com/ajax/libs/foundation/4.1.6/js/foundation/foundation.reveal.min.js"></script><!-- Prism js--><script>/**
Expand Down

0 comments on commit cb7b990

Please sign in to comment.