Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove copyright header #1097

Merged
merged 3 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import MainThreadBuilds from './rollup.main-thread.js';
import WorkerThreadBuilds from './rollup.worker-thread.js';

Expand Down
16 changes: 0 additions & 16 deletions config/rollup.main-thread.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import compiler from '@ampproject/rollup-plugin-closure-compiler';
import { terser } from 'rollup-plugin-terser';
import replace from '@rollup/plugin-replace';
Expand Down
16 changes: 0 additions & 16 deletions config/rollup.plugins.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import babel from '@rollup/plugin-babel';
import MagicString from 'magic-string';
import fs from 'fs';
Expand Down
16 changes: 0 additions & 16 deletions config/rollup.utils.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const { DEBUG_BUNDLE = false, MINIFY_BUNDLE = false, COMPRESS_BUNDLE = false } = process.env;

export let DEBUG_BUNDLE_VALUE = DEBUG_BUNDLE === 'true';
Expand Down
16 changes: 0 additions & 16 deletions config/rollup.worker-thread.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import compiler from '@ampproject/rollup-plugin-closure-compiler';
import { terser } from 'rollup-plugin-terser';
import replace from '@rollup/plugin-replace';
Expand Down
16 changes: 0 additions & 16 deletions demo/canvas/canvas.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const existingCanvasBtn = document.getElementById('existingCanvasBtn');
const newCanvasBtn = document.getElementById('newCanvasBtn');
const doubleCanvasBtn = document.getElementById('doubleCanvasBtn');
Expand Down
16 changes: 0 additions & 16 deletions demo/empty/author.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const span = document.createElement('span');
const div = document.createElement('div');
const input = document.createElement('input');
Expand Down
16 changes: 0 additions & 16 deletions demo/filtered-hydration/author.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const ampImgExists = document.getElementsByClassName('amp-img')[0] !== undefined;
const imgExists = document.getElementsByTagName('img').length > 0;

Expand Down
16 changes: 0 additions & 16 deletions demo/hello-world/hello-world.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const btn = document.getElementsByTagName('button')[0];

btn.addEventListener('click', async () => {
Expand Down
16 changes: 0 additions & 16 deletions demo/long-task/long-task-demo.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/**
* Copyright 2019 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const btn = document.getElementsByTagName('button')[0];

btn.addEventListener('click', (_) => {
Expand Down
16 changes: 1 addition & 15 deletions demo/preact-dbmon/dbmon.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

samouri marked this conversation as resolved.
Show resolved Hide resolved

body {color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;margin:0;}
label {display:inline-block;font-weight:700;margin-bottom:5px;}
Expand Down
16 changes: 0 additions & 16 deletions demo/preact-dbmon/dbmon.js

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

16 changes: 1 addition & 15 deletions demo/preact-map/src/candidateMap.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

samouri marked this conversation as resolved.
Show resolved Hide resolved

.tooltip {
position: absolute;
Expand Down
64 changes: 12 additions & 52 deletions demo/preact-map/src/candidateMap.jsx
Original file line number Diff line number Diff line change
@@ -1,50 +1,23 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { h, Component } from 'preact';
import { useState } from 'preact/hooks';
import objstr from 'obj-str';

import { h, Component } from "preact";
import { useState } from "preact/hooks";
import objstr from "obj-str";

import styles from "./candidateMap.css";
import styles from './candidateMap.css';

function CandidateZone({ index, focusRegion, x, y }) {
const [fill, setFill] = useState("red");
const [fill, setFill] = useState('red');

function handleMouseEnter() {
setFill("black");
setFill('black');
focusRegion(index);
}

function handleMouseLeave() {
setFill("red");
setFill('red');
focusRegion(null);
}

return (
<rect
x={x}
y={y}
width="180"
height="180"
fill={fill}
stroke="black"
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
/>
);
return <rect x={x} y={y} width="180" height="180" fill={fill} stroke="black" onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave} />;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? This is ugly/harder to read imo

Copy link
Member Author

@samouri samouri Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the description above.
Don't take it up with me, take it up with the .prettierrc :)

Which for the record, I'm ok with changing. I have very little preference re. printWidth

}

export function CandidateMap({ focusRegion, regionData, totalData }) {
Expand All @@ -62,29 +35,16 @@ export function CandidateMap({ focusRegion, regionData, totalData }) {
focusRegion(region);
}

const focusedRegionData =
focusedRegion !== null && regionData[focusedRegion].candidates;
const winner =
focusedRegionData &&
totalData[focusedRegionData.indexOf(Math.max(...focusedRegionData))];
const focusedRegionData = focusedRegion !== null && regionData[focusedRegion].candidates;
samouri marked this conversation as resolved.
Show resolved Hide resolved
const winner = focusedRegionData && totalData[focusedRegionData.indexOf(Math.max(...focusedRegionData))];

return (
<div className={styles.wrapper}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="360"
height="360"
onMouseLeave={handleMouseLeave}
>
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="360" onMouseLeave={handleMouseLeave}>
<CandidateZone x={0} y={0} index={0} focusRegion={localFocusRegion} />
<CandidateZone x={180} y={0} index={1} focusRegion={localFocusRegion} />
<CandidateZone x={0} y={180} index={2} focusRegion={localFocusRegion} />
<CandidateZone
x={180}
y={180}
index={3}
focusRegion={localFocusRegion}
/>
<CandidateZone x={180} y={180} index={3} focusRegion={localFocusRegion} />
</svg>
<p
className={objstr({
Expand Down
16 changes: 1 addition & 15 deletions demo/preact-map/src/candidateTable.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
/**
* Copyright 2018 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS-IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

samouri marked this conversation as resolved.
Show resolved Hide resolved

.victor {
padding-right: 6px;
Expand Down
Loading