-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add @maps4html/mapml as dependency. Add copy script, update stencil
config to invoke copy of mapml artifacts to dist output directory.
- Loading branch information
1 parent
38ccf28
commit 3e72577
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Define paths | ||
const source = path.join(__dirname, '../../../node_modules/@maps4html/mapml/dist'); | ||
const destination = path.join(__dirname, '../dist/gcds/gcds-map'); | ||
|
||
// Function to copy files | ||
function copyDirectory(src, dest) { | ||
if (!fs.existsSync(dest)) { | ||
fs.mkdirSync(dest, { recursive: true }); | ||
} | ||
|
||
fs.readdirSync(src).forEach((item) => { | ||
const srcPath = path.join(src, item); | ||
const destPath = path.join(dest, item); | ||
|
||
if (fs.lstatSync(srcPath).isDirectory()) { | ||
copyDirectory(srcPath, destPath); | ||
} else { | ||
fs.copyFileSync(srcPath, destPath); | ||
} | ||
}); | ||
} | ||
|
||
// Copy and rename | ||
try { | ||
copyDirectory(source, destination); | ||
console.log('Copied @maps4html/mapml to dist/gcds/gcds-map successfully.'); | ||
} catch (error) { | ||
console.error('Error copying files:', error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters