mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
move src -> lib
This commit is contained in:
@@ -34,12 +34,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @param {string} dash Dash-case identifier
|
||||
* @return {string} Camel-case representation of the identifier
|
||||
*/
|
||||
dashToCamelCase: function(dash) {
|
||||
dashToCamelCase(dash) {
|
||||
return caseMap[dash] || (
|
||||
caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(DASH_TO_CAMEL,
|
||||
function(m) {
|
||||
return m[1].toUpperCase();
|
||||
}
|
||||
(m) => m[1].toUpperCase()
|
||||
)
|
||||
);
|
||||
},
|
||||
@@ -52,7 +50,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @param {string} camel Camel-case identifier
|
||||
* @return {string} Dash-case representation of the identifier
|
||||
*/
|
||||
camelToDashCase: function(camel) {
|
||||
camelToDashCase(camel) {
|
||||
return caseMap[camel] || (
|
||||
caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase()
|
||||
);
|
||||
@@ -1,4 +1,4 @@
|
||||
<link rel="import" href="src/mixins/element-mixin.html">
|
||||
<link rel="import" href="lib/mixins/element-mixin.html">
|
||||
<script>
|
||||
Polymer.Element = Polymer.ElementMixin(HTMLElement);
|
||||
</script>
|
||||
16
polymer.html
16
polymer.html
@@ -1,13 +1,13 @@
|
||||
<link rel="import" href="src/legacy/legacy-element-mixin.html">
|
||||
<link rel="import" href="src/legacy/polymer-fn.html">
|
||||
<link rel="import" href="lib/legacy/legacy-element-mixin.html">
|
||||
<link rel="import" href="lib/legacy/polymer-fn.html">
|
||||
<!-- template elements -->
|
||||
<link rel="import" href="src/legacy/templatizer-behavior.html">
|
||||
<link rel="import" href="src/elements/dom-bind.html">
|
||||
<link rel="import" href="src/elements/dom-repeat.html">
|
||||
<link rel="import" href="src/elements/dom-if.html">
|
||||
<link rel="import" href="src/elements/array-selector.html">
|
||||
<link rel="import" href="lib/legacy/templatizer-behavior.html">
|
||||
<link rel="import" href="lib/elements/dom-bind.html">
|
||||
<link rel="import" href="lib/elements/dom-repeat.html">
|
||||
<link rel="import" href="lib/elements/dom-if.html">
|
||||
<link rel="import" href="lib/elements/array-selector.html">
|
||||
<!-- custom-style -->
|
||||
<link rel="import" href="src/elements/custom-style.html">
|
||||
<link rel="import" href="lib/elements/custom-style.html">
|
||||
<script>
|
||||
// bc
|
||||
Polymer.Base = Polymer.LegacyElementMixin(HTMLElement).prototype;
|
||||
|
||||
@@ -25,7 +25,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
});
|
||||
</script>
|
||||
<script src="../../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../src/utils/async.html">
|
||||
<link rel="import" href="../../lib/utils/async.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../src/utils/case-map.html">
|
||||
<link rel="import" href="../../lib/utils/case-map.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -30,27 +30,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
assert.equal(caseMap.camelToDashCase('camelCCase'), 'camel-c-case');
|
||||
});
|
||||
|
||||
test('camelToDashCase caches conversions', function() {
|
||||
caseMap._caseMap['camelCase'] = 'some-other-camel-case';
|
||||
assert.equal(caseMap.camelToDashCase('camelCase'), 'some-other-camel-case');
|
||||
|
||||
var result = caseMap.camelToDashCase('camelCCase');
|
||||
assert.equal(Polymer.CaseMap._caseMap['camelCCase'], result);
|
||||
});
|
||||
|
||||
test('dashToCamelCase converts to camelCase', function() {
|
||||
assert.equal(caseMap.dashToCamelCase('camel-case'), 'camelCase');
|
||||
assert.equal(caseMap.dashToCamelCase('camel-c-case'), 'camelCCase');
|
||||
});
|
||||
|
||||
test('dashToCamelCase caches conversions', function() {
|
||||
caseMap._caseMap['camel-case'] = 'someOtherCamelCase';
|
||||
assert.equal(caseMap.dashToCamelCase('camel-case'), 'someOtherCamelCase');
|
||||
|
||||
var result = caseMap.dashToCamelCase('camel-c-case');
|
||||
assert.equal(Polymer.CaseMap._caseMap['camel-c-case'], result);
|
||||
});
|
||||
|
||||
test('camelToDashCase and dashToCamelCase reverse the other function', function() {
|
||||
var camelCase = caseMap.dashToCamelCase('camel-c-case');
|
||||
assert.equal(caseMap.camelToDashCase(camelCase), 'camel-c-case');
|
||||
|
||||
@@ -14,7 +14,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../polymer-element.html">
|
||||
<link rel="import" href="../../src/utils/flattened-nodes-observer.html">
|
||||
<link rel="import" href="../../lib/utils/flattened-nodes-observer.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../src/utils/import-href.html">
|
||||
<link rel="import" href="../../lib/utils/import-href.html">
|
||||
<body>
|
||||
|
||||
<x-test></x-test>
|
||||
|
||||
@@ -13,7 +13,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
<meta charset="utf-8">
|
||||
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../src/utils/path.html">
|
||||
<link rel="import" href="../../lib/utils/path.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
-->
|
||||
<link rel="import" href="../../polymer-element.html">
|
||||
<link rel="import" href="../../../shadycss/apply-shim.html">
|
||||
<link rel="import" href="../../src/elements/custom-style.html">
|
||||
<link rel="import" href="../../lib/elements/custom-style.html">
|
||||
|
||||
<dom-module id="apply-element">
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user