tsify

How to make using tsify with the AMD module system result in a bundle file, not in separate files or a file that uses the not-found `define`?

只谈情不闲聊 提交于 2020-04-17 22:39:31
问题 I do not care which module system I use if I am able to use the ES6 TypeScript import/export syntax. Why does AMD put just main.ts in the bundle.js file, while UMD puts all the needed modules in it? How can I use AMD (which I understood that is good for the browsers) so that the bundle.js file contains all the needed code? I just change between AMD and UMD and the file size changes accordingly: AMD: 1879 bytes written to js/bundle.js (0.06 seconds) at 14:57:28 UMD: 164682 bytes written to js

how to set up grunt + browserify + tsify + babelify?

我与影子孤独终老i 提交于 2020-01-04 06:09:27
问题 I am struggling to set up grunt + browserify + tsify + babelify (with debug). The below gruntfile setting does compile typescript, but no babel transpling is happening. Can anybody let me know how to do this? (i might need to use gulp to do this??) browserify: { main: { src: 'app/scripts/main.ts', dest: 'app/scripts/bundle.js', }, options: { browserifyOptions: { plugin: [['tsify']], transform: [['babelify', {presets: ['es2015'], extensions: ['.ts']}]], debug: true } } } tsconfig.json has

Watchify + tsify + Visual Studio == stale code

为君一笑 提交于 2019-12-24 10:57:48
问题 We are running a Gulp task inside of Visual Studio (2015) to execute watchify. Works great some of the time, but sometimes watchify builds old code. Repro: Modify a .ts file in Visual Studio Save In the Task Runner Explorer, watch for watchify output, indicating that it ran (it does) Refresh Chrome/clear cache (I use the "disable caching while debug window is open" option in Chrome) View source in the Chrome Debugger (a little less than half the time, it will be the old code) Any idea what I

Why doesn't this problemMatcher in VS code work?

你说的曾经没有我的故事 提交于 2019-12-23 10:18:11
问题 Why doesnt my problemMatcher work? I'm pretty sure about the regex, but it doesn't report any problems, even there are some on stdout... // the matcher "problemMatcher": { "owner": "typescript", "fileLocation": ["relative", "${workspaceRoot}"], "pattern": { "regexp": "^TypeScript (warning|error): (.*)\\((\\d+),(\\d+)\\): (.*)$", "severity": 1, "file": 2, "line": 3, "column": 4, "message": 5 } } //the browserify/tsify pipeline browserify().add('main.ts') .plugin(tsify, { noImplicitAny: false,

Enable “Experimental support for decorators” with “tsify” in karma

我的梦境 提交于 2019-12-11 23:47:24
问题 I'm using tsify, a plugin for browserify, to transpile my code during karma unit tests. I get this sort of erro when I run my tests: TypeScript error: src/app/emailLogin/emailLogin.component.ts(14,14): Error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning. How do enable experimentalDecorators in browserify/tsify, which are specified in my karma.config.js Here is my karma

How to set the module name or path used in require() calls of a module in browserify?

喜欢而已 提交于 2019-12-11 05:56:19
问题 I am using browserify to move a reusable typescript module into the browser using gulp. gulp.task("default", function(){ return browserify({ basedir: '.', debug: true, require: ['./src/common/common.ts'], fullPaths: false, cache: {}, packageCache: {} }).plugin(tsify) .bundle() .pipe(source('common.js')) .pipe(gulp.dest("dist")); }); To my surprise I need to include the resulting common.js file via require("c:\\Users\\Luz\\Desktop\\tstest\\client\\src\\common\\common.ts"); In typescript or in