You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+9-10
Original file line number
Diff line number
Diff line change
@@ -51,24 +51,23 @@ If you see any issue with any page on the API Reference, you can fix that by upd
51
51
52
52
#### How to add a new package
53
53
54
-
- In `/packages`, create a new folder with your desired new package name.
54
+
- In `/packages`, create a new folder with your desired new package name.
55
55
- Each package will have it’s own `package.json` and `tsconfig.json`. These can be copied from other packages to maintain the correct configuration. Set the version of your new package at `1.0.0`.
56
56
- Create a folder in your new package called `src` in which your code will be defined. Create an `index.ts` file with a simple `console.log("hello world")` to serve as the entry point of your package.
57
57
- After creating your package, go to the root `package.json`, under the property `workspaces`, add the path to your new package.
58
58
- Run `npm install` to update the dependencies of your project and then run `npm build:esm` to build your project.
59
59
- Check in the root `/node_modules/@esri` and `/packages/{YOUR PACKAGE}/dist` that your new package and it has been built properly.
60
-
- Go into `/demos`, create a new folder and title what you want to call your demo. You can also copy one of the existing demos depending on what kind of demo you are building. Generally [the `node-typescript-es-modules`](./demos/node-typescript-es-modules) demo is a good places to start.
61
-
- Add a `package.json` in your new demo folder. Add your package as a dependency and be sure to have at least these properties in your `package.json`, `dependencies`, `name`, `version`, `description`, `license`, `type`, `main`, `scripts`, and `author`. Ensure that the `private` flag is set to `true`.
62
-
- Add a `.gitignore` in the root level of your demo folder that ignore `node_modules`. Be sure to ignore an `.env` file as well if your demo is using any personal keys or tokens with [dot-env](https://github.com/motdotla/dotenv)
63
-
- Run `npm install` within the `./demos` directory and make sure your demo folder has it's own local node_modules.
64
-
- In your demo import your package.
65
-
- To run your demo be sure to have script that has a property `start` in your demo directory and your script is pointing to the correct entry point.
66
-
- Run `npm run start` while being in your `/demos/custom-demo` directory.
67
-
- Add a readme describing your demo.
60
+
- Clone the [samples repository](https://github.com/Esri/arcgis-rest-js-samples) and create a new folder and title what you want to call your demo. You can also copy one of the existing samples depending on what kind of demo you are building. Generally [the `node-typescript-es-modules`](https://github.com/Esri/arcgis-rest-js-samples/tree/main/samples/node-typescript-es-modules) sample is a good places to start.
61
+
- Add a `package.json` in your new sample folder. Add your package as a dependency and be sure to have at least these properties in your `package.json`, `dependencies`, `name`, `version`, `description`, `license`, `type`, `main`, `scripts`, and `author`. Ensure that the `private` flag is set to `true`.
62
+
- Add a `.gitignore` in the root level of your sample folder that ignore `node_modules`. Be sure to ignore an `.env` file as well if your demo is using any personal keys or tokens with [dot-env](https://github.com/motdotla/dotenv)
63
+
- In your sample import your package, following the instructions on how to point to your local version of ArcGIS REST JS.
64
+
- To run your sample be sure to have script that has a property `start` in your sample directory and your script is pointing to the correct entry point.
65
+
- Run `npm run start` in your sample directory.
66
+
- Add a readme describing your sample.
68
67
69
68
### Watching local source for changes
70
69
71
-
you can run the command below in the root of the repo to automatically recompile a package when the raw TypeScript source changes. You can use this in conjunction with [the demos](./demos/).
70
+
You can run the command below in the root of the repo to automatically recompile a package when the raw TypeScript source changes. You can use this in conjunction with [the samples](https://github.com/Esri/arcgis-rest-js-samples?tab=readme-ov-file#local-arcgis-rest-js).
72
71
73
72
```
74
73
# watch 'request' and rebuild a UMD for the browser
Copy file name to clipboardExpand all lines: README.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,9 @@ You can install dependencies by cloning the repository and running:
60
60
npm install && npm run build
61
61
```
62
62
63
-
This will install all dependencies and do an initial build. Afterward, you can run any of the [demo apps](./demos/) by `cd`'ing by following the README for the specific demo. For a list of all available commands run `npm run`.
63
+
This will install all dependencies and do an initial build. Afterward, you can run any of the [samples](https://github.com/Esri/arcgis-rest-js-samples). See that repository's readme for instructions on how to run the samples while using a local version of ArcGIS REST JS.
64
+
65
+
NPM run commands include:
64
66
65
67
For all packages:
66
68
@@ -79,6 +81,8 @@ For a specific package:
79
81
-`npm run build:bundled -w @esri/arcgis-rest-request` - run the rollup build in a specific workspace
80
82
-`npm run dev:bundled -w @esri/arcgis-rest-request` - run the rollup dev command in a specific workspace
81
83
84
+
For a list of all available commands run `npm run`.
85
+
82
86
### Packages
83
87
84
88
-[`@esri/arcgis-rest-request`](./packages/arcgis-rest-request/) - Core module implementing basic request code, shared TypeScript types and common utilities.
0 commit comments