diff --git a/_bump.js b/_bump.js deleted file mode 100644 index 1e33a3f..0000000 --- a/_bump.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const version = require('./node_modules/@polymer/polymer/package.json').version; -const current = require('./package.json'); -const updated = Object.assign({}, current, { version: version } ); - -console.log('Current Polymer version:', version); -console.log('Current package.json version:', current.version); - -fs.writeFile('./package.json', updated, function(err) { - if(err) { - return console.log(err); - } else { - return console.log('Succesfully updated package.json version to +', updated.version); - } -}); - - diff --git a/index.js b/index.js new file mode 100644 index 0000000..78261f6 --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +'use strict'; + +export const Polymer = window.Polymer; \ No newline at end of file diff --git a/package.json b/package.json index 7aecaff..724794a 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,11 @@ { "name": "polymer-npm-wrapper", -<<<<<<< HEAD - "version": "v2.0.0-rc4", -======= - "version": "v1.0.1", ->>>>>>> polymer-1 + "version": "v1.1", "description": "Unofficial wrapper for getting latest version of Polymer from Git as NPM dependency and exporting it as ES2015 module.", - "main": "polymer-element.js", + "main": "index.js", "repository": "https://github.com/contactlab/polymer-npm-wrapper.git", "author": "Contactlab Product Team ", "license": "Apache-2.0", -<<<<<<< HEAD - "scripts": { - "extract": "webpack", - "download": "npm install --save https://github.com/Polymer/polymer", - "bump": "node ./actions/bump" - }, -======= ->>>>>>> polymer-1 "keywords": [ "polymer", "npm", @@ -32,15 +20,6 @@ "modules" ], "dependencies": { -<<<<<<< HEAD - "@polymer/polymer": "git+https://github.com/Polymer/polymer.git", - "@webcomponents/shadycss": "https://github.com/webcomponents/shadycss" - }, - "devDependencies": { - "wc-loader": "^1.1.3", - "webpack": "^2.4.1" -======= "@polymer/polymer": "https://github.com/Polymer/polymer#7d460dd3fafa461eaef0a4ce647e4e244a87e65e" ->>>>>>> polymer-1 } } diff --git a/polymer-element.js b/polymer-element.js deleted file mode 100644 index b4ca500..0000000 --- a/polymer-element.js +++ /dev/null @@ -1,5526 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 13); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports) { - -/*__wc__loader*/ - -(function() { - 'use strict'; - - const userPolymer = window.Polymer; - - /** - * @namespace Polymer - * @summary Polymer is a lightweight library built on top of the web - * standards-based Web Components API's, and makes it easy to build your - * own custom HTML elements. - * @param {Object} info Prototype for the custom element. It must contain - * an `is` property to specify the element name. Other properties populate - * the element prototype. The `properties`, `observers`, `hostAttributes`, - * and `listeners` properties are processed to create element features. - * @return {Object} Returns a custom element class for the given provided - * prototype `info` object. The name of the element if given by `info.is`. - */ - window.Polymer = function(info) { - return window.Polymer._polymerFn(info); - } - - // support user settings on the Polymer object - if (userPolymer) { - Object.assign(Polymer, userPolymer); - } - - // To be plugged by legacy implementation if loaded - /** - * @param {Object} info Prototype for the custom element. It must contain - * an `is` property to specify the element name. Other properties populate - * the element prototype. The `properties`, `observers`, `hostAttributes`, - * and `listeners` properties are processed to create element features. - */ - window.Polymer._polymerFn = function(info) { // eslint-disable-line no-unused-vars - throw new Error('Load polymer.html to use the Polymer() function.'); - } - window.Polymer.version = '2.0-preview'; - - /* eslint-disable no-unused-vars */ - /* - When using Closure Compiler, JSCompiler_renameProperty(property, object) is replaced by the munged name for object[property] - We cannot alias this function, so we have to use a small shim that has the same behavior when not compiling. - */ - window.JSCompiler_renameProperty = function(prop, obj) { - return prop; - } - /* eslint-enable */ - -})(); - - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -/*__wc__loader*/ -__webpack_require__(0); - - - -(function() { - - 'use strict'; - - // unique global id for deduping mixins. - let dedupeId = 0; - - /** - * Given a mixin producing function, memoize applications of mixin to base - * @private - * @param {Function} mixin Mixin for which to create a caching mixin. - * @return {Function} Returns a mixin which when applied multiple times to the - * same base will always return the same extended class. - */ - function cachingMixin(mixin) { - return function(base) { - if (!mixin.__mixinApplications) { - mixin.__mixinApplications = new WeakMap(); - } - let map = mixin.__mixinApplications; - let application = map.get(base); - if (!application) { - application = mixin(base); - map.set(base, application); - } - return application; - }; - } - - /** - * Wraps an ES6 class expression mixin such that the mixin is only applied - * if it has not already been applied its base argument. Also memoizes mixin - * applications. - * - * @memberof Polymer - * @param {Function} mixin ES6 class expression mixin to wrap - * @return {Function} Wrapped mixin that deduplicates and memoizes - * mixin applications to base - */ - Polymer.dedupingMixin = function(mixin) { - mixin = cachingMixin(mixin); - // maintain a unique id for each mixin - mixin.__dedupeId = ++dedupeId; - return function(base) { - let baseSet = base.__mixinSet; - if (baseSet && baseSet[mixin.__dedupeId]) { - return base; - } - let extended = mixin(base); - // copy inherited mixin set from the extended class, or the base class - // NOTE: we avoid use of Set here because some browser (IE11) - // cannot extend a base Set via the constructor. - extended.__mixinSet = - Object.create(extended.__mixinSet || baseSet || null); - extended.__mixinSet[mixin.__dedupeId] = true; - return extended; - } - }; - -})(); - - - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -/*__wc__loader*/ -__webpack_require__(0); - - -(function() { - 'use strict'; - - const caseMap = {}; - const DASH_TO_CAMEL = /-[a-z]/g; - const CAMEL_TO_DASH = /([A-Z])/g; - - /** - * Module with utilities for converting between "dash-case" and "camelCase" - * identifiers. - * - * @namespace - * @memberof Polymer - * @summary Module that provides utilities for converting between "dash-case" - * and "camelCase". - */ - const CaseMap = { - - /** - * Converts "dash-case" identifier (e.g. `foo-bar-baz`) to "camelCase" - * (e.g. `fooBarBaz`). - * - * @memberof Polymer.CaseMap - * @param {string} dash Dash-case identifier - * @return {string} Camel-case representation of the identifier - */ - dashToCamelCase(dash) { - return caseMap[dash] || ( - caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(DASH_TO_CAMEL, - (m) => m[1].toUpperCase() - ) - ); - }, - - /** - * Converts "camelCase" identifier (e.g. `fooBarBaz`) to "dash-case" - * (e.g. `foo-bar-baz`). - * - * @memberof Polymer.CaseMap - * @param {string} camel Camel-case identifier - * @return {string} Dash-case representation of the identifier - */ - camelToDashCase(camel) { - return caseMap[camel] || ( - caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase() - ); - } - - }; - - Polymer.CaseMap = CaseMap; -})(); - - - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -/*__wc__loader*/ -__webpack_require__(0); - - - - (function() { - 'use strict'; - - let CSS_URL_RX = /(url\()([^)]*)(\))/g; - let ABS_URL = /(^\/)|(^#)|(^[\w-\d]*:)/; - let workingURL; - let resolveDoc; - /** - * Resolves the given URL against the provided `baseUri'. - * - * @memberof Polymer.ResolveUrl - * @param {string} url Input URL to resolve - * @param {string} baseURI Base URI to resolve the URL against - * @return {string} resolved URL - */ - function resolveUrl(url, baseURI) { - if (url && ABS_URL.test(url)) { - return url; - } - // Lazy feature detection. - if (workingURL === undefined) { - workingURL = false; - try { - const u = new URL('b', 'http://a'); - u.pathname = 'c%20d'; - workingURL = (u.href === 'http://a/c%20d'); - } catch (e) { - // silently fail - } - } - if (!baseURI) { - baseURI = document.baseURI || window.location.href; - } - if (workingURL) { - return (new URL(url, baseURI)).href; - } - // Fallback to creating an anchor into a disconnected document. - if (!resolveDoc) { - resolveDoc = document.implementation.createHTMLDocument('temp'); - resolveDoc.base = resolveDoc.createElement('base'); - resolveDoc.head.appendChild(resolveDoc.base); - resolveDoc.anchor = resolveDoc.createElement('a'); - resolveDoc.body.appendChild(resolveDoc.anchor); - } - resolveDoc.base.href = baseURI; - resolveDoc.anchor.href = url; - return resolveDoc.anchor.href || url; - - } - - /** - * Resolves any relative URL's in the given CSS text against the provided - * `ownerDocument`'s `baseURI`. - * - * @memberof Polymer.ResolveUrl - * @param {string} cssText CSS text to process - * @param {string} baseURI Base URI to resolve the URL against - * @return {string} Processed CSS text with resolved URL's - */ - function resolveCss(cssText, baseURI) { - return cssText.replace(CSS_URL_RX, function(m, pre, url, post) { - return pre + '\'' + - resolveUrl(url.replace(/["']/g, ''), baseURI) + - '\'' + post; - }); - } - - /** - * Returns a path from a given `url`. The path includes the trailing - * `/` from the url. - * - * @memberof Polymer.ResolveUrl - * @param {string} url Input URL to transform - * @return {string} resolved path - */ - function pathFromUrl(url) { - return url.substring(0, url.lastIndexOf('/') + 1); - } - - /** - * Module with utilities for resolving relative URL's. - * - * @namespace - * @memberof Polymer - * @summary Module with utilities for resolving relative URL's. - */ - Polymer.ResolveUrl = { - resolveCss: resolveCss, - resolveUrl: resolveUrl, - pathFromUrl: pathFromUrl - }; - - })(); - - - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -/*__wc__loader*/ -__webpack_require__(6); - - -(function() { - 'use strict'; - - /** - * Base class that provides the core API for Polymer's meta-programming - * features including template stamping, data-binding, attribute deserialization, - * and property change observation. - * - * @polymerElement - * @memberof Polymer - * @constructor - * @implements {Polymer_ElementMixin} - * @extends HTMLElement - * @mixes Polymer.ElementMixin - * @summary Custom element base class that provides the core API for Polymer's - * key meta-programming features including template stamping, data-binding, - * attribute deserialization, and property change observation - */ - const Element = Polymer.ElementMixin(HTMLElement); - Polymer.Element = Element; -})(); - - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -/*__wc__loader*/ -__webpack_require__(0); - -__webpack_require__(3); - - -(function() { - 'use strict'; - - let modules = {}; - let lcModules = {}; - function findModule(id) { - return modules[id] || lcModules[id.toLowerCase()]; - } - - function styleOutsideTemplateCheck(inst) { - if (inst.querySelector('style')) { - console.warn('dom-module %s has style outside template', inst.id); - } - } - - /** - * The `dom-module` element registers the dom it contains to the name given - * by the module's id attribute. It provides a unified database of dom - * accessible via its static `import` API. - * - * A key use case of `dom-module` is for providing custom element `