gulp-typescript | A TypeScript compiler for gulp with incremental compilation support | Frontend Framework library
kandi X-RAY | gulp-typescript Summary
kandi X-RAY | gulp-typescript Summary
gulp-typescript can be imported using const ts = require('gulp-typescript');. It provides the following functions:. Both ts(..) and tsProject() provide sub-streams that only contain the JavaScript or declaration files. An example is shown later in the readme.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Setup the project .
- Creates the project .
- Create a TypeScript error
- Runs a test task
- Creates a gulp reporter .
- The default finish handler function .
- Retrieving source files .
- Compile a function .
- Get the default transformers .
- Normalize settings .
gulp-typescript Key Features
gulp-typescript Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-typescript
QUESTION
I have just upgraded to gulp4 and now I am getting this error. From reading reports on this error I need to change the gulp.task("prod", function (callback) {
and add this gulp.series
. Is that correct?
Error
...ANSWER
Answered 2022-Apr-08 at 20:05It seems that runSequence
was designed for Gulp 3. In Gulp 4, you can use the built-in gulp.series
instead.
For your "prod" task:
QUESTION
I am modifying an existing library so it can be imported in typescript. I've boiled it down to a Minimal working example
The requirements- To remain backwards compatible, the library needs to be importable with a simple
It works. So far so good.
In another typescript projectNext, I created a simple typescript project that utilizes my library.
File structure:
...
ANSWER
Answered 2022-Feb-07 at 14:05I've figured it out.
In my lib.ts
I had to change the way I export my class:
QUESTION
My application relies on an internal company TS library that sees infrequent edits. I've just updated it and now one of the gulp tasks used to build it will fail. All other tasks will work in isolation or used in sequence/parallel but the one that uses the @rollup/stream
package causes gulp to hang after declaring itself finished. This was discovered as the build automation eventually killed the build as it had paused for 2 hours waiting for the gulp tasks to complete.
I had to update our internal library as it was failing the build due to the following issue.
...ANSWER
Answered 2021-Sep-07 at 11:44I was stuck between 2 different errors:
- In
tsconfig.json
setting"target" : "ES6"
would break by never quitting the gulp task. - In
tsconfig.json
setting to"target" : "ES5"
would complain about a missing__spreadArray
function intslib
.
Here's how I ended up fixing this:
- Updating all the dev dependencies to latest versions.
- Manually
tslib
usingnpm i --save-dev tslib
to ensure there was a latest version available. Because I updated the TS version in step 1. which should include the latesttslib
this is likely unnecessary...but it felt good to include it manually anyway. - I found a suggestion to use a fork of
@rollup/plugin-typescript
named rollup-plugin-typescript2 to make it work. This itself is a strange issue as supposedly that fork only exists to add error logging in the console to tell you about any TS errors. But now the original project also outputs errors and yet doesn't work with gulp for us (or maybe just me) anymore. The fork is maintained and popular on npm so I'm not too concerned but I'd still prefer to to be on the "official" package. Obviously I changed mygulpfile.js
to use this new package instead but it's a drop in replacement as far as API. - Also added the paths value to tsconfig.json to point to the installed
tslib
node module which I manually checked to make sure it had the__spreadArray
function we needed. I found this fix in this answer while I was related issues for clues
Some combination of all the above fixed it. Likely 3 and 4 were the main fixes.
The following is the updated versions of my tsconfig.json
and the relevant part of my package.json
in case it's useful to any future reader.
QUESTION
I have a website served by express
running on AWS Elastic Beanstalk, Node.js 14. Login and everything works fine on Chrome, but on Firefox I get window.openDatabase is not a function
and on Safari I get web sql is deprecated
when I try to login. Website: https://www.portapay.xyz/login. I am currently not building for production; how I build: ng build --configuration development
. I have made sure that all of my browsers are up to date and have the latest version. None of the code I wrote uses window.openDatabase
or executeSql
. I only connect to a MongoDB with Kinvey's SDK. I do not use Cordova.
browserlistrc
...ANSWER
Answered 2021-Aug-23 at 13:40Kinvey support replied to me, apparently, you have to set your storage
type when initializing KinveyModule
in the imports
of app.module.ts
. WebSQL
is the current default if it is not set. Kinvey Documentation.
QUESTION
gulpfile.js:
...ANSWER
Answered 2021-Jun-26 at 08:51After searching a bit more I found a somewhat feasible solution:
Firstly, you need to do npm i gulp-strip-import-export
Secondly, rewrite the tsWorkload
as follows:
QUESTION
Hey guys this question isn't gone through with this similar,
- Build: Cannot use JSX unless the '--jsx' flag is provided
- Cannot use JSX unless the '--jsx' flag is provided
tried their solution but not worked for me.
Now my situation tsconfig.js
...ANSWER
Answered 2020-Oct-16 at 11:07I found the answer after a lot of suffering :)
and the solution is, rather than a passing whole tsConfig.js to the pipe of gulp task. I passed only important configuration in it. like, build task in gulfile
gulfile.js before
QUESTION
Hello I have a project that uses gulp and the gulpfile.js suddenly has stop working despite not being changed.
my output reads
cmd.exe /c gulp --tasks-simple The system cannot find the path specified.
gulpfile.js
...ANSWER
Answered 2020-Sep-21 at 18:50After spending more time than I care to admit debugging this I finally figured it out. It ended up being that I had to move my $(PATH) up under visual studio locations of external tools. I figured it out based on this answer over here
QUESTION
I'm migrating my project from Karma-Jasmine to Jest. But I'm getting the following error. It seems I'm missing some configuration.
The error points out to constructor(@Inject('env') env: IEnvironment,
line from the service which is imported in the app.component.ts file.
Error is as below
...ANSWER
Answered 2020-May-21 at 09:16Adding these plugins in babel.config solved the issue for me
QUESTION
I am new to typescript and trying to use vue-router in my project.
I am getting following errors:
source\app\main.ts(3,3): error TS2769: No overload matches this call.
Overload 1 of 3, '(options?: ThisTypedComponentOptionsWithArrayProps): Vue', gave the following error. Argument of type '{ router: any; }' is not assignable to parameter of type 'ThisTypedComponentOptionsWithArrayProps'. Object literal may only specify known properties, and 'router' does not exist in type 'ThisTypedComponentOptionsWithArrayProps'.
Overload 2 of 3, '(options?: ThisTypedComponentOptionsWithRecordProps): Vue', gave the following error. Argument of type '{ router: any; }' is not assignable to parameter of type 'ThisTypedComponentOptionsWithRecordProps'. Object literal may only specify known properties, and 'router' does not exist in type 'ThisTypedComponentOptionsWithRecordProps'.
Overload 3 of 3, '(options?: ComponentOptions, DefaultMethods, DefaultComputed, PropsDefinition>, Record<...>>): Vue', gave the following error. Argument of type '{ router: any; }' is not assignable to parameter of type 'ComponentOptions, DefaultMethods, DefaultComputed, PropsDefinition>, Record<...>>'. Object literal may only specify known properties, and 'router' does not exist in type 'ComponentOptions, DefaultMethods, DefaultComputed, PropsDefinition>, Record<...>>'.
source\app\main.ts(3,15): error TS2304: Cannot find name 'VueRouter'.
main.ts
...ANSWER
Answered 2020-May-10 at 01:52The mess of type errors might be obscuring the real one:
source\app\main.ts(3,15): error TS2304: Cannot find name 'VueRouter'.
Looks to me like VueRouter did not import correctly.
QUESTION
I have project with nodejs loopback 3.x version and I am recently turned dev in nodejs. I have written the models, server aspects (server.js, server/root.js) etc. Following are the dependencies:
...ANSWER
Answered 2020-May-09 at 19:51it was a silly miss from my part. Once you create the app and then in boot process you need to start the application.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-typescript
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page