Comments (4)
Not sure I understand what you mean by I find it a bit clunky to import them all separately, is there a better way?
. Can you please share some code that you have written and you want to improve?
from edge.
let edge = require("edge-js");
let exports = {};
let imports = [
__dirname + "/../cs/example.dll",
__dirname + "/../cs/example2.dll",
__dirname + "/../cs/example3.dll"
];
exports.Open = edge.func({
source: __dirname + "/../cs/Example.cs",
methodName: "Open",
references: imports,
});
exports.GetName = edge.func({
source: __dirname + "/../cs/Example.cs",
methodName: "GetName",
references: imports,
});
exports.GetPoints = edge.func({
source: __dirname + "/../cs/Example.cs",
methodName: "GetPoints",
references: imports,
});
exports.GetPoint = edge.func({
source: __dirname + "/../cs/Example.cs",
methodName: "GetPoint",
references: imports,
});
exports.SetPoint = edge.func({
source: __dirname + "/../cs/Example.cs",
methodName: "SetPoint",
references: imports,
});
module.exports = exports;
The code itself isn't bad really I dont think.
I've shortened it up. I actually import 11 dlls, and have 9 exports currently.
It works, and seemingly well. My concern is mostly that I'm loading the dlls for each export, which seems inefficient, but considering they all use the open connection under the hood well I'm guessing its optimized and only loads it once.
I couldn't see any multiple export methods in the docs, but wanted to make sure I wasn't missing something obvious as a syntax like below to export what I'm doing makes a lot of sense, or is it an abnormal use case to export a bunch of functions as none of the examples do it?
let exports = {};
exports = edge.func({
source: __dirname + "/../cs/Example.cs",
methodNames: ["Open", "GetName", "GetPoints", "GetPoint", "SetPoint"],
references: imports,
});
from edge.
Are you sure, you are submitting the issue in the right repo? Coz, there is no API as edge.func
from edge.
Well that's embarrassing.
The one I thought this was was edge-js, which is a derivative project of another one called edge. Must have landed here after a bad google search. Confusing naming. Sorry.
from edge.
Related Issues (20)
- Links are dead in legacy documentation HOT 1
- Simplify prop binding and conditional props HOT 2
- Issue while rendering string having spaces HOT 3
- Condition in one line HOT 2
- Unable to display an image HOT 1
- Is it possible to perform a static analysis of the template Edge.js ? HOT 4
- Just a silly question HOT 2
- Passing values from edge to alpine.js (Question) HOT 3
- Merging props with a default value HOT 1
- SEO HOT 1
- Can not use @ symbol in template files HOT 2
- Blaze/Handlebars vs Edge HOT 1
- <named slot> is not a function HOT 6
- SVG icons not working HOT 5
- Question: What is the difference between partial and component? HOT 2
- `sentenceCase` helper remove accented chars HOT 1
- Creating new feature request does not seem to be possible HOT 2
- Discussion for a new feature - Globally disable html escaping
- Discussion for a new feature - @continue and @break tag
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 edge.