Questions tagged [tsify]

Browserify plugin for compiling TypeScript

tsify is a node.js Browserify plugin for compiling TypeScript. Here you can find the official GitHub and npm pages.

37 questions
1
vote
0 answers

Registering Angular 4 Components in Modules based on parent folder (instead of individually)

I recently started migrarting a project away from 1.6 to the new Angular 4 (as well of moving to Typescript). I have a configuration of gulp + watchify/browserify + tisfy which upon changes, automatically add them to a single bundle, which is…
Nadav96
  • 1,274
  • 1
  • 17
  • 30
1
vote
1 answer

How to use Browserify + Watchify + Tsify + Gulp on multiple entry files and get multiple output files quickly

I have been trying to use Gulp + Browserify + Tsify to transpile 4 files plus their libraries into 4 js files which is currently taking 4 or 5 seconds. In my current build script, watchify triggers an update on a change of any ts file for all 4 of…
RakTom
  • 21
  • 3
1
vote
1 answer

tsify - Only read browserify files

I am using tsify to build my TypeScript files. However, currently it seems tsify is reading all of the TypeScript files in my source instead of just the files included in my main TypeScript file (and subsequently imported files). How do I limit…
dawsonc623
  • 1,841
  • 2
  • 16
  • 26
1
vote
1 answer

Separate vendor and app bundles with angular2 and browserify - Import error

I'm working on an angular2 app that I want to build using gulp and browserify. Using tsify I managed to output a standalone bundle.js, at a glorious size of 1.4M after minification. What I would like to have is two separate bundle files: one for…
ldirer
  • 6,606
  • 3
  • 24
  • 30
1
vote
0 answers

How can I add a typed property to the window object in a module?

I currently have a file main.ts with code as follows: import Game from './game'; declare global { interface Window { game: Game; throttleScreenResizeRender: number; resizeTimeout: number; } } …
Taro
  • 1,432
  • 1
  • 16
  • 15
1
vote
1 answer

Angular, Karma, tsify, woes

I'm trying to set up tests, where we are using Angular 1.5, TSify, and Karma. I'm very, close, but I'm running into an issue that I haven't quite got right: I'm following the setup described here: https://github.com/cmlenz/tsify-test (this example…
JMarsch
  • 21,484
  • 15
  • 77
  • 125
1
vote
1 answer

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

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:…
Luz
  • 494
  • 3
  • 12
1
vote
1 answer

Namespace is undefined after compile

I am writing a little game engine in typescript, and when I compile it to javascript, I get an error when running the javascript. It compiles without error too. My main entry file (main.ts) starts with these two…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
1
vote
1 answer

Browserify, Babel and file extensions

I'm using Browserify, Babel, gulp and noticed a strange behaviour. Let's say I have a file named './lib.js'. Is ES6, I should be able to use both syntaxes: import lib from "./lib.js" import lib from "./lib" However the first syntax always works,…
erwan
  • 1,285
  • 5
  • 14
  • 28
1
vote
1 answer

Browserify global variable is not found in the browser

I am writing a script in TypeScript, and when I use browserify, to convert it, my master variable is not found in the browser. main.ts import { GameSmart } from './GameSmart'; const gamesmart = new GameSmart(); gulpfile.js /* require's snipped…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
1
vote
1 answer

TypeScript + Browserify + SourceMaps in Gulp?

Hi this issue is stumping me. I want to know if, after compiling from TS and using Browserify, I can get my SourceMaps (from gulp-sourcemaps) to point all the way back to my TS files. Currently I have it working so that I use tsify to compile the TS…
Caleb
  • 328
  • 2
  • 10
1
vote
1 answer

Is it possible to get "paths" functionality with tsify similar to what vanilla browserify has?

In vanilla browserify you can specify "paths" option to set directories where browserify looks for "required" files. browserify({paths: ["./source/App"]}) When using tsify to compile TypeScript, this option seems to be ignored. The reason for using…
Jacob Poul Richardt
  • 3,145
  • 1
  • 26
  • 29
0
votes
1 answer

How can I make sense out of all these guides for migrating AngularJS 1.x to Typescript?

I've been trying to follow several guides all week on integrating Typescript into my AngularJS 1.6.2. application. Everytime I get confused half way through. Right now, I'm on the fourth one in this…
gib65
  • 1,709
  • 3
  • 24
  • 58
0
votes
1 answer

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`?

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…
silviubogan
  • 3,343
  • 3
  • 31
  • 57
0
votes
1 answer

Cannot use typescript class from other local typescript module using browserify

I have a common npm module containing TypeScript which is an node module providing some classes and functionality. This module is packaged via browserify + tsify and also exports the declaration files and built with gulp. I have another npm module…
Sheldan
  • 73
  • 11