sv-arcgis 1.3.1 β 1.3.3-next.1
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 +37 -4
- package/bin/sv-arcgis-setup.js +5 -7
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
##
|
|
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
|
+
|
|
27
|
+
## π¬ Repo / NPM
|
|
28
|
+
|
|
29
|
+
- [repo](https://github.com/joe-allen/sv-arcgis)
|
|
30
|
+
- [npm](https://www.npmjs.com/package/sv-arcgis)
|
|
31
|
+
|
|
32
|
+
## π Prereqs
|
|
2
33
|
|
|
3
34
|
- SvelteKit: `npx sv create [project_name]`
|
|
4
35
|
- (Or Svelte: `npm create vite@latest`)
|
|
@@ -16,9 +47,11 @@
|
|
|
16
47
|
|
|
17
48
|
## πΊοΈ Roadmap
|
|
18
49
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
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
|
|
22
55
|
- [x] Update to work Svelte / Vite app (not just Kit)? (Demo would need to be different)
|
|
23
56
|
|
|
24
57
|
## π Help
|
package/bin/sv-arcgis-setup.js
CHANGED
|
@@ -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');
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -751,7 +749,7 @@ if (demo.DEMO === true) {
|
|
|
751
749
|
|
|
752
750
|
fs.writeFileSync(demoPagePath, demoPageContent);
|
|
753
751
|
if (isSvelte) {
|
|
754
|
-
console.log(\`β
Created demo page at ./src/lib/
|
|
752
|
+
console.log(\`β
Created demo page at ./src/lib/ArcGIS.svelte\`);
|
|
755
753
|
} else {
|
|
756
754
|
console.log(\`β
Created demo page at ./src/routes/arcgis/+page.svelte\`);
|
|
757
755
|
}
|
|
@@ -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(
|
|
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(
|
|
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.1",
|
|
3
|
+
"version": "1.3.3-next.1",
|
|
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",
|