transpiler

Is there a way to get TypeScript to transpile in Plunkr on the client side?

我怕爱的太早我们不能终老 提交于 2019-12-23 16:05:23
问题 For my team, we're between projects, but I'm performing some basic research on TypeScript and how to use Angular 1.x with it, considering that Angular 2 is still being baked. I usually use Plunkr to make small-scale prototypes so that we can see how something works and mess with it in-situ during tech demos and stuff. The problem, though, is I tried to make a very basic Angular 1.x + TS setup in this plunker, but have been running into issues getting it to work properly. I think some of the

Babel causing Uncaught TypeError in transpiled ES5 Vue component code

半城伤御伤魂 提交于 2019-12-23 03:51:34
问题 Working on a small Node.js project that needs to send JSON objects over sockets. I discovered that JsonSocket (https://github.com/sebastianseilund/node-json-socket) served my needs and running the simple server/client demos provided by that author works great. I am adapting the demo Client code (https://github.com/sebastianseilund/node-json-socket#simple-clientserver-example) to a Vue.js-Babel-Browserify project framework and placing the code in a .vue component file. Changes primarily

WebStorm configure output path for Sass

回眸只為那壹抹淺笑 提交于 2019-12-23 03:29:26
问题 I've a quick question about setting up a watcher in WebStorm for SCSS transpiling. I want the watcher to transpile scss files to a specific folder: Project/assests/scss/(several scss files) transpile to Project/src/css/(transpiled css files) I noticed that there are terms like $FileNameWithoutExtension$ or $FileParentDir$ , what language is that? :) Thanks a lot! 回答1: Please try the following: Arguments: --no-cache --update $FileName$:$ProjectFileDir$/src/css/$FileNameWithoutExtension$.css

TypeScript should assign to `this` before `_super` call in transpiled output for ES5?

风格不统一 提交于 2019-12-22 10:17:55
问题 I use dependency injection for all my child classes that extends an abstract class. The problem that in abstract constructor class I launch a method that I planned to override in its children, if necessary. I stuck in problem that my injected dependency is not visible in my override class that is launched from super. Here is an example of code: abstract class Base { constructor(view: string) { this._assemble(); } protected _assemble(): void { console.log("abstract assembling for all base

Are there C like pre-processor directives for Octave and Scilab to be used for intercompatible code?

我的梦境 提交于 2019-12-20 04:07:55
问题 In C / C++ languages one can use macros or as called "per-processor directives" to instruct the compiler how the code should be read. The simple commands of #def , #ifdef , #ifndef , #else , #endif ... give the compiler the ability to check for Operating system, compiler and other environment information. I know Octave and Scilab are interpreted languages, but I'm wondering if is there any way to tell the interpreter to replaces parts of script while loading it? For example can I write a code

Compiling vs Transpiling

大兔子大兔子 提交于 2019-12-17 22:18:33
问题 While searching about the difference, I came across these definitions: Compiling is the general term for taking source code written in one language and transforming into another. Transpiling is a specific term for taking source code written in one language and transforming into another language that has a similar level of abstraction. I understand what Abstraction is. But what does "similar level of abstraction" mean in the above definition? And how do we find the level of abstraction in a

Extending Error in Javascript with ES6 syntax & Babel

时间秒杀一切 提交于 2019-12-17 05:34:32
问题 I am trying to extend Error with ES6 and Babel. It isn't working out. class MyError extends Error { constructor(m) { super(m); } } var error = new Error("ll"); var myerror = new MyError("ll"); console.log(error.message) //shows up correctly console.log(myerror.message) //shows empty string The Error object never get the right message set. Try in Babel REPL. Now I have seen a few solutions on SO (for example here), but they all seem very un-ES6-y. How to do it in a nice, ES6 way? (That is

Play framework ES6->ES5 transpiler?

蹲街弑〆低调 提交于 2019-12-12 20:20:02
问题 Is there an easy way to set up Play Framework (2.4.x, the current stable version) to transpile ES6 assets to ES5 on the fly, similar to how you can set it up to use the closure compiler to minify Javascript? 回答1: sbt-web is the place to go when you need anything related to build client side assets in Playframework projects. There is a plugin listed that maybe can solve your problem: sbt-traceur. This plugin uses traceur-compiler to transpile ES6 assets to ES5. Edit : Apparently, there is also

How does mocha / babel transpile my test code on the fly?

旧时模样 提交于 2019-12-12 14:26:10
问题 My question is not about why something is not working, but rather why it is. Yes. I have a small nodeJS command line tool, which contains features that nodeJS does not yet support out of the box, most notably: import statements String.includes() . Thus for delivery(build) I transpile+bundle my source code (using parcel, just like webpack). As a positive wonder, all (but one) of my mocha tests run directly against my classes, not the bundle. Still, they work! Including many import statements.

After recent update vs code transpiling stopped working: tsc is not recognized as internal or external command

老子叫甜甜 提交于 2019-12-12 02:42:13
问题 The title says all, anyway, after update yesterday visual code studio is not transpiling ts files to js saying tsc is not recognized asa external or internal command 回答1: In your settings, set the location of the typescript sdk The setting can now take absolute and relative paths. I have typescript installed locally in my projects, so my stting looks like { "typescript.tsdk": "./node_modules/typescript/lib" } I use VSCode 0.10.5 and TS 1.7.5 which are the latest at time of writing 来源: https:/