sv-arcgis 1.3.0-next.3 β 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -8
- package/bin/sv-arcgis-setup.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
## π¬ Prereqs
|
|
2
2
|
|
|
3
|
-
- SvelteKit
|
|
4
|
-
- (Or Svelte: `npm create vite@latest`)
|
|
3
|
+
- SvelteKit installed (`npx sv create [project_name]`)
|
|
5
4
|
|
|
6
5
|
## ποΈ Setup
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
1. Install [sv-arcgis](https://www.npmjs.com/package/sv-arcgis) `npm i sv-arcgis`
|
|
7
|
+
2. Run sv-arcgis `npx sv-arcgis`
|
|
8
|
+
3. β οΈ Follow instructions in terminal
|
|
10
9
|
|
|
11
10
|
## π Notes
|
|
12
11
|
|
|
@@ -16,10 +15,10 @@
|
|
|
16
15
|
|
|
17
16
|
## πΊοΈ Roadmap
|
|
18
17
|
|
|
19
|
-
- Create CI / CD (w/ tests)
|
|
20
|
-
- Create tests (see https://www.youtube.com/watch?v=Xk8yaN9_PZA)
|
|
21
18
|
- Option for / intergrate OAuth2 https://developers.arcgis.com/documentation/security-and-authentication/user-authentication/arcgis-apis/
|
|
22
|
-
-
|
|
19
|
+
- Update to use determine if Svelte Vite app? (Demo would need to be different)
|
|
20
|
+
- Create tests (see https://www.youtube.com/watch?v=Xk8yaN9_PZA)
|
|
21
|
+
- Create CI / CD (w/ tests)
|
|
23
22
|
|
|
24
23
|
## π Help
|
|
25
24
|
|
package/bin/sv-arcgis-setup.js
CHANGED
|
@@ -333,7 +333,7 @@ if (calcite.CALCITE === true) {
|
|
|
333
333
|
console.log("π¦ Installing ArcGIS Core, Map Components, and Calcite Components...");
|
|
334
334
|
initPromises.push(
|
|
335
335
|
new Promise((resolve, reject) => {
|
|
336
|
-
exec(\`\${packageManager} install @arcgis/core@4.33.
|
|
336
|
+
exec(\`\${packageManager} install @arcgis/core@4.33.12 @arcgis/map-components@4.33.12 @esri/calcite-components@2.13.0\`, (error, stdout, stderr) => {
|
|
337
337
|
if (error) {
|
|
338
338
|
console.log('error:', chalk.white.bgRed(error.message));
|
|
339
339
|
reject(error);
|
|
@@ -347,7 +347,7 @@ if (calcite.CALCITE === true) {
|
|
|
347
347
|
console.log("π¦ Installing ArcGIS Core and Map Components...");
|
|
348
348
|
initPromises.push(
|
|
349
349
|
new Promise((resolve, reject) => {
|
|
350
|
-
exec(\`\${packageManager} install @arcgis/core@4.33.
|
|
350
|
+
exec(\`\${packageManager} install @arcgis/core@4.33.12 @arcgis/map-components@4.33.12\`, (error, stdout, stderr) => {
|
|
351
351
|
if (error) {
|
|
352
352
|
console.log('error:', chalk.white.bgRed(error.message));
|
|
353
353
|
reject(error);
|
|
@@ -419,7 +419,7 @@ if (demo.DEMO === true) {
|
|
|
419
419
|
import("@arcgis/map-components/dist/loader").then(
|
|
420
420
|
({ defineCustomElements }) => {
|
|
421
421
|
defineCustomElements(window, {
|
|
422
|
-
resourcesUrl: "https://js.arcgis.com/map-components/4.33.
|
|
422
|
+
resourcesUrl: "https://js.arcgis.com/map-components/4.33.12/assets",
|
|
423
423
|
});
|
|
424
424
|
}
|
|
425
425
|
);
|
|
@@ -463,7 +463,7 @@ if (demo.DEMO === true) {
|
|
|
463
463
|
</main>
|
|
464
464
|
|
|
465
465
|
<style>
|
|
466
|
-
@import "https://js.arcgis.com/4.
|
|
466
|
+
@import "https://js.arcgis.com/4.31/@arcgis/core/assets/esri/themes/dark/main.css";\${calcite.CALCITE ? '\\n @import "@esri/calcite-components/dist/calcite/calcite.css";' : ''}
|
|
467
467
|
|
|
468
468
|
:global(body:has(.e-demo)) {
|
|
469
469
|
margin: 0;
|
|
@@ -594,7 +594,7 @@ if (demo.DEMO === true) {
|
|
|
594
594
|
import("@arcgis/map-components/dist/loader").then(
|
|
595
595
|
({ defineCustomElements }) => {
|
|
596
596
|
defineCustomElements(window, {
|
|
597
|
-
resourcesUrl: "https://js.arcgis.com/map-components/4.33.
|
|
597
|
+
resourcesUrl: "https://js.arcgis.com/map-components/4.33.12/assets",
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
600
|
);
|
|
@@ -637,7 +637,7 @@ if (demo.DEMO === true) {
|
|
|
637
637
|
</main>
|
|
638
638
|
|
|
639
639
|
<style>
|
|
640
|
-
@import "https://js.arcgis.com/4.
|
|
640
|
+
@import "https://js.arcgis.com/4.31/@arcgis/core/assets/esri/themes/dark/main.css";\${calcite.CALCITE ? '\\n @import "@esri/calcite-components/dist/calcite/calcite.css";' : ''}
|
|
641
641
|
|
|
642
642
|
:global(body:has(.e-demo)) {
|
|
643
643
|
margin: 0;
|
|
@@ -759,7 +759,7 @@ if (demo.DEMO === true) {
|
|
|
759
759
|
// Update root page
|
|
760
760
|
const rootRouteDir = isSvelte ? path.join(process.cwd(), 'src') : path.join(process.cwd(), 'src', 'routes');
|
|
761
761
|
const rootPagePath = isSvelte ? path.join(rootRouteDir, 'App.svelte') : path.join(rootRouteDir, '+page.svelte');
|
|
762
|
-
const rootPageUpdate = isSvelte ?
|
|
762
|
+
const rootPageUpdate = isSvelte ? \`import ArcGIS from './lib/ArcGIS.svelte';\` : \`<p>Visit the <a href="arcgis">arcgis demo page</a> and view console.log output</p>\`;
|
|
763
763
|
|
|
764
764
|
// Read existing root page content and append the demo link
|
|
765
765
|
if (fs.existsSync(rootPagePath) && isSvelteKit) {
|