Skip to content

Commit

Permalink
Merge pull request #474 from Esri/jsapi-vite-ts
Browse files Browse the repository at this point in the history
chore(jsapi-vite-ts): add new sample
  • Loading branch information
andygup authored Jun 28, 2023
2 parents 46000a7 + 3d1feaa commit 6f6194d
Show file tree
Hide file tree
Showing 9 changed files with 1,379 additions and 0 deletions.
26 changes: 26 additions & 0 deletions esm-samples/jsapi-vite-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

packaqge-lock.json

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
25 changes: 25 additions & 0 deletions esm-samples/jsapi-vite-ts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ArcGIS Maps SDK for JavaScript with Vite and TypeScript

This repo demonstrates how to use [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) ES modules with [Vite](https://vitejs.dev/).

## Get Started

**Step 1** - Run `npm install` and then start adding modules.

**Step 2** Configure CSS.

_styles.css_

```css
@import "https://js.arcgis.com/4.27/@arcgis/core/assets/esri/themes/light/main.css";
```

For additional information, see the [Build with ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) Guide topic in the SDK.

## Commands

For a list of all available `npm` commands see the scripts in `package.json`.

## Learn More

You can learn more in the [Vite guides](https://vitejs.dev/guide/).
13 changes: 13 additions & 0 deletions esm-samples/jsapi-vite-ts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ArcGIS JS API - Vite + TS</title>
</head>
<body>
<div id="viewDiv"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 6f6194d

Please sign in to comment.