Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Unified Diff: node_modules/vulcanize/lib/constants.js

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « node_modules/vulcanize/example/sub-import/sub-import.html ('k') | node_modules/vulcanize/lib/optparser.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: node_modules/vulcanize/lib/constants.js
diff --git a/node_modules/vulcanize/lib/constants.js b/node_modules/vulcanize/lib/constants.js
new file mode 100644
index 0000000000000000000000000000000000000000..081dc796d57c2370ade6b41e0f61646aaa893de8
--- /dev/null
+++ b/node_modules/vulcanize/lib/constants.js
@@ -0,0 +1,31 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+
+var JS = 'script:not([type]), script[type="text/javascript"]';
+var URL_ATTR = ['href', 'src', 'action', 'style'];
+
+module.exports = {
+ EOL: require('os').EOL,
+ ELEMENTS: 'polymer-element:not([assetpath])',
+ ELEMENTS_NOSCRIPT: 'polymer-element[noscript]',
+ ABS_URL: /(^data:)|(^http[s]?:)|(^\/)|(^mailto:)|(^tel:)|(^sms:)/,
+ REMOTE_ABS_URL: /(^http[s]?\:)|(^\/\/)/,
+ IMPORTS: 'link[rel="import"][href]',
+ URL: /url\([^)]*\)/g,
+ URL_ATTR: URL_ATTR,
+ URL_ATTR_SEL: '[' + URL_ATTR.join('],[') + ']',
+ URL_TEMPLATE: '{{.*}}',
+ JS: JS,
+ JS_SRC: JS.split(',').map(function(s){ return s + '[src]'; }).join(','),
+ JS_INLINE: JS.split(',').map(function(s) { return s + ':not([src])'; }).join(','),
+ CSS: 'style:not([type]), style[type="text/css"]',
+ // Output match is [ 'Polymer(', NAME_OF_ELEMENT OR undefined, ',', { or ) ]
+ POLYMER_INVOCATION: /Polymer\(([^,{]+)?(,\s*)?({|\))/
+};
« no previous file with comments | « node_modules/vulcanize/example/sub-import/sub-import.html ('k') | node_modules/vulcanize/lib/optparser.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698