I have some syntax errors in my Jade templates. Are there any tools that can help me debug?
Found it. Use jade [fileName].jade to debug your Jade template.
You can install the Jade tool with npm install jade --global.
Adding this here because I still had to google.
npm i -g pug-lint
NOTE: jade has changed its name to pug
web storm is a better tool for jade development ,it idents and corrects jade files
Related
What steps will reproduce the issue?
Create Angular project in IntelliJ via angular-cli (version 1.5)
Open the same project in WebStorm; open any of the HTML files.
It will throw TSLINT error
What Angular and Typescript version do you use? Looks similar to WEB-30045, caused by lack of TypeScript 2.6 support in Angular (https://github.com/angular/angular/issues/20146)
Another related problem is https://github.com/Microsoft/TypeScript/issues/18322
WebStorm TypeScript version should match the one used by Angular. The version of TypeScript used by Angular is set in
package.json
To do so, select
Prefereces... > Languages & Frameworks > TypeScript
and then, from the TypeScript dropdown, select the node_modules TypeScript installation instead of "Bundled".
Click OK and restart WebStorm.
Is there a way I can get autocomplete on VS Code for webdriverio?
Other code editors like Intellij provide something like Settings -> Preferences -> Languages & Frameworks -> JavaScript -> Libraries
From there we can add a directory with webdriverio commands
How can I do similar thing with VS Code?
my understanding is, vscode is built with typescript and by default it does not support autoComplete(Intellisense) on a package that is built with javascript. So all the js package creators would provide an #types file. These #types file help vscode to find all the function definitions, object properties. etc., etc., of your JS package and show as suggestions. Which in case here is webdriverio package.
So adding a #types dependency that is related to your JS package will mostly fix the issue.
i.e.,
npm install #types/webdriverio --save-dev
After adding the package, i started getting the browser object suggestions.
All the above works fine for v4 version of WDIO.
If you are using v5 version: Then as per their official documentation we need to create a jsconfig.json file on the root directory.
Above answer worked well :
you need to install below dependency :
if you are using webdriverio v4 (for cucumber BDD ) use below
npm install #types/webdriverio#4 --save-dev
or use :
npm install #types/webdriverio --save-dev
VSCode Intellisense
Using #types/webdriverio is not suggested by webdriverio and it is now deprecated:
npm WARN deprecated #types/webdriverio#5.0.0: This is a stub types definition. webdriverio provides its own type definitions, so you do not need this installed.
I would suggest to follow the official documentation by WebDriverIO here:
Working on a larger typescript project we decided to move the code to a monorepo with yarn workspaces.
We use webpack to build and bundle and everything works well (especially the linking between local modules/packages).
Since yarn workspaces will store most of the node_modules in the mono repo's root folder, the IDE (IntelliJ as well as VSCode) have problems resolving the imports to any node_modules when coding inside a "inner" project (so called "package" of a monorepo).
The strange thing is that imports are not known but on the other hand most of the time you can navigate to the correct source / definition within the IDEs for the same import if you write it down manually.
We have tried to tell IntelliJ to look into another folder for node_modules, but still not satisfying.
Please share your experience with yarn workspaces / monorepo (e.g. lerna) and how you develop the code living in these monorepos.
Which IDE do you use?
Did you add any special configurations to the IDE and/or package.json, tsconfig.json?
https://github.com/Izhaki/mono.ts
It uses yarn workspaces and marry well with VSCode. I hope the README is clear enough.
Basically, use two (parallel) typescript configuration trees:
Pre-build - uses aliases (for VSCode, tests, webpack, etc).
Build - uses typescript 3 project references for publishing essentially.
IDEA doesn't provide any support for Yarn workspaces; if you miss it, please follow WEB-29250 and linked tickets for updates.
You can try adding path mappings to your tsconfig.json - see https://intellij-support.jetbrains.com/hc/en-us/community/posts/207656825/comments/115000529564
Upodate as of 2018.1.1 IntelliJ now supports yarn workspaces so if you use this there should not be a problem.
https://blog.jetbrains.com/webstorm/2018/04/webstorm-2018-1-1/
Please share your experience with yarn workspaces / monorepo (e.g. lerna) and how you develop the code living in these monorepos.
Which IDE do you use?
Since you are asking. I basically ran into the same issues as you did. One solution I was looking into was disable hoisting node modules as described here. Unfortunately it seems it is not yet in the stable release.
What I ended up was ditiching workspaces for now until they fix either the IDE or release the nohoist option. Instead I am using lerna for now. It is less convenient but it does not hoist so that both the build tools and the IDE are satisfied.
Oh, I am also using IntelliJ (ultimate)
I've just followed the CodeceptJS Quickstart and opened first_test.js in the PhpStorm IDE (equivalent to WebStorm, IntelliJ, etc.).
For all the built-in functions, I'm getting "Unresolved function or method …":
I also don't get any autocompletion on I.
I've tried the following.
Looked for a CodeceptJS plugin. Didn't find any.
Enabled codeceptjs/node_modules in Settings -> Languages & Frameworks -> JavaScript -> Libraries.
Set JavaScript language version to ECMAScript 6.
Enabled the Node.js Core library.
Restarted PhpStorm.
Please run 'npm install codeceptjs'.
I had to follow the steps outlined in https://codecept.io/typescript/ to fully enable CodeceptJS in PHPStorm.
Steps
npm install codeceptjs typescript ts-node
Add require('ts-node/register') as first line in my codecept.conf.js file
Create a tsconfig.json in my project root folder
Run npx codeceptjs def to create the default steps.d.ts file
After that, autocompletion worked in my tests :)
I know it's very new, but I'd like to create a prototype using aurelia with Visual Studio. VS support is in the hopper, but the current documentation is based on node.js et al. Based on the existing documentation, I haven't a clue. I'm hoping I can get some guidance...
Not sure this is what you are looking for, but you can check out this github Aurelia project, using Typescript and VS 2013. It still makes use of gulp and jspm but with the VS Taskrunner extension.
https://github.com/AshleyGrant/aspnet-skeleton-navigation
There is now a default project supporting VS 2015:
https://github.com/aurelia/skeleton-navigation
There are several sample Aurelia Visual Studio solutions contained here: aurelia typescript samples
These samples use a javascript bundle (also created as part of the repo), so no gulp is needed.
Warning - these are samples and are not polished.
Download and Install Node.js
Then create a Visual Studio project and on the toplevel of that folder execute for>
Install Gulp for build automation
npm install -g gulp
Install JSPM as client-side package manager
npm install -g jspm
Install Git for Windows and configure Github
jspm registry config github
Generate a skeleton project by using Yeoman
npm install -g yo generator-aurelia
then enter
yo aurelia
Install Plugins needed by gulp
npm install
Install JSPM dependencies of the package
manifest
jspm install -y
Gulp Watch to run
gulp watch
all from this tutorial> Tutaurelia.net
Visual Studio Code would work well with Aurelia, I had a play around with the demo and the skeleton app and it worked pretty well.
You can try this https://github.com/BoudewijnvanVeen/Aurelia-Typescript-Skeleton-4VS
Lets you run an Aurelia application using Visual Studio with Typescript debugging.doesnt use Gulp
I tried to run Aurelia Visual Studio Project without Nodejs .
https://github.com/cmichaelgraham/aurelia-typescript#just-use-it---visual-studio-using-requirejs-amd-module-loader
But it not able to find "http://lcoalhost:6260/aurelia/core-js/client/core.js".
that means we need make sure that NodeJs installed on server with this command
run node r.js -o name=aurelia-bundle-manifest baseUrl=. mainConfigFile=main-config.js out=aurelia-bundle.min.js
Need to create bundling into server like
https://github.com/cmichaelgraham/aurelia-typescript#bundling