corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

Unable to build:web #115

Closed ohad182 closed 4 years ago

ohad182 commented 4 years ago

Hi,

i've seen that on this commit: https://github.com/corenova/yang-js/tree/83987bb135a28f0ee0b396a9a9b222b1f308c438

you removed the build:web script, how can i build it to web?

Documentation says the script exists but actually removed

Thanks!

sekur commented 4 years ago

Hi @ohad182 - I removed it since I was using it as part of webpack thought it really wasn’t needed to have a separate standalone web build. I can restore this script functionality in the next release.

For now, you can basically issue the same command (from the prior package.json script) using the cli console to produce the same web browser build.

ohad182 commented 4 years ago

Hi @saintkepha,

Thanks for the response, it will be very helpful if this will be integrated into the package release.

For now i've changed package.json like so: "devDependencies": { "babel-preset-es2015": "^6.24.0", "babelify": "^7.3.0", "browserify": "^13.1.0", "brfs": "^1.4.3", "coffee-script": ">=1.7.0", "minifyify": "^7.3.4", "mocha": "^5.2.0", "rimraf": "^2.5.2", "should": "~3.1.3" }, "engines": { "node": ">=4.0.0" }, "scripts": { "clean": "rimraf dist/* lib/*", "prebuild": "npm run clean -s && mkdir -p dist", "build:src": "coffee -o lib -c src", "build": "npm run build:src && npm run", "build:web": "browserify -t babelify -t brfs -i crypto -i buffer -r promise-polyfill/dist/polyfill.js . > dist/yang.min.js", "prepublish": "npm run build", "pretest": "npm run build:src", "test": "mocha" }, and it works with small issue, the generated file contains a set statement to Element.scope which has only getter, i've fixed it only in the produced file (since i dont know how to fix it in the source code.

Thanks for your help! this package is great!

sekur commented 4 years ago

published in 0.5.22