amd

Is r.js dependency tracing significantly slower since v2.1.16? Or is it just me?

穿精又带淫゛_ 提交于 2019-12-10 21:47:30
问题 I have noticed a dramatic increase in build time in r.js versions 2.1.16/2.1.17, as compared to 2.1.15 and before. The extra time seems to be spend during the 'Tracing dependencies for...' fase. My build.js looks something like this: ({ baseUrl: 'some/path/here', mainConfigFile: 'some/path/here', dir: 'some/path/here', modules: [ { name: "base" }, { name: "specific", exclude: ["base"] } ], findNestedDependencies: true, removeCombined: true, skipDirOptimize: true, optimize: "none" }) In run

How to test AVX-512 instructions w/o supported hardware? [closed]

♀尐吖头ヾ 提交于 2019-12-10 20:13:14
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm trying to learn x86-64 's new AVX-512 instructions, but neither of my computers have support for them. I tried using various disassemblers (from Visual Studio to online ones: 1, 2) to see the instructions for specific opcode encodings, but I'm getting somewhat conflicting results. Plus, it would've been nice

RequireJS text plugin and variable concatenated string

扶醉桌前 提交于 2019-12-10 18:27:14
问题 I'm using RequireJS text plugin to load some html templates. When I passing a string literal to the require function it works fine. var templateHTML = require('text!templates/template_name.html'); But when I using variable concatenated string var templateName = 'template_name'; var templateHTML = require('text!templates/'+templateName+'.html'); It throws following error: Uncaught Error: Module name "text!templates/template_name.html" has not been loaded yet for context: _ Any ideas for this

tsc compile AMD module with specified module id

别等时光非礼了梦想. 提交于 2019-12-10 18:16:12
问题 is it possible to config typescript compiler to compile exported class with define module id? typescript export class Foo {...} this is what tsc output (module: "amd") define(["require", "exports"], function (require, exports) {...} expected define("Foo", ["require", "exports"], function (require, exports) {...} Thank you very much 回答1: expected define("Foo") Use the super secret /// <amd-module name="Foo"/> But I would advise against this as it will make your code needlessly amd specific. 来源

Using Babel to convert ES6 modules to ES5 AMD modules, not working as expected

二次信任 提交于 2019-12-10 15:21:51
问题 I hope someone can help. I'm using grunt-babel to convert my ES6 module code to ES5 AMD module code. Here's my ES6 code: multiply.js export default function (x,y) { return x * y; }; square.js import multiply from 'multiply'; export default function (x) { return multiply(x,x); }; app.js import square from 'square'; var myValue = square(2); console.log(myValue); As you can see, all I'm doing is creating a module 'multiply', importing that into another module 'square', and then finally using

OpenGL render difference between nVidia and ATI

心已入冬 提交于 2019-12-10 14:59:42
问题 Recently I updated ATI drivers (Iam using HD7970) to the newest one and some of my OpenGL project's objetcs stopped working. What is more they work on nVidia newest drivers (tested on 960m). Is there any difference between ATI and nVidia rendering pipeline that I should know? Additional info: No error from glGetError(), Shaders compiled and linked properly, Other render objects works fine but VBO populating and drawing commands are different. Working one are loaded from *.obj file and draw by

Handling prerequsites load failure in RequireJS require function

给你一囗甜甜゛ 提交于 2019-12-10 14:58:23
问题 I'm using RequireJS for AMD. Using this code I execute my function after ensuring the module1 is loaded: require(['module1'], function (module1) { if (module1) { // My function code... } ); In some cases the module1 is not available (mostly because of access security). I want to handle what happens if module1 failed to load. Using some code like: require(['module1'], function (module1) { if (module1) { // My function code... } ) .fail(function(message) { console.log('error while loading

Relative paths using requirejs in combination with Typescript and AMD

送分小仙女□ 提交于 2019-12-10 14:55:40
问题 There are several Javascript files, organized in folders Scripts/folder1, Scripts/folder2, ... With requirejs.config.baseUrl a folder is defined as the default, for example Scripts/folder1. Then in requirejs.config.paths some files are addressed with just the filename, and some are addressed with a relative path (like ../folder2/blabla). When coding the Typescipt file folder2/blabla.ts we need the module "math" from folder1. So we write import MOD1 = module("../folder1/math"); Regarding

How to use gulp to build JavaScript bundles?

寵の児 提交于 2019-12-10 13:43:30
问题 I want to use gulp to build bundles of JavaScript files. For example I have the following structure in my project: /vendor/vendor1/vendor1.js /vendor/vendor2/vendor2.js /js/includes/include1.js /js/includes/include2.js /js/bundle1.js /js/bundle2.js There are vendor includes (1-2), local includes (3-4), and bundle files (5-6). Vendor includes are just third-party JavaScript libraries installed with bower or composer. They can be CommonJS , AMD or just a plain-old jQuery plugins. I want to

How can I import a javascript AMD module into an external TypeScript module?

梦想与她 提交于 2019-12-10 13:22:31
问题 How can I import a javascript AMD module into a external TypeScript module? I'm modularizing my client TypeScript program to use AMD modules managed by bower. As part of this process, a Typescript module becomes a javascript AMD module, which I then publish. Now I have a javascript AMD module that I want to include in a TypeScript module, and I don't want to publish the original TypeScript with the javascript AMD. I cannot figure out how to write my TypeScript code so that it will load a