ES6 import (or is d3 just different somehow?) - d3.js

TL;DR:
Using Rollup, can I import D3 like Debug or can I only build a custom library?
Background
I'm trying to build my first webapp with Rollup, D3 (v4 - ES2015) and others. In search of an education, I followed Jason Lengstorf's tutorial. There I learned how to import Debug (CommonJS) and use its facilities. Works like a champ. I then tried to use D3 in the same way, only there are no default exports so used import * as d3 from 'd3' instead of the import debug from debug-style. For love or money I can't get it to work. I keep getting errors that look like:
'request' is not exported by
node_modules/d3-request/build/d3-request.js
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
I opened an issue with the Rollup guys. They are busy and gave me what they could — and I remain stumped. Both of Mike Bostock's examples (I and II) just show how to build custom bundles, not how to import into working code a la Debug (which is, again, CommonJS not ES2015 like D3). Is that the only way to use it? I have not experimented with another ES2015 library (not that I know any) so I don't know if this is D3-specific or I just don't understand how to deal with ES2015 libraries generally (or just simply don't understand browser-based architecture period).
Follow-on questions
Is there a web app architecture tutorial/book/something that includes ES2015-specific issues?
There seems to be as many project structures out there as people coding. Is there One True Church? Do I just have to keep bleeding from my eyes until I get my own, phoenix-like kung fu about all this (reference Jose Aguinaga's piece)?

Related

UE4 import Animation during runtime

I wanna know if it's possible or if anyone already worked on this function.
Basically what I want to do is using the Assimp library to import FBX& Animation inside, when import the FBX file there is an Animation inside, but don't really know how to use this Animation to convert what I can use to trigger it.
Is anyone have any idea about it, thanks in advance
Using the Assimp library in UE4 is fairly straightforward. Copy the dll into “YourGame/Binaries/Win32 or Win64/” on Windows for example, and then you need to import the includes header source, which you can do in the main game library or create a separate plugin for it. Then under your Build.cs file add the line PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "assimp-vc140-mt.lib"));
The steps are the same if you want to create a separate plugin for it. As far as the animations go UE4 is using fbx in the background, so I can tell you from experience that you can get vertex transforms and apply them directly to UE4 mesh. I would look into using UProceduralMeshComponent for this though, that is what it's made for.
The Unreal Forums have a couple guides on doing exactly this.

Implementation angular plugin to nativescript-vue

I am newbie with nativescipt-vue. I need to connect identity server with nativescript-vue. I found a plugin in this repo. But its developer gives only angular example. Can I use this plugin with nativescript-vue. Do you have any suggestion? Thank you in advance.
Good news: Most of 'things' developed on the top of NativeScript are interoperable, meaning that you can swap frameworks as desired.
Bad news: There is some problems of doing so. I've looked into the repository that you reported on the question and I saw that you have to deal with some Interfaces there.
export class AuthComponent implements OnInit { //...
Dealing with interfaces in NativeScript is a little bit confusing since you have to deal with classes in both NativeScript and Java in the same script.
The lack of documented behavior of this keyword, for example, can lead to some undesired behaviors. I am dealing with this problem right now. So, be careful.
Please provide us some parts of the code that you want to transpile to NativeScript-Vue.
Also, I highly recommend you to study how NativeScript works before understanding how NativeScript-Vue works. You are probably accessing the NS docs way more than NativeScript-Vue docs in a near future (assuming that you are already familiar with Vue).

How to use blueprintjs without Typescript?

I am new to React and I just stumbled to amazing Blueprint components. However, I am unable to use it and I am confused by the installation guide. Its quite different from what I am used so far.
Can anyone explain me how to use Blueprint without Typescript?
You can simply ignore the Typescript parts. Since you are writing a React app, it needs to be compiled through Babel anyways.
I never used Typescript before and also just started to use blueprint a few days ago and was able to use the JSX components completely without any Typescript knowledge.
Just start using it like any other React components you write - or use DIVs with the blueprint CSS classes directly when necessary. Its up to you.

Looking for guidance in using standard Polymer Core and Paper components (and associated events) in Dart Editor

First of all many thanks for the incredible source of information that you are providing to people like me.
I am visiting this site very often and most often finding the answer I need, but this is this is the first time I post a question, so please accept my apologies if I don't fully conform to rules.
Here is my issue:
I am "playing" with Dart Editor and Polymer to try to understand if I could use these technologies in my job moving forward
I was able to import the Polymer Core and Paper components in Dart Editor and to install polymer.dart
I was able to create a simple web page with a "core-selector" and to add some Dart code to handle a click on this component
I can't find how to listen using Dart code for component-specific event ("core-activate" & "core-select" here) and how to read component-specific attributes ("selected" & "multi" here)
I don't seem to be able to find good examples showing how to use "standard" polymer components in a web app created Dart Editor
I could find material on how to create my own polymer components using polymer.dart but I would just like to use standard components
I understand both Polymer and Dart are young but I can't imagine the clever brains at Google not having a solution or plans on this.
Regards and many thanks again.
Sebastien
The problem is not that Polymer and Dart are young. Dart is quite mature, Polymer is not even beta but also not so young anymore. The problem are the core- and paper-elements. They are very new and developed in JavaScript and the Polymer.dart team just created a code generator that wraps the JS core- and paper-elements in Polymer.dart elements. This process is only available since a few days and there are several issues which are yet to be solved.
I think you should provide a concrete example in your question of what you can't get working. Basically Polymer.dart core- and paper-elements work exactly as other Polymer.dart elements. So it's hard to know what to explain.

Build an app with marionettejs with requirejs?

I have used backbone boilerplate on the past
https://github.com/backbone-boilerplate/backbone-boilerplate
I want to use marionette on my next project and I have found this
https://github.com/BoilerplateMVC/Marionette-Require-Boilerplate
My question is if it's a good idea to go with the marionette boilerplate or start form scratch.
As an aside, I'd like to suggest you give Yeoman a shot for scaffolding your first Marionette app. Yeoman works via what are called "generators", and provide much more than the the above Boilerplate MVC can offer you (Chai and Sinon for testing, Bower for client-side package management, etc...). Plus, Addy Osmani, who runs backbone-boilerplates is one of the heads of the project. Check out generator-marionette here.
I haven't used BoilerPlate, but glancing through it, it certainly seems like a valid approach to writing Marionette apps. If you're just getting started it will certainly help you see how the various pieces are supposed to be used. One gripe I've got is the folder structure. I prefer to break my applications down into modules, and then add models, collections, views, etc under each module. But this will certainly get you up and running quick, and there's nothing stopping you from customizing it to suit your needs.
I agree with others here: it is a useless limitation to imitate a folder structure that follows the 'old mvc model for server-side code'. You will remain more flexible further down the road if you think of your application strictly as completely self-containing modules, i.e. they contain their own controller/router/views/collections/templates etc. You can have a separate folder structure for shared code that is not a module, although anything can be made a module :)
Regarding boilerplate code and generators: i think in the beginning you should actually NOT do it, because you won't understand what you're doing. But that's just my personal opinion.

Resources