Skip to content

Commit

Permalink
feat: create Extensions.tsx file in apps/website (#4336)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j authored Oct 17, 2024
1 parent 391a782 commit a542f4d
Show file tree
Hide file tree
Showing 18 changed files with 176 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/website/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from "react";
import { Website } from "@webiny/app-website";
import "./App.scss";
import { Extensions } from "./Extensions";

export const App = () => {
return <Website />;
return (
<Website>
<Extensions />
</Website>
);
};
6 changes: 6 additions & 0 deletions apps/website/src/Extensions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file is automatically updated via scaffolding utilities.
import React from "react";

export const Extensions = () => {
return <></>;
};
1 change: 1 addition & 0 deletions packages/cli-plugin-extensions/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@webiny/project-utils").createBabelConfigForNode({ path: __dirname });
9 changes: 9 additions & 0 deletions packages/cli-plugin-extensions/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const defaultConfig = require("../../.eslintrc");

module.exports = {
...defaultConfig,
rules: {
...defaultConfig.rules,
"import/dynamic-import-chunkname": 0
}
};
21 changes: 21 additions & 0 deletions packages/cli-plugin-extensions/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Webiny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions packages/cli-plugin-extensions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# @webiny/cli-plugin-extensions
[![](https://img.shields.io/npm/dw/@webiny/cli-plugin-extensions.svg)](https://www.npmjs.com/package/@webiny/cli-plugin-extensions)
[![](https://img.shields.io/npm/v/@webiny/cli-plugin-extensions.svg)](https://www.npmjs.com/package/@webiny/cli-plugin-extensions)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

## Install
```
npm install --save @webiny/cli-plugin-extensions
```

Or if you prefer yarn:
```
yarn add @webiny/cli-plugin-extensions
```
47 changes: 47 additions & 0 deletions packages/cli-plugin-extensions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "@webiny/cli-plugin-extensions",
"version": "0.0.0",
"description": "Scaffolds essential files for creating a new plugin.",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/webiny/webiny-js.git",
"directory": "packages/cli-plugin-extensions"
},
"author": {
"name": "Webiny",
"url": "https://www.webiny.com"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/webiny/webiny-js/issues"
},
"homepage": "https://github.com/webiny/webiny-js#readme",
"devDependencies": {
"@babel/cli": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@types/inquirer": "8.2.10",
"@types/ncp": "^2.0.4",
"@types/pluralize": "^0.0.29",
"@types/validate-npm-package-name": "^3.0.3",
"@webiny/cli": "0.0.0",
"@webiny/project-utils": "0.0.0",
"rimraf": "^5.0.5",
"typescript": "4.9.5"
},
"scripts": {
"build": "yarn webiny run build",
"watch": "yarn webiny run watch"
},
"publishConfig": {
"access": "public",
"directory": "dist"
},
"adio": {
"ignoreDirs": [
"template"
]
}
}
1 change: 1 addition & 0 deletions packages/cli-plugin-extensions/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default () => [];
15 changes: 15 additions & 0 deletions packages/cli-plugin-extensions/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "../../tsconfig.build.json",
"include": ["src"],
"references": [],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"declarationDir": "./dist",
"paths": {
"~/*": ["./src/*"],
"~tests/*": ["./__tests__/*"]
},
"baseUrl": "."
}
}
12 changes: 12 additions & 0 deletions packages/cli-plugin-extensions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "__tests__"],
"references": [],
"compilerOptions": {
"rootDirs": ["./src", "./__tests__"],
"outDir": "./dist",
"declarationDir": "./dist",
"paths": {},
"baseUrl": "."
}
}
8 changes: 8 additions & 0 deletions packages/cli-plugin-extensions/webiny.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { createWatchPackage, createBuildPackage } = require("@webiny/project-utils");

module.exports = {
commands: {
build: createBuildPackage({ cwd: __dirname }),
watch: createWatchPackage({ cwd: __dirname })
}
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from "react";
import { Website } from "@webiny/app-website";
import "./App.scss";
import { Extensions } from "./Extensions";

export const App = () => {
return <Website />;
return (
<Website>
<Extensions />
</Website>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// This file is automatically updated via scaffolding utilities.
import React from "react";

export const Extensions = () => {
return <></>;
};
2 changes: 2 additions & 0 deletions packages/cwp-template-aws/template/common/webiny.project.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import cliWorkspaces from "@webiny/cli-plugin-workspaces";
import cliPulumiDeploy from "@webiny/cli-plugin-deploy-pulumi";
import cliAwsTemplate from "@webiny/cwp-template-aws/cli";
import cliExtensions from "@webiny/cli-plugin-extensions";

// Scaffolds.
import cliScaffold from "@webiny/cli-plugin-scaffold";
Expand All @@ -18,6 +19,7 @@ export default {
cliWorkspaces(),
cliPulumiDeploy(),
cliAwsTemplate(),
cliExtensions(),

// Scaffolds.
cliScaffold(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dependencies": {
"@webiny/aws-layers": "latest",
"@webiny/cli": "latest",
"@webiny/cli-plugin-extensions": "latest",
"@webiny/cli-plugin-scaffold": "latest",
"@webiny/cli-plugin-scaffold-admin-app-module": "latest",
"@webiny/cli-plugin-scaffold-graphql-service": "latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dependencies": {
"@webiny/aws-layers": "latest",
"@webiny/cli": "latest",
"@webiny/cli-plugin-extensions": "latest",
"@webiny/cli-plugin-scaffold": "latest",
"@webiny/cli-plugin-scaffold-admin-app-module": "latest",
"@webiny/cli-plugin-scaffold-graphql-service": "latest",
Expand Down
1 change: 1 addition & 0 deletions packages/cwp-template-aws/template/ddb/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dependencies": {
"@webiny/aws-layers": "latest",
"@webiny/cli": "latest",
"@webiny/cli-plugin-extensions": "latest",
"@webiny/cli-plugin-scaffold": "latest",
"@webiny/cli-plugin-scaffold-admin-app-module": "latest",
"@webiny/cli-plugin-scaffold-graphql-service": "latest",
Expand Down
18 changes: 18 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16880,6 +16880,24 @@ __metadata:
languageName: unknown
linkType: soft

"@webiny/cli-plugin-extensions@workspace:packages/cli-plugin-extensions":
version: 0.0.0-use.local
resolution: "@webiny/cli-plugin-extensions@workspace:packages/cli-plugin-extensions"
dependencies:
"@babel/cli": ^7.23.9
"@babel/core": ^7.24.0
"@babel/preset-env": ^7.24.0
"@types/inquirer": 8.2.10
"@types/ncp": ^2.0.4
"@types/pluralize": ^0.0.29
"@types/validate-npm-package-name": ^3.0.3
"@webiny/cli": 0.0.0
"@webiny/project-utils": 0.0.0
rimraf: ^5.0.5
typescript: 4.9.5
languageName: unknown
linkType: soft

"@webiny/cli-plugin-scaffold-admin-app-module@workspace:packages/cli-plugin-scaffold-admin-app-module":
version: 0.0.0-use.local
resolution: "@webiny/cli-plugin-scaffold-admin-app-module@workspace:packages/cli-plugin-scaffold-admin-app-module"
Expand Down

0 comments on commit a542f4d

Please sign in to comment.