sv-arcgis 1.3.0-next.2 β 1.3.0-next.4
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 +13 -7
- package/bin/sv-arcgis-setup.js +11 -13
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
## π¬ Repo / NPM
|
|
2
|
+
|
|
3
|
+
- [repo](https://github.com/joe-allen/sv-arcgis)
|
|
4
|
+
- [npm](https://www.npmjs.com/package/sv-arcgis)
|
|
5
|
+
|
|
1
6
|
## π¬ Prereqs
|
|
2
7
|
|
|
3
|
-
- SvelteKit
|
|
8
|
+
- SvelteKit: `npx sv create [project_name]`
|
|
9
|
+
- (Or Svelte: `npm create vite@latest`)
|
|
4
10
|
|
|
5
11
|
## ποΈ Setup
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
|
|
13
|
+
1. Install [sv-arcgis](https://www.npmjs.com/package/sv-arcgis) `npx sv-arcgis`
|
|
14
|
+
2. Follow instructions in terminal π
|
|
9
15
|
|
|
10
16
|
## π Notes
|
|
11
17
|
|
|
@@ -15,10 +21,10 @@
|
|
|
15
21
|
|
|
16
22
|
## πΊοΈ Roadmap
|
|
17
23
|
|
|
18
|
-
- Option for / intergrate OAuth2 https://developers.arcgis.com/documentation/security-and-authentication/user-authentication/arcgis-apis/
|
|
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
24
|
- Create CI / CD (w/ tests)
|
|
25
|
+
- Create tests (see https://www.youtube.com/watch?v=Xk8yaN9_PZA)
|
|
26
|
+
- Option for / intergrate OAuth2 https://developers.arcgis.com/documentation/security-and-authentication/user-authentication/arcgis-apis/
|
|
27
|
+
- [x] Update to work Svelte / Vite app (not just Kit)? (Demo would need to be different)
|
|
22
28
|
|
|
23
29
|
## π Help
|
|
24
30
|
|
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.14 @arcgis/map-components@4.33.24 @esri/calcite-components@3.3.3\`, (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.14 @arcgis/map-components@4.33.24\`, (error, stdout, stderr) => {
|
|
351
351
|
if (error) {
|
|
352
352
|
console.log('error:', chalk.white.bgRed(error.message));
|
|
353
353
|
reject(error);
|
|
@@ -377,12 +377,12 @@ if (initPromises.length > 0) {
|
|
|
377
377
|
if (demo.DEMO === true) {
|
|
378
378
|
let arcgisRouteDir;
|
|
379
379
|
if (isSvelte) {
|
|
380
|
-
// console.log("
|
|
380
|
+
// console.log("β
Created demo in './src/'.");
|
|
381
381
|
// Create directory called 'arcgis' in './src/'
|
|
382
382
|
|
|
383
383
|
arcgisRouteDir = path.join(process.cwd(), 'src', 'lib');
|
|
384
384
|
} else if (isSvelteKit) {
|
|
385
|
-
console.log("
|
|
385
|
+
// console.log("β
Created demo in './src/routes/'.");
|
|
386
386
|
// Create directory called 'arcgis' in './src/routes/'
|
|
387
387
|
|
|
388
388
|
arcgisRouteDir = path.join(process.cwd(), 'src', 'routes', 'arcgis');
|
|
@@ -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.24/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.33/@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;
|
|
@@ -502,7 +502,6 @@ if (demo.DEMO === true) {
|
|
|
502
502
|
flex-direction: column;
|
|
503
503
|
gap: 2rem;
|
|
504
504
|
width: 50vmax;
|
|
505
|
-
height: 100vh;
|
|
506
505
|
margin-inline: auto;
|
|
507
506
|
margin: 0;
|
|
508
507
|
padding: 0;
|
|
@@ -594,7 +593,7 @@ if (demo.DEMO === true) {
|
|
|
594
593
|
import("@arcgis/map-components/dist/loader").then(
|
|
595
594
|
({ defineCustomElements }) => {
|
|
596
595
|
defineCustomElements(window, {
|
|
597
|
-
resourcesUrl: "https://js.arcgis.com/map-components/4.33.
|
|
596
|
+
resourcesUrl: "https://js.arcgis.com/map-components/4.33.24/assets",
|
|
598
597
|
});
|
|
599
598
|
}
|
|
600
599
|
);
|
|
@@ -637,7 +636,7 @@ if (demo.DEMO === true) {
|
|
|
637
636
|
</main>
|
|
638
637
|
|
|
639
638
|
<style>
|
|
640
|
-
@import "https://js.arcgis.com/4.
|
|
639
|
+
@import "https://js.arcgis.com/4.33/@arcgis/core/assets/esri/themes/dark/main.css";\${calcite.CALCITE ? '\\n @import "@esri/calcite-components/dist/calcite/calcite.css";' : ''}
|
|
641
640
|
|
|
642
641
|
:global(body:has(.e-demo)) {
|
|
643
642
|
margin: 0;
|
|
@@ -676,7 +675,6 @@ if (demo.DEMO === true) {
|
|
|
676
675
|
flex-direction: column;
|
|
677
676
|
gap: 2rem;
|
|
678
677
|
width: 50vmax;
|
|
679
|
-
height: 100vh;
|
|
680
678
|
margin-inline: auto;
|
|
681
679
|
margin: 0;
|
|
682
680
|
padding: 0;
|
|
@@ -759,7 +757,7 @@ if (demo.DEMO === true) {
|
|
|
759
757
|
// Update root page
|
|
760
758
|
const rootRouteDir = isSvelte ? path.join(process.cwd(), 'src') : path.join(process.cwd(), 'src', 'routes');
|
|
761
759
|
const rootPagePath = isSvelte ? path.join(rootRouteDir, 'App.svelte') : path.join(rootRouteDir, '+page.svelte');
|
|
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>\`;
|
|
760
|
+
const rootPageUpdate = isSvelte ? \n\`import ArcGIS from './lib/ArcGIS.svelte';\` : \`<p>Visit the <a href="arcgis">arcgis demo page</a> and view console.log output</p>\`;
|
|
763
761
|
|
|
764
762
|
// Read existing root page content and append the demo link
|
|
765
763
|
if (fs.existsSync(rootPagePath) && isSvelteKit) {
|
|
@@ -840,7 +838,7 @@ generateConfig()
|
|
|
840
838
|
fs.writeFileSync(configFilePath, configFileText, { encoding: 'utf8', flag: 'w' });
|
|
841
839
|
|
|
842
840
|
// Show that config was written
|
|
843
|
-
console.log(\`β
Updated \` + chalk.bold(\`/src/lib/config/index.\${usesTypeScript ? 'ts' : 'js'}\`));
|
|
841
|
+
console.log(\`β
Updated config at \` + chalk.bold(\`/src/lib/config/index.\${usesTypeScript ? 'ts' : 'js'}\`));
|
|
844
842
|
}
|
|
845
843
|
|
|
846
844
|
if (!global.arcGisApiKeyIsNull || !global.arcGisClientIdIsNull || !global.arcGisClientSecretIsNull) {
|
|
@@ -849,7 +847,7 @@ generateConfig()
|
|
|
849
847
|
fs.writeFileSync(envFilePath, envFileText, { encoding: 'utf8', flag: 'w' });
|
|
850
848
|
|
|
851
849
|
// Show that env was written
|
|
852
|
-
console.log(\`β
Updated \` + chalk.bold(\`.env\`));
|
|
850
|
+
console.log(\`β
Updated env file at \` + chalk.bold(\`.env\`));
|
|
853
851
|
console.log(\`π Tip: Make sure your .gitignore has the line: .env\`);
|
|
854
852
|
}
|
|
855
853
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sv-arcgis",
|
|
3
|
-
"version": "1.3.0-next.
|
|
3
|
+
"version": "1.3.0-next.4",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sv-arcgis": "./bin/sv-arcgis-setup.js"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"description": "a CLI tool that guides you through setting up a ArcGIS / SvelteKit development environment.",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"semantic-release": "^24.2.7",
|
|
33
32
|
"@semantic-release/changelog": "^6.0.3",
|
|
34
|
-
"@semantic-release/git": "^10.0.1"
|
|
33
|
+
"@semantic-release/git": "^10.0.1",
|
|
34
|
+
"semantic-release": "^25.0.2"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"bin",
|