Skip to content

Commit 6161d14

Browse files
authored
docs: moved demos folder to separate repo (#1192)
* docs: moved demos folder to separate repo * chore: remove demos from package-lock
1 parent 203821d commit 6161d14

File tree

170 files changed

+15336
-77723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+15336
-77723
lines changed

.gitignore

+1-7
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ packages/*/debug/
8484
test.html
8585
test.js
8686

87-
#
88-
demos/test/*
89-
9087
# Temporary build products
9188
packages/**/src/**/*.d.ts
9289
packages/**/src/**/*.js
@@ -108,7 +105,4 @@ typedoc
108105
srihashes.json
109106

110107
# Prevent caches from ultra runner
111-
**/.ultra.cache.json
112-
113-
# Prevent package locks from npm installs in demos
114-
demos/*/package-lock.json
108+
**/.ultra.cache.json

CONTRIBUTING.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,23 @@ If you see any issue with any page on the API Reference, you can fix that by upd
5151

5252
#### How to add a new package
5353

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.
5555
- 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`.
5656
- 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.
5757
- After creating your package, go to the root `package.json`, under the property `workspaces`, add the path to your new package.
5858
- Run `npm install` to update the dependencies of your project and then run `npm build:esm` to build your project.
5959
- 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.
6867

6968
### Watching local source for changes
7069

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).
7271

7372
```
7473
# watch 'request' and rebuild a UMD for the browser

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ You can install dependencies by cloning the repository and running:
6060
npm install && npm run build
6161
```
6262

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:
6466

6567
For all packages:
6668

@@ -79,6 +81,8 @@ For a specific package:
7981
- `npm run build:bundled -w @esri/arcgis-rest-request` - run the rollup build in a specific workspace
8082
- `npm run dev:bundled -w @esri/arcgis-rest-request` - run the rollup dev command in a specific workspace
8183

84+
For a list of all available commands run `npm run`.
85+
8286
### Packages
8387

8488
- [`@esri/arcgis-rest-request`](./packages/arcgis-rest-request/) - Core module implementing basic request code, shared TypeScript types and common utilities.

demos/ago-node-cli/.gitignore

Whitespace-only changes.

demos/ago-node-cli/README.md

-30
This file was deleted.

demos/ago-node-cli/ago.js

-31
This file was deleted.

demos/ago-node-cli/index.js

-11
This file was deleted.

demos/ago-node-cli/lib/item-export-command.js

-48
This file was deleted.

demos/ago-node-cli/lib/item-search-command.js

-32
This file was deleted.

demos/ago-node-cli/package.json

-29
This file was deleted.

demos/attachments-browser/README.md

-7
This file was deleted.

0 commit comments

Comments
 (0)