Skip to content

Commit

Permalink
✨ [bento][npm] Support react modules in NPM Bento components (#34528)
Browse files Browse the repository at this point in the history
* Updates for react npm

* Ignore eslint rule
  • Loading branch information
krdwan authored May 25, 2021
1 parent 0e0fe33 commit f568baf
Show file tree
Hide file tree
Showing 26 changed files with 348 additions and 101 deletions.
24 changes: 12 additions & 12 deletions extensions/amp-accordion/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Accordion Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
}
".": "./preact",
"./preact": {
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-accordion/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-base-carousel/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Base Carousel Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-base-carousel/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-date-countdown/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Date Countdown Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-date-countdown/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-date-display/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Date Display Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-date-display/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-fit-text/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Fit Text Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-fit-text/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-inline-gallery/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Inline Gallery Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-inline-gallery/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-instagram/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Instagram Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-instagram/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
14 changes: 7 additions & 7 deletions extensions/amp-lightbox/1.0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
"description": "AMP Lightbox Component",
"author": "The AMP HTML Authors",
"license": "Apache-2.0",
"main": "dist/component.js",
"module": "dist/component.mjs",
"main": "./dist/component.js",
"module": "./dist/component-preact.module.js",
"exports": {
".": "./preact",
"./preact": {
"import": "dist/component-preact.mjs",
"require": "dist/component-preact.js"
"import": "./dist/component-preact.module.js",
"require": "./dist/component-preact.js"
},
"./react": {
"import": "dist/component-react.mjs",
"require": "dist/component-react.js"
"import": "./dist/component-react.module.js",
"require": "./dist/component-react.js"
}
},
"files": ["dist/*"],
"files": ["dist/*", "react.js"],
"repository": {
"type": "git",
"url": "https://github.com/ampproject/amphtml.git",
Expand Down
19 changes: 19 additions & 0 deletions extensions/amp-lightbox/1.0/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2021 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.
*/

/* eslint-env node */
// eslint-disable-next-line local/no-module-exports
module.exports = require('./dist/component-react');
Loading

0 comments on commit f568baf

Please sign in to comment.