forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geosolutions-it#5972 fix npm install and remove checkcesium (geosolut…
…ions-it#5835) * geosolutions-it#5972 fix npm install and remove checkcesium * remove check cesium add html-to-draftjs
- Loading branch information
Showing
3 changed files
with
21 additions
and
37 deletions.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,19 @@ | ||
console.log("********** post install **********"); | ||
|
||
const fs = require('fs-extra'); | ||
const isInProject = !fs.existsSync('./node_modules/cesium'); | ||
const dirPrefix = isInProject ? '..' : '.'; | ||
fs.removeSync(`${dirPrefix}/node_modules/leaflet-simple-graticule/node_modules`); | ||
fs.removeSync(`${dirPrefix}/node_modules/react-sortable-items/node_modules/react-dom`); | ||
fs.removeSync(`${dirPrefix}/node_modules/geostyler-openlayers-parser/node_modules/@terrestris`); // explicit dependency in package.json | ||
fs.emptyDirSync(`${dirPrefix}/node_modules/mocha`); | ||
fs.copySync(`${dirPrefix}/node_modules/@geosolutions/mocha`, `${dirPrefix}/node_modules/mocha`); | ||
const isInProject = fs.existsSync('./MapStore2'); | ||
console.log(isInProject ? "* in project" : "* not in project"); | ||
|
||
fs.removeSync(`./node_modules/leaflet-simple-graticule/node_modules`); | ||
fs.removeSync(`./node_modules/react-sortable-items/node_modules/react-dom`); | ||
fs.removeSync(`./node_modules/geostyler-openlayers-parser/node_modules/@terrestris`); // explicit dependency in package.json | ||
/** | ||
* this is run 2 times because one from the package.json of the project and one from mapstore2 library | ||
* when run from the project there is an error when the version from mapstore is executed therefore | ||
* we perform a check before do the copy | ||
* */ | ||
if (fs.existsSync('./node_modules/@geosolutions/mocha')) { | ||
console.log("* executing the copy of mocha"); | ||
fs.emptyDirSync(`./node_modules/mocha`); | ||
fs.copySync(`./node_modules/@geosolutions/mocha`, `./node_modules/mocha`); | ||
} |