Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
feat: creating new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arantespp committed Aug 17, 2020
1 parent 3bfb81c commit 3691167
Show file tree
Hide file tree
Showing 45 changed files with 1,312 additions and 1,105 deletions.
3 changes: 2 additions & 1 deletion config/tsconfig.react.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "react"
"jsx": "react",
"incremental": false
}
}
3 changes: 2 additions & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const getConfig = () => {
};

yargs
.help()
.scriptName('pepe')
.env('PEPE')
.pkgConf('pepe')
Expand Down Expand Up @@ -79,6 +80,6 @@ yargs
})
.command(deployCommand)
.command(monorepoCommand)
.help();
.strict();

export default yargs;
13 changes: 6 additions & 7 deletions packages/cli/src/deploy/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const deployCommand: CommandModule<
templatePath: string;
}
> = {
command: 'deploy',
describe: 'Deploy cloud resources',
command: 'deploy [specific]',
describe: 'Deploy cloud resources.',
builder: (yargs) => {
yargs
.options({
Expand All @@ -47,13 +47,12 @@ export const deployCommand: CommandModule<
description: 'Destroy the deployment.',
type: 'boolean',
},
lambdaExternals: {
alias: ['lambda-externals'],
'lambda-externals': {
default: [],
describe: 'Lambda external packages.',
type: 'array',
},
lambdaInput: {
'lambda-input': {
default: 'src/lambda.ts',
describe: 'Lambda input file.',
type: 'string',
Expand All @@ -70,11 +69,11 @@ export const deployCommand: CommandModule<
describe: 'AWS region',
type: 'string',
},
stackName: {
'stack-name': {
describe: 'CloudFormation Stack name.',
type: 'string',
},
templatePath: {
'template-path': {
alias: 't',
default: 'src/cloudformation.yml',
type: 'string',
Expand Down
15 changes: 12 additions & 3 deletions packages/cli/src/deploy/staticApp/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ export const deployStaticAppCommand: CommandModule = {
.options({
'acm-arn': {
conflicts: 'acmArnExportedName',
group: 'aaa',
describe:
'The ARN of the certificate that will be associated to CloudFront.',
type: 'string',
},
'acm-arn-exported-name': {
conflicts: 'acmArn',
group: 'aaa',
describe:
'The exported name of the ARN value of the ACM if it was created via CloudFormation.',
type: 'string',
},
aliases: {
describe: 'CloudFront aliases.',
describe:
'The aliases that will be associated with the CloudFront. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html',
type: 'array',
},
'build-folder': {
Expand All @@ -31,16 +34,22 @@ export const deployStaticAppCommand: CommandModule = {
},
cloudfront: {
default: false,
describe:
'A CloudFront resource is created along with S3 if this option is `true`. The CloudFront is configured to be used with a single page application (SPA) because it index only the `index.html` file.',
require: false,
type: 'boolean',
},
edge: {
default: false,
describe:
'This option enables Lambda@Edge. This is used with apps that is built with Nextjs or Gatsby.',
require: false,
type: 'boolean',
},
'hosted-zone-name': {
required: false,
describe:
'Is the name of a Route 53 hosted zone. It `true`, Pepe creates the subdomains defined on `--aliases` option.',
type: 'string',
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/deploy/staticApp/staticApp.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const getCloudFrontEdgeLambdas = () => {
},
],
},
Path: '/custom-iam/project-role/',
Path: '/pepe/',
Policies: [
{
PolicyName: 'LambdaEdgeIAMRolePolicyName',
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/monorepo/templates/tsconfig.react.json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export const content = `
"compilerOptions": {
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "react"
"jsx": "react",
"noEmit": true,
"incremental": false
}
}
`;
4 changes: 3 additions & 1 deletion packages/website/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('../../config/eslintrc.react');
module.exports = {
extends: '../../config/eslintrc.react',
};
32 changes: 21 additions & 11 deletions packages/website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
# Dependencies
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# Production
/build
# testing
/coverage

# Generated files
.docusaurus
.cache-loader
# next.js
/.next/
/out/

# production
/build

# Misc
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
30 changes: 0 additions & 30 deletions packages/website/CHANGELOG.md

This file was deleted.

37 changes: 17 additions & 20 deletions packages/website/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# Website
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
## Getting Started

### Installation
First, run the development server:

```
$ yarn
```bash
npm run dev
# or
yarn dev
```

### Local Development
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

```
$ yarn start
```
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
## Learn More

### Build
To learn more about Next.js, take a look at the following resources:

```
$ yarn build
```
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

This command generates static content into the `build` directory and can be served using any static contents hosting service.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

### Deployment
## Deploy on Vercel

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/import?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
15 changes: 15 additions & 0 deletions packages/website/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import cli from 'pepe-cli/dist/cli';

export const commands = [
'monorepo',
'deploy',
'deploy pepe-base',
'deploy static-app',
];

export const getHelpText = async (cmd: string): Promise<string> =>
new Promise((resolve) => {
cli.parse(cmd, { help: true }, (_, __, output) => {
resolve(output);
});
});
3 changes: 0 additions & 3 deletions packages/website/babel.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/website/blog/2019-05-28-hola.md

This file was deleted.

17 changes: 0 additions & 17 deletions packages/website/blog/2019-05-29-hello-world.md

This file was deleted.

13 changes: 0 additions & 13 deletions packages/website/blog/2019-05-30-welcome.md

This file was deleted.

49 changes: 49 additions & 0 deletions packages/website/components/CodeBlock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* eslint-disable react/no-array-index-key */
import React from 'react';

import Highlight, { defaultProps } from 'prism-react-renderer';
import dracula from 'prism-react-renderer/themes/dracula';

const CodeBlock = ({ children, className = 'sh' }: any) => {
const language = (className || 'sh').replace(/language-/, '');

return (
<Highlight
{...defaultProps}
theme={dracula}
code={children.trim()}
language={language}
>
{({
className: highlightClassName,
style,
tokens,
getLineProps,
getTokenProps,
}) => (
<pre
className={highlightClassName}
style={{
...style,
padding: '20px',
overflow: 'auto',
}}
>
{tokens.map((line, i) => (
<div
key={i}
{...getLineProps({ line, key: i })}
style={{ paddingTop: '5px' }}
>
{line.map((token, key) => (
<span key={key} {...getTokenProps({ token, key })} />
))}
</div>
))}
</pre>
)}
</Highlight>
);
};

export default CodeBlock;
Loading

0 comments on commit 3691167

Please sign in to comment.