Skip to content

Commit 2f6e86c

Browse files
committed
Simplify target names
1 parent a55d3f5 commit 2f6e86c

9 files changed

+27
-34
lines changed

Gruntfile.js

+17-19
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ module.exports = function(grunt) {
5151
function genTarget(target) {
5252
var config = targetConfig[target];
5353
var newGens = [
54-
generateFromTemplate('templates/web-animations.js', {target: target}, 'web-animations' + config.suffix + '.dev.js'),
55-
generateFromTemplate('templates/web-animations.html', {src: config.src}, 'web-animations' + config.suffix + '.dev.html'),
56-
generateFromTemplate('templates/runner.html', {target: target}, 'test/runner' + config.suffix + '.html')];
54+
generateFromTemplate('templates/web-animations.js', {target: target}, target + '.dev.js'),
55+
generateFromTemplate('templates/web-animations.html', {src: config.src}, target + '.dev.html'),
56+
generateFromTemplate('templates/runner.html', {target: target}, 'test/runner-' + target + '.html')];
5757
return newGens;
5858
}
5959

@@ -104,31 +104,29 @@ module.exports = function(grunt) {
104104

105105
function buildMinifill(target) {
106106
var config = targetConfig[target];
107-
var name = 'maxifill' + config.suffix;
108107
return genTarget(target).concat([
109-
concat(config.scopeSrc.concat(config.sharedSrc).concat(config.minifillSrc), 'inter-raw-' + name + '.js', concatDefines),
110-
guard('inter-raw-' + name + '.js', 'inter-web-animations-' + name + '.js'),
111-
compress('inter-web-animations-' + name + '.js', 'web-animations' + config.suffix + '.min.js', concatDefines)
108+
concat(config.scopeSrc.concat(config.sharedSrc).concat(config.minifillSrc), 'inter-raw-' + target + '.js', concatDefines),
109+
guard('inter-raw-' + target + '.js', 'inter-' + target + '.js'),
110+
compress('inter-' + target + '.js', target + '.min.js', concatDefines)
112111
]);
113112
}
114113

115114
function buildMaxifill(target) {
116115
var config = targetConfig[target];
117-
var name = 'maxifill' + config.suffix;
118116
return genTarget(target).concat([
119-
concat(config.scopeSrc.concat(config.sharedSrc), 'inter-' + name + '-preamble.js', concatDefines),
120-
concat(config.minifillSrc, 'inter-component-' + name + 'minifill.js', concatDefines),
121-
guard('inter-component-' + name + 'minifill.js', 'inter-guarded-' + name + '-minifill.js'),
122-
concat(config.maxifillSrc, 'inter-component-' + name + '.js', concatDefines),
123-
concatWithMaps(['inter-' + name + '-preamble.js', 'inter-guarded-' + name + '-minifill.js', 'inter-component-' + name + '.js'],
124-
'inter-web-animations-' + name + '.js'),
125-
compress('inter-web-animations-' + name + '.js', 'web-animations' + config.suffix + '.min.js', concatDefines)
117+
concat(config.scopeSrc.concat(config.sharedSrc), 'inter-' + target + '-preamble.js', concatDefines),
118+
concat(config.minifillSrc, 'inter-component-' + target + 'minifill.js', concatDefines),
119+
guard('inter-component-' + target + 'minifill.js', 'inter-guarded-' + target + '-minifill.js'),
120+
concat(config.maxifillSrc, 'inter-component-' + target + '.js', concatDefines),
121+
concatWithMaps(['inter-' + target + '-preamble.js', 'inter-guarded-' + target + '-minifill.js', 'inter-component-' + target + '.js'],
122+
'inter-' + target + '.js'),
123+
compress('inter-' + target + '.js', target + '.min.js', concatDefines)
126124
]);
127125
}
128126

129-
grunt.registerTask('minifill', buildMinifill('minifill'));
130-
grunt.registerTask('maxifill', buildMaxifill('maxifill'));
131-
grunt.registerTask('next-lite', buildMaxifill('next-lite'));
127+
grunt.registerTask('web-animations', buildMinifill('web-animations'));
128+
grunt.registerTask('web-animations-next', buildMaxifill('web-animations-next'));
129+
grunt.registerTask('web-animations-next-lite', buildMaxifill('web-animations-next-lite'));
132130

133131
var testTargets = {'minifill': {}, 'maxifill': {}};
134132

@@ -277,5 +275,5 @@ module.exports = function(grunt) {
277275
});
278276
});
279277

280-
grunt.task.registerTask('default', ['minifill', 'maxifill', 'gjslint']);
278+
grunt.task.registerTask('default', ['web-animations', 'web-animations-next', 'web-animations-next-lite', 'gjslint']);
281279
};

target-config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
// This object specifies the source and test files for different Web Animation build targets.
8585
var targetConfig = {
86-
minifill: {
86+
'web-animations': {
8787
suffix: '',
8888
scopeSrc: scopeSrc,
8989
sharedSrc: sharedSrc,
@@ -92,7 +92,7 @@
9292
src: scopeSrc.concat(sharedSrc).concat(minifillSrc),
9393
test: minifillTest,
9494
},
95-
maxifill: {
95+
'web-animations-next': {
9696
suffix: '-next',
9797
scopeSrc: scopeSrc,
9898
sharedSrc: sharedSrc,
@@ -101,13 +101,13 @@
101101
src: scopeSrc.concat(sharedSrc).concat(minifillSrc).concat(maxifillSrc),
102102
test: maxifillTest,
103103
},
104-
'next-lite': {
104+
'web-animations-next-lite': {
105105
suffix: '-next-lite',
106106
scopeSrc: scopeSrc,
107107
sharedSrc: sharedSrc,
108108
minifillSrc: liteMinifillSrc,
109109
maxifillSrc: maxifillSrc,
110-
src: scopeSrc.concat(sharedSrc).concat(minifillSrc).concat(maxifillSrc),
110+
src: scopeSrc.concat(sharedSrc).concat(liteMinifillSrc).concat(maxifillSrc),
111111
test: [],
112112
},
113113
};

test/runner.html test/runner-web-animations-next-lite.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<script src="../target-config.js"></script>
2222
<script src="runner.js"></script>
2323
<script>
24-
loadWebAnimationsBuildTarget('minifill');
24+
loadWebAnimationsBuildTarget('web-animations-next-lite');
2525
</script>
2626
<div id="mocha"></div>

test/runner-next.html test/runner-web-animations-next.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<script src="../target-config.js"></script>
2222
<script src="runner.js"></script>
2323
<script>
24-
loadWebAnimationsBuildTarget('maxifill');
24+
loadWebAnimationsBuildTarget('web-animations-next');
2525
</script>
2626
<div id="mocha"></div>

test/runner-next-lite.html test/runner-web-animations.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<script src="../target-config.js"></script>
2222
<script src="runner.js"></script>
2323
<script>
24-
loadWebAnimationsBuildTarget('next-lite');
24+
loadWebAnimationsBuildTarget('web-animations');
2525
</script>
2626
<div id="mocha"></div>

web-animations-next-lite.dev.html

-5
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
<script src="src/apply.js"></script>
2525
<script src="src/element-animatable.js"></script>
2626
<script src="src/interpolation.js"></script>
27-
<script src="src/matrix-interpolation.js"></script>
2827
<script src="src/player.js"></script>
2928
<script src="src/tick.js"></script>
30-
<script src="src/matrix-decomposition.js"></script>
3129
<script src="src/handler-utils.js"></script>
3230
<script src="src/shadow-handler.js"></script>
3331
<script src="src/number-handler.js"></script>
@@ -36,9 +34,6 @@
3634
<script src="src/dimension-handler.js"></script>
3735
<script src="src/box-handler.js"></script>
3836
<script src="src/transform-handler.js"></script>
39-
<script src="src/font-weight-handler.js"></script>
40-
<script src="src/position-handler.js"></script>
41-
<script src="src/shape-handler.js"></script>
4237
<script src="src/timeline.js"></script>
4338
<script src="src/maxifill-player.js"></script>
4439
<script src="src/animation-constructor.js"></script>

web-animations-next-lite.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
var webAnimationsSourceTarget = 'next-lite';
14+
var webAnimationsSourceTarget = 'web-animations-next-lite';
1515
var WEB_ANIMATIONS_TESTING = false;
1616
(function() {
1717
var scripts = document.getElementsByTagName('script');

web-animations-next.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
var webAnimationsSourceTarget = 'maxifill';
14+
var webAnimationsSourceTarget = 'web-animations-next';
1515
var WEB_ANIMATIONS_TESTING = false;
1616
(function() {
1717
var scripts = document.getElementsByTagName('script');

web-animations.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14-
var webAnimationsSourceTarget = 'minifill';
14+
var webAnimationsSourceTarget = 'web-animations';
1515
var WEB_ANIMATIONS_TESTING = false;
1616
(function() {
1717
var scripts = document.getElementsByTagName('script');

0 commit comments

Comments
 (0)