Closed bastienmenis closed 6 years ago
That's really cool! I'll have a look at it tomorrow and let you know. The %VERSION% is replaced by a bash script before running the build script. If this could be integrated in the Grunt script that'd be better but not sure if that's possible. The version number itself is managed by the build server atm. Same bash script pushes it to npmjs.org, would be great to get that up and running as well.
Ok, thanks. I have also switched from grunt to npm as the script runner. ("npm run build")
To manage the version numbers, another option is to use "npm version" before doing "npm publish".
Note that to use the library I had to change "new BimServerClient(...)" to "new bimserverapi.BimServerClient(...)" due to the way the module is bundled.
@rubendel I have a few more suggestions:
"dependencies": {
"bimserverapi": "git+https://github.com/opensourceBIM/BIMserver-JavaScript-API.git",
}
I am happy to looks into 2, 3 and 4 if you can share your publish script
Took a while, but had another look at this.
Have not tested in NodeJS yet...
I have forked the code and converted it to and ES2015 module. In addition to modernising the code, it should help with compatibility with NodeJS (see #7)
https://github.com/bastienmenis/BIMserver-JavaScript-API
@rubendel I am happy to create a pull request but can you review this first? I did not understand how you manage the version numbers, I had to replace '%VERSION%' with a number so that the package.json could be parsed.
I used rollup/babel for bundling as an UMD module. The UMD module has been tested with bimSurfer. The ES2015 module has been tested in an Angular app with Rollup as bundler (it should also work with Webpack)