Skip to content

Commit 0aa8b8d

Browse files
committed
Merge branch 'master' of https://github.com/pankod/superplate
2 parents 928b2cc + f73263c commit 0aa8b8d

File tree

8 files changed

+491
-35
lines changed

8 files changed

+491
-35
lines changed

README.MD

+120-26
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,168 @@
1-
# superplate
1+
<div align="center">
2+
<img src="images/banner.png" align="center" />
3+
</div>
4+
<br/>
5+
<div align="center">Performance oriented UI Frameworks application boilerplate creator with TypeScript using the popular front-end ecosystem tools.</div>
6+
<br/>
7+
8+
9+
<div align="center">
10+
11+
12+
13+
[![Meercode CI Score](https://meercode.io/badge/pankod/superplate?type=ci-score&branch=master&token=2ZiT8YsoJgt57JB23NYwXrFY3rJHZboT&lastDay=31)](https://meercode.io/pankod/superplate)
14+
[![Meercode CI Success Rate](https://meercode.io/badge/pankod/superplate?type=ci-success-rate&branch=master&token=2ZiT8YsoJgt57JB23NYwXrFY3rJHZboT&lastDay=31)](https://meercode.io/pankod/superplate)
15+
[![dependencies Status](https://david-dm.org/pankod/superplate/status.svg)](https://david-dm.org/pankod/superplate)
16+
[![dev-dependencies Status](https://david-dm.org/pankod/superplate/dev-status.svg)](https://david-dm.org/pankod/superplate?type=dev)
17+
18+
![npm](https://img.shields.io/npm/dw/@pankod/superplate)
19+
20+
</div>
21+
22+
23+
<br/>
24+
<div align="center">
25+
<sub>Created by <a href="https://www.pankod.com">Pankod</a></sub>
26+
</div>
27+
28+
29+
## About
30+
31+
32+
superplate has been developed to create rock solid UI frameworks apps boilerplate with no build configurations in seconds.
33+
34+
You can add usefull, highly-demands front-end development tools and libraries as a plugin by using superplate CLI during the project creation phase.
35+
36+
37+
To learn on how superplate and its plugins work, you can check out our documentation.
38+
39+
40+
41+
For now, superplate only creates project starter boilerplates for Next.js apps as a default UI Framework option. Other frameworks integration will be added soon.
42+
43+
## Available Integrations
44+
45+
46+
<img src="images/available.png" align="center" />
47+
48+
49+
50+
## Coming Soon
51+
<img src="images/integrations.png" align="center" />
52+
253

3-
**superplate** is a CLI to save you hours of development time when starting a [Next.js](https://nextjs.org/) project.
454

555
## Quick Start
56+
To create a new app run the command:
57+
658

759
```bash
860
npx superplate <my-project>
961
```
62+
Make sure you have npx installed (npx is shipped by default since npm 5.2.0)
63+
64+
You will be prompted with plugin options to create your project without spending hours on configurations. To find out more about all the plugins see the [superplate-core-plugins](https://github.com/pankod/superplate-core-plugins).
65+
66+
1067

11-
Just run the command above and you will be prompted with options to create your project without spending hours on configurations.
1268

1369
<p align='center'>
1470
<img src='https://user-images.githubusercontent.com/11361964/106468355-dd9be280-64ae-11eb-82da-c313beb16d6b.gif' width='500' alt='superplate example'>
1571
</p>
1672

73+
74+
Once all questions are answered, it will install all plugins and the dependencies. Then navigate to the project folder and launch it:
75+
76+
```bash
77+
npm run dev
78+
```
79+
>Use the dev command when running application in development mode.
80+
## Philosophy
81+
82+
- It provides a easy starting to your project in seconds with using industry-standard best practices and performance oriented tools & libraries.
83+
- You can easily develop your own framework CLI and plugins according to your needs to on top of superplate codebase due to its framework/plugin agnostic nature.
84+
- Code examples are added to plugin documents to show how best practices are implementing.
85+
86+
## Next.js Integration
87+
88+
superplate makes it easier to get up and running with a well-structured Next.js and TypeScript application.
89+
90+
91+
Next.js is a minimalistic React framework that runs on the browser and the server with all the features you need for production: hybrid static & server rendering, TypeScript support, smart bundling, route pre-fetching, and more. It offers developers an easy way to get started, build server-side rendering and static web applications using React.
92+
1793
## Plugins
94+
superplate uses a plugin-based architecture. Basically, plugins are created from highly-demanded npm tools in the front-end ecosystem with configuration files.
95+
96+
The features and tools listed during the project creation process are implemented as plugins.
97+
98+
You can check them out in [superplate-core-plugins](https://github.com/pankod/superplate-core-plugins).
99+
100+
The default core plugins determined by <a href="https://www.pankod.com">Pankod</a> team uses on a day-to-day basis to build apps. Feel free to send PR or open an issue for new plugins you want to add.
18101

19-
superplate comes with a set of plugins to get you started. You can check them out in [superplate-core-plugins](https://github.com/pankod/superplate-core-plugins).
20102

21103
### Using a custom source of plugins
22104

23105
You can use different sources for plugins other than [superplate-core-plugins](https://github.com/pankod/superplate-core-plugins).
24106

25107
Simply add `--source <path-to-source>` option to use **superplate** with a custom source.
26108

27-
To Learn more about sources and how to create your own; please check out [Documentation#creating-a-source-repository](X)
109+
To learn more about sources and how to create your own; please check out [Documentation#creating-a-source-repository](X)
28110

29111
### Creating a plugin
30112

31113
**superplate** gives you many abilities to create your own plugin and interact with the others. To learn more on creating a plugin, please check out [Documentation#creating-a-plugin](X)
32114

33-
## Documentation
34115

35-
To learn on how **superplate** and its plugins work, you can check out our [documentation](X)
36116

37-
## Options
117+
## Avaliable plugins
118+
<img src="images/plugins.png" align="center" />
38119

39-
### `--source <path-to-source>`
40120

41-
Alias: `-s`. Use this option to target a custom source of plugins. Source path can be a remote git repository or a local path.
121+
## CLI options
122+
123+
```
124+
> npx superplate --help
125+
Usage: superplate [options]
126+
127+
Options:
128+
-v, --version prints version number
129+
-h, --help prints help information on all commands and options
130+
-d, --debug prints additional logs
131+
-s, --source <path-to-source> Use this option to target a custom source of plugins
132+
Source path can be a remote git repository or a local path.
133+
```
42134

43-
### `--version`
44135

45-
Alias `-v`. Prints version number.
136+
## Development mode commands
46137

47-
### `--help`
48138

49-
Alias `-h`. Prints help information on all commands and options.
139+
Watch for changes in the code; build the project and then globally install the superplate for testing.
140+
```
141+
npm run dev:global
142+
```
50143

51-
### `--debug`
144+
Create a build inside `/lib` directory.
52145

53-
Alias `-d`. Prints additional logs.
146+
```
147+
npm run build:cli
148+
```
54149

55-
## Contribution
56150

57-
If you have a bug to report, do not hesitate to file an issue.
151+
Install the current build globally
58152

59-
If you are willing to fix an issue or propose a feature; all PRs with clear explanations are welcome and encouraged.
60153

61-
## Development
154+
```
155+
npm run global
156+
```
62157

63-
### `npm run dev:global`
64158

65-
Watch for changes in the code; build the project and then globally install the superplate for testing.
66159

67-
### `npm run build:cli`
160+
## Contribution
68161

69-
Create a build inside `/lib` directory.
162+
If you have a bug to report, do not hesitate to file an issue.
70163

71-
### `npm run global`
164+
If you are willing to fix an issue or propose a feature; all PRs with clear explanations are welcome and encouraged.
72165

73-
Install the current build globally
166+
## License
74167

168+
Licensed under the MIT License, Copyright © 2021-present Pankod

documentation/docs/apollo-graphql.md

+7
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,13 @@ All this work will be handled automatically by CLI, so you don’t need to do an
157157

158158
:::
159159

160+
:::warning
161+
162+
`Apollo GraphQL` plugin currently exludes `__generated__/globalTypes.ts` at `tsconfig.json`. Typescript doesn't accept empty global files when `isolatedModules` is set to `true` which is mandatory for next.js projects. If you're going to have non empty `globalTypes.ts`, you may consider removing it from exclude.
163+
[There is currently an issue](https://github.com/apollographql/apollo-tooling/issues/2080) and [a related pr](https://github.com/apollographql/apollo-tooling/pull/2163) to not produce `globalTypes.ts` if it's empty.
164+
165+
:::
166+
160167

161168
## Adding Apollo GraphQL to your project later
162169

documentation/docs/bootstrap.md

+77-6
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,59 @@ description: How to use Bootstrap with Next.js?
77

88
Quickly design and customize responsive mobile-first sites with Bootstrap, the world’s most popular front-end open source toolkit, featuring Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful JavaScript plugins.
99

10-
:::tip
10+
### React Bootstrap
1111

12-
If you also add `sass/scss` under CSS Preprocessors during creation phase, you can easily [customize Bootstrap](https://getbootstrap.com/docs/4.6/getting-started/theming/#sass). Bootstrap’s source ***sass*** files are added under `src/styles` directory.
12+
**superplate** uses `react-bootstrap` component library for bootstrap plugin. React-Bootstrap replaces the Bootstrap JavaScript. Each component has been built from scratch as a true React component, without unneeded dependencies like jQuery.
13+
[Refer to official documentation for detailed usage. &#8594](https://react-bootstrap.github.io/getting-started/introduction)
1314

14-
:::
15+
- Some stylesheet is required to use React Bootstrap components.
16+
17+
```tsx title="pages/_app.tsx"
18+
import "bootstrap/dist/css/bootstrap.min.css";
19+
```
20+
21+
### Using Components
22+
23+
- Import from `react-bootstrap`
24+
25+
```js
26+
import { Button } from 'react-bootstrap';
27+
```
28+
29+
- Or import individual components
30+
31+
```js
32+
import Button from 'react-bootstrap/Button';
33+
```
34+
35+
- Customize components with props
36+
37+
```tsx title="src/components/main/index.tsx"
38+
<Button
39+
href="https://pankod.github.io/superplate/"
40+
target="_blank"
41+
variant="primary"
42+
size="lg">
43+
Docs
44+
</Button>
45+
```
46+
47+
- Bootstrap utility classes can also be used with components
48+
```tsx title="src/components/cards/index.tsx"
49+
<Container className="my-5 flex-grow-1">
50+
...
51+
</Container>
52+
```
1553

1654
### Using Sass with Bootstrap
17-
If `sass/scss` is selected you can start [customizing](https://getbootstrap.com/docs/4.6/getting-started/theming/#sass) in `src/styles/app.scss`
55+
:::tip
56+
57+
If you also add `sass/scss` under CSS Preprocessors during creation phase, you can easily [customize Bootstrap](https://getbootstrap.com/docs/4.6/getting-started/theming/#sass). Bootstrap’s source ***sass*** files are added under `src/styles` directory.
1858
[See Sass/SCSS doc &#8594](scss.md)
1959

20-
If it's not selected, Sass can be added later to customize Bootstrap,
60+
:::
61+
62+
If `sass/scss` plugin is not selected, Sass can be added later to customize Bootstrap,
2163

2264
- Add a custom scss file `app.scss` under `src/styles`
2365

@@ -73,4 +115,33 @@ npm install sass
73115
```
74116

75117
### Adding Bootstrap to your project later
76-
If you didn't add bootstrap during project creation phase, you can add it later following [official docs](https://getbootstrap.com/docs/4.6/getting-started/introduction/)
118+
If you didn't choose the plugin during project creation phase, you can follow the instructions below to add it.
119+
120+
- Install `react-bootstrap` and `bootstrap` packages
121+
122+
import Tabs from '@theme/Tabs';
123+
import TabItem from '@theme/TabItem';
124+
125+
<Tabs
126+
defaultValue="npm"
127+
values={[
128+
{label: 'npm', value: 'npm'},
129+
{label: 'yarn', value: 'yarn'},
130+
]}>
131+
<TabItem value="npm">
132+
133+
```bash
134+
npm install react-bootstrap bootstrap
135+
```
136+
</TabItem>
137+
<TabItem value="yarn">
138+
139+
```bash
140+
yarn add react-bootstrap bootstrap
141+
```
142+
</TabItem>
143+
</Tabs>
144+
145+
- [Follow instructions in React Bootstrap](#react-bootstrap)
146+
147+
[Refer to official documentation on installation for detailed usage. &#8594](https://react-bootstrap.github.io/getting-started/introduction#installation)

0 commit comments

Comments
 (0)