Skip to content

Commit

Permalink
Apply clang-format to custom-elements polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
rictic committed Feb 7, 2020
1 parent 1aa89fd commit 709cf2c
Show file tree
Hide file tree
Showing 20 changed files with 769 additions and 586 deletions.
12 changes: 12 additions & 0 deletions packages/custom-elements/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BasedOnStyle: Google
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
BinPackArguments: false
# This breaks async functions sometimes, see
# https://github.com/Polymer/polymer-analyzer/pull/393
# BinPackParameters: false
34 changes: 27 additions & 7 deletions packages/custom-elements/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/custom-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"build": "gulp",
"debug": "rollup -c",
"test": "wct",
"prepack": "npm run build"
"prepack": "npm run build",
"format": "find src -name \"*.js\" | xargs clang-format --style=file -i"
},
"files": [
"custom-elements.min.js*",
Expand All @@ -32,6 +33,7 @@
"@webcomponents/shadydom": "^1.7.1",
"@webcomponents/template": "^1.4.1",
"@webcomponents/webcomponents-platform": "^1.0.0",
"clang-format": "^1.3.0",
"es6-promise": "4.2.4",
"wct-browser-legacy": "^1.0.2"
},
Expand Down
11 changes: 6 additions & 5 deletions packages/custom-elements/src/AlreadyConstructedMarker.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* @license
* Copyright (c) 2016 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
* 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
*/

/**
Expand Down
Loading

0 comments on commit 709cf2c

Please sign in to comment.