Skip to content

Commit

Permalink
feat: refactor start scripts (refinedev#5613)
Browse files Browse the repository at this point in the history
* feat: replace start command with dev for docs & packages

* feat: replace start command with dev for examples
  • Loading branch information
BatuhanW authored Feb 8, 2024
1 parent 0cc7038 commit 05a9642
Show file tree
Hide file tree
Showing 391 changed files with 1,700 additions and 1,665 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const getProjectInfo = async (path) => {
const devDependencies = Object.keys(packageJson.devDependencies || {});

let port = 3000;
let command = `npm run start`;
let command = `npm run dev`;
let additionalParams = "";

// check for vite
Expand Down
6 changes: 3 additions & 3 deletions documentation/docs/guides-concepts/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Since Refine's repository uses the hoist option of Lerna, you need to use the sa
Now that we've bootstrapped and built the packages and examples we want to work on, we can start them in watch mode. This way, the packages and examples we've started will re-compile when we make a change in any of them.

```sh title="Terminal"
npm run start -- --scope @refinedev/antd --scope base-antd
npm run dev -- --scope @refinedev/antd --scope base-antd
```

After running this command, you should see the packages and examples you've started in watch mode. You can now make changes in any of them and see the results in the browser.
Expand All @@ -128,7 +128,7 @@ Notice that we're not using `--includeDependencies` flag in this command. This i

### Running Tests

Just like the `start` command, we can use the `test` command to run tests for the packages and examples we're working on.
Just like the `dev` command, we can use the `test` command to run tests for the packages and examples we're working on.

```sh title="Terminal"
npm run test -- --scope @refinedev/antd
Expand All @@ -155,7 +155,7 @@ npm run dev:docs

- You can also use `npm run dev:blog` to start the blog section of the documentation.

- `dev:docs` and `dev:blog` scripts start a portion of the documentation and skips the unnecessary parts to speed up the development process such as type and props table generation, checklist generation, etc. If you want to start the documentation with all the features, you can use `npm run start` command.
- `dev:docs` and `dev:blog` scripts start a portion of the documentation and skips the unnecessary parts to speed up the development process such as type and props table generation, checklist generation, etc. If you want to start the documentation with all the features, you can use `npm run dev` command.

- To create a production build of the documentation, you can use `npm run build` command. Then, you can use `npm run serve` command to serve the production build in your local machine.

Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/packages/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ values={[
"scripts": {
- "dev": "react-scripts start",
- "build": "react-scripts build",
+ "dev": "refine start",
+ "dev": "refine dev",
+ "build": "refine build",
}
}
Expand Down
4 changes: 2 additions & 2 deletions documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"dev:lean": "DISABLE_DOCGEN=true DISABLE_VERSIONING=true DISABLE_EXAMPLES=true DISABLE_CHECKLISTS=true npm run start",
"dev": "docusaurus start",
"dev:lean": "DISABLE_DOCGEN=true DISABLE_VERSIONING=true DISABLE_EXAMPLES=true DISABLE_CHECKLISTS=true npm run dev",
"dev:docs": "DISABLE_BLOG=true npm run dev:lean",
"dev:blog": "DISABLE_DOCS=true LIVE_PREVIEW_URL=https://next.live-previews.refine.dev/preview npm run dev:lean",
"build": "NODE_OPTIONS=\"--max-old-space-size=8192\" docusaurus build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ values={[
"scripts": {
- "dev": "react-scripts start",
- "build": "react-scripts build",
+ "dev": "refine start",
+ "dev": "refine dev",
+ "build": "refine build",
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/access-control-casbin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/access-control-casbin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "3.25.0",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine"
Expand Down
2 changes: 1 addition & 1 deletion examples/access-control-cerbos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/access-control-cerbos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"vite": "^4.3.1"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine"
Expand Down
2 changes: 1 addition & 1 deletion examples/access-control-permify/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/access-control-permify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"vite": "^4.3.1"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine"
Expand Down
44 changes: 15 additions & 29 deletions examples/app-crm-minimal/README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<div align="center" style="margin: 30px;">
<img src="https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/CRM-Minimal/minimal-crm-cover.png" alt="Refine Logo" />
<br />
Expand All @@ -7,8 +6,8 @@
<div align="center">
<a href="https://refine.dev">Home Page</a> |
<a href="https://discord.gg/refine">Discord</a> |
<a href="https://refine.dev/examples/">Examples</a> |
<a href="https://refine.dev/blog/">Blog</a> |
<a href="https://refine.dev/examples/">Examples</a> |
<a href="https://refine.dev/blog/">Blog</a> |
<a href="https://refine.dev/docs/">Documentation</a>
</div>
</div>
Expand All @@ -22,8 +21,6 @@
[![Discord](https://img.shields.io/discord/837692625737613362.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/refine)
[![Twitter Follow](https://img.shields.io/twitter/follow/refine_dev?style=social)](https://twitter.com/refine_dev)



</div>

## About
Expand All @@ -34,21 +31,18 @@ The source code for the video tutorial of an enterprise-grade and production-rea

Refine is an open-source React-meta framework specifically designed to meet the requirements of enterprise companies dev teams. It comes with a core package that simplifies app requirements like data handling, authentication, access control, etc.

The repository also open-source; feel free to use or inspect it to discover how Refine works.
The repository also open-source; feel free to use or inspect it to discover how Refine works.

Being production-ready, you can either build your own **B2B applications**, **internal tools**, **admin panels**, **dashboards** and all type of **CRUD** applications. using it as a code base or directly implement it as is.


👉 You can find a more comprehensive CRM example [here](https://example.crm.refine.dev/).

## Tutorial

## Tutorial

This repository contains the code corresponding to an in-depth tutorial available on <a href="https://www.youtube.com/@javascriptmastery/videos" target="_blank"><b>JavaScript Mastery</b></a> YouTube channel.
This repository contains the code corresponding to an in-depth tutorial available on <a href="https://www.youtube.com/@javascriptmastery/videos" target="_blank"><b>JavaScript Mastery</b></a> YouTube channel.

<a href="https://youtu.be/6a3Dz8gwjdg" target="_blank"><img src="https://github.com/sujatagunale/EasyRead/assets/151519281/1736fca5-a031-4854-8c09-bc110e3bc16d" /></a>


## Tech Stack

- Refine
Expand All @@ -60,32 +54,26 @@ This repository contains the code corresponding to an in-depth tutorial availabl

## Features

**Authentication**: Seamless onboarding with secure login and signup functionalities; robust password recovery ensures a smooth authentication experience.

**Authentication**: Seamless onboarding with secure login and signup functionalities; robust password recovery ensures a smooth authentication experience.

**Authorization**: Granular access control regulates user actions, maintaining data security and user permissions.

**Home Page**: Dynamic home page showcases interactive charts for key metrics; real-time updates on activities, upcoming events, and a deals chart for business insights.
**Authorization**: Granular access control regulates user actions, maintaining data security and user permissions.

**Companies Page**: Complete CRUD for company management and sales processes; detailed profiles with add/edit functions, associated contacts/leads, pagination, and field-specific search.
**Home Page**: Dynamic home page showcases interactive charts for key metrics; real-time updates on activities, upcoming events, and a deals chart for business insights.

**Kanban Board**: Collaborative board with real-time task updates; customization options include due dates, markdown descriptions, and multi-assignees, dynamically shifting tasks across dashboards.
**Companies Page**: Complete CRUD for company management and sales processes; detailed profiles with add/edit functions, associated contacts/leads, pagination, and field-specific search.

**Account Settings**: Personalized user account settings for profile management; streamlined configuration options for a tailored application experience.

**Responsive**: Full responsiveness across devices for consistent user experience; fluid design adapts seamlessly to various screen sizes, ensuring accessibility.
**Kanban Board**: Collaborative board with real-time task updates; customization options include due dates, markdown descriptions, and multi-assignees, dynamically shifting tasks across dashboards.

**Account Settings**: Personalized user account settings for profile management; streamlined configuration options for a tailored application experience.

**Responsive**: Full responsiveness across devices for consistent user experience; fluid design adapts seamlessly to various screen sizes, ensuring accessibility.

<br>

![Product Edit Page](https://refine.ams3.cdn.digitaloceanspaces.com/example-readmes/CRM-Minimal/crm-demo.gif "Demo GIF")

<br>




## Try this example on your local

```bash
Expand All @@ -97,12 +85,11 @@ This will download the files and install the necessary dependencies automaticall
Once it's done, go to the directory and run the following command to start the project:

```bash
npm run start
npm run dev
```

Open http://localhost:5173 in your browser to view the project.


## Code Snippets

<details>
Expand Down Expand Up @@ -1571,7 +1558,6 @@ export const ContactStatusTag = ({ status }: Props) => {

</details>


<details>
<summary><code>components/text-icon.tsx</code></summary>

Expand Down Expand Up @@ -1738,7 +1724,7 @@ const TasksCreatePage = () => {
</Form>
</Modal>
);
}
};

export default TasksCreatePage;
```
Expand Down Expand Up @@ -2011,4 +1997,4 @@ export const UserTag = ({ user }: Props) => {

## Links

Other components (Kanban Edit Forms, Skeletons and utilities) used in the project can be found [here](https://drive.google.com/drive/folders/1oDFoI-a8qSJqHde6doUtM9NCHlYpWdNW?usp=sharing)
Other components (Kanban Edit Forms, Skeletons and utilities) used in the project can be found [here](https://drive.google.com/drive/folders/1oDFoI-a8qSJqHde6doUtM9NCHlYpWdNW?usp=sharing)
2 changes: 1 addition & 1 deletion examples/app-crm-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && cross-env NODE_OPTIONS=--max_old_space_size=4096 refine build",
"preview": "refine start",
"start:prod": "refine start",
Expand Down
2 changes: 1 addition & 1 deletion examples/app-crm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && cross-env NODE_OPTIONS=--max_old_space_size=4096 refine build",
"test": "jest --passWithNoTests --runInBand",
"preview": "refine start",
Expand Down
2 changes: 1 addition & 1 deletion examples/audit-log-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "audit-log-provider",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine"
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-antd/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-antd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cypress": "^13.6.3"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-auth0/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-auth0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"cypress": "^13.6.3"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-chakra-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "auth-chakra-ui",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-google-login/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-google-login/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cypress": "^13.6.3"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-google-login/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-headless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "auth-headless",
"private": true,
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-keycloak/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-keycloak/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"cypress": "^13.6.3"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine",
Expand Down
2 changes: 1 addition & 1 deletion examples/auth-keycloak/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-kinde/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To begin the development, run `npm run dev` or `yarn dev`.
To create a production bundle, use `npm run build` or `yarn build`.
--></body>
</html>
2 changes: 1 addition & 1 deletion examples/auth-kinde/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"vite": "^4.3.1"
},
"scripts": {
"start": "refine dev",
"dev": "refine dev",
"build": "tsc && refine build",
"preview": "refine start",
"refine": "refine"
Expand Down
Loading

0 comments on commit 05a9642

Please sign in to comment.