move src -> lib

This commit is contained in:
Daniel Freedman
2017-02-28 10:37:04 -08:00
parent 722790b60c
commit 155e3ffc4e
40 changed files with 18 additions and 36 deletions

View File

@@ -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()
);

View File

@@ -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>

View File

@@ -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;

View File

@@ -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>

View File

@@ -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');

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>