sv-arcgis 1.3.2 β 1.3.3
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 +32 -4
- package/bin/sv-arcgis-setup.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
+
## β What does this do?
|
|
2
|
+
|
|
3
|
+
It's an ~opinionated way to setup a Svelte or SvelteKit and ArcGIS project. It'll give you everything you need to get going quickly and will set default locations for things like config.js|ts and your .env file.
|
|
4
|
+
|
|
5
|
+
Here are the prompts that are asked when running the tool (all are optional):
|
|
6
|
+
|
|
7
|
+
**(config)**
|
|
8
|
+
|
|
9
|
+
- Enter your appName
|
|
10
|
+
- Enter your baseUrl (e.g. /)
|
|
11
|
+
- Enter your Portal URL
|
|
12
|
+
- Enter your webmapId
|
|
13
|
+
- Enter your appId
|
|
14
|
+
|
|
15
|
+
**(env)**
|
|
16
|
+
|
|
17
|
+
- Enter your ArcGIS API key
|
|
18
|
+
- Enter your ArcGIS Client ID
|
|
19
|
+
- Enter your ArcGIS Client Secret
|
|
20
|
+
|
|
21
|
+
**(ui)**
|
|
22
|
+
|
|
23
|
+
- Do you need the Security Classification bars above and below on the UI?
|
|
24
|
+
- Do you want to use Calcite Components?
|
|
25
|
+
- Would you like a demo page?
|
|
26
|
+
|
|
1
27
|
## π¬ Repo / NPM
|
|
2
28
|
|
|
3
29
|
- [repo](https://github.com/joe-allen/sv-arcgis)
|
|
4
30
|
- [npm](https://www.npmjs.com/package/sv-arcgis)
|
|
5
31
|
|
|
6
|
-
##
|
|
32
|
+
## π Prereqs
|
|
7
33
|
|
|
8
34
|
- SvelteKit: `npx sv create [project_name]`
|
|
9
35
|
- (Or Svelte: `npm create vite@latest`)
|
|
@@ -21,9 +47,11 @@
|
|
|
21
47
|
|
|
22
48
|
## πΊοΈ Roadmap
|
|
23
49
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
50
|
+
- [ ] Option for / intergrate OAuth2 https://developers.arcgis.com/documentation/security-and-authentication/user-authentication/arcgis-apis/
|
|
51
|
+
- [ ] Add prompt for ArcGIS Charts / Code components?
|
|
52
|
+
- [ ] Create CI / CD (w/ tests)
|
|
53
|
+
- [ ] Create tests (see https://www.youtube.com/watch?v=Xk8yaN9_PZA)
|
|
54
|
+
- [ ] When selecting demo for Svelte (vite) currently we're only importing the component. Update the script to drop `<ArcGIS />` something in the html
|
|
27
55
|
- [x] Update to work Svelte / Vite app (not just Kit)? (Demo would need to be different)
|
|
28
56
|
|
|
29
57
|
## π Help
|
package/bin/sv-arcgis-setup.js
CHANGED
|
@@ -749,7 +749,7 @@ if (demo.DEMO === true) {
|
|
|
749
749
|
|
|
750
750
|
fs.writeFileSync(demoPagePath, demoPageContent);
|
|
751
751
|
if (isSvelte) {
|
|
752
|
-
console.log(\`β
Created demo page at ./src/lib/
|
|
752
|
+
console.log(\`β
Created demo page at ./src/lib/ArcGIS.svelte\`);
|
|
753
753
|
} else {
|
|
754
754
|
console.log(\`β
Created demo page at ./src/routes/arcgis/+page.svelte\`);
|
|
755
755
|
}
|
|
@@ -838,7 +838,7 @@ generateConfig()
|
|
|
838
838
|
fs.writeFileSync(configFilePath, configFileText, { encoding: 'utf8', flag: 'w' });
|
|
839
839
|
|
|
840
840
|
// Show that config was written
|
|
841
|
-
console.log(\`β
Updated config at \` + chalk.bold(
|
|
841
|
+
console.log(\`β
Updated config at \` + chalk.bold(\`./src/lib/config/index.\${usesTypeScript ? 'ts' : 'js'}\`));
|
|
842
842
|
}
|
|
843
843
|
|
|
844
844
|
if (!global.arcGisApiKeyIsNull || !global.arcGisClientIdIsNull || !global.arcGisClientSecretIsNull) {
|
|
@@ -847,7 +847,7 @@ generateConfig()
|
|
|
847
847
|
fs.writeFileSync(envFilePath, envFileText, { encoding: 'utf8', flag: 'w' });
|
|
848
848
|
|
|
849
849
|
// Show that env was written
|
|
850
|
-
console.log(\`β
Updated env file at \` + chalk.bold(
|
|
850
|
+
console.log(\`β
Updated env file at \` + chalk.bold(\`./.env\`));
|
|
851
851
|
console.log(\`π Tip: Make sure your .gitignore has the line: .env\`);
|
|
852
852
|
}
|
|
853
853
|
|