Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Dev instructions #5263

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ You must have a local copy of this repository somewhere on your machine. From th

Once that is done, you will run:

**Unix/MacOS:**

```shell
~/primereact/ $ npm run dev:link
```

**Windows:**
dev:link:windows

```shell
~/primereact/ $ npm run build:lib:dev
C:\primereact> npm run dev:link:windows
```

This will alter the bundler to only emit non-minified esm modules. The aliasing plugin has also been disabled for components. Once everything has been bundled (this can take a few minutes) you should keep this command running. It will allow for incremental builds as you develop in the `primereact/` directory. It will be finished when the terminal displays: `[20xx-xx-xx 00:00:00] waiting for changes...`.
This will alter the bundler to only emit non-minified esm modules. The aliasing plugin has also been disabled for components. Once everything has been bundled (this can take a few minutes) you should keep this command running. It will allow for incremental builds as you develop in the `primereact/` directory.

> **Note**
> It will be finished when the terminal displays: `[20xx-xx-xx 00:00:00] waiting for changes...`.

You will now `cd` into the `primereact/dist` directory and run:

Expand All @@ -29,7 +41,8 @@ This will create a symlink in your global npm scope so that other local packages
└── [email protected] -> ./../../../Users/${user}/primereact/dist # <-- this must be in the dist/ dir !!!
```

**Reminder! the XX.X.XX version must be a valid [valid semantic version](https://docs.npmjs.com/about-semantic-versioning) that you are using in your local project**
> **Warning**
> Reminder! the XX.X.XX version must be a valid [valid semantic version](https://docs.npmjs.com/about-semantic-versioning) that you are using in your local project

### Now change your directory to your local project you are developing on!

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"build": "next build",
"build:lib": "NODE_ENV=production INPUT_DIR=components/lib/ OUTPUT_DIR=dist/ npm run build:package",
"build:package": "npm run build:check && rollup -c && gulp build-resources && npm run build:api",
"build:lib:dev": "NPM_LINK=true NODE_ENV=production INPUT_DIR=components/lib/ OUTPUT_DIR=dist/ npm run build:package:dev",
"dev:link": "NPM_LINK=true NODE_ENV=production INPUT_DIR=components/lib/ OUTPUT_DIR=dist/ npm run build:package:dev",
"dev:link:windows": "set NPM_LINK=true && set NODE_ENV=production&& set INPUT_DIR=components/lib/&& set OUTPUT_DIR=dist/&& npm run build:package:dev",
"build:package:dev": "npm run build:check && rollup -c --watch && gulp build-resources && npm run build:api",
"build:api": "npm run apiwebtypes && npm run apidoc",
"build:check": "npm run lint && npm run format:check && npm run type:check && npm run security:check && (NODE_ENV=test npm run test:check)",
Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ function addEntry(name, input, output, isComponent = true) {
};

entries.push(get_CJS_ESM());

if (!NPM_LINK) {
entries.push(get_IIFE());

Expand Down
Loading