Comments (7)
This is autogenerated code by protobuf: https://developers.google.com/protocol-buffers/docs/reference/javascript-generated
from nkn-client-js.
should replace it anyways, if you ask me. Or maybe they have a method of generating it without function eval
from nkn-client-js.
What problem are you getting into exactly? Typically modifying generated pb code is not a good way, we can see whether we can overcome it without having to manually modify the generated file every time we modify pb definition.
from nkn-client-js.
Run this lib through browserify and you'll get a CSP error on Firefox, because of those 2 lines.
In fact, the files in /dist have this problem too.
from nkn-client-js.
#44 should solve this issue, @losnappas could you please confirm?
from nkn-client-js.
Works, and I have an improvement.
instead doing the transformation in Gruntfile.js, move it into package.json, so that when I do require('nkn-client')
, my browserify will know what to do, too. (So I won't need to explicitly use the dist files, which makes life a bit easier).
like this (package.json):
"browserify": {
"transform": [
["browserify-replace",
{
"replace": [{
"from": "var global = Function\\('return this'\\)\\(\\);",
"to": "var global = (function(){ return this }).call(null);"
}]
}
]
]
},
And you'll probably want to bump the version in package.json, too, if you forgot.
Made u a PR yilunzhang#1 to save your time.
from nkn-client-js.
Thanks! Merged your PR.
from nkn-client-js.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nkn-client-js.