phpstorm Using swig Template Engine? - node.js

how to install or configure SWIG Template Engine in JetBrains PhpStorm 8.0.2?
I have:
"PhpStorm": 8.0.2
"node.js" v0.10.36
"express": 4.10.6
"swig": 1.4.2
How do I make swig template settings for my PhpStorm?

May be this will help: I added in Settings -> File Types -> Twig: *.html - and now works with HTML files as Twig files (Twig and Swig are the same in this context)
Update:
configured my swig files with extension *.s.html as Twig files, now I use Swig and HTML files without any issues.

WebStorm has no proper support for Django-like templates ATM.
https://youtrack.jetbrains.com/issue/WEB-7814 -- watch this ticket (star/vote/comment) to get notified on progress.

Related

HTML, SCSS not compiled on save - Angular 11.0.2

I upgraded my app to Angular cli ^11.0.2 recently, from then my HTML and SCSS changes are not compiled on save even when ng serve is running. I have to save the respective ts file to get the html changes compile. I saw a related issue on Github with no proper solution(Here). Is this because of ivy engine ? or Did I miss any update on any particular npm package?
This seemed to happen due to default Ivy engine configuration with Angular 11.
I disabled the enableIvy flag in tsconfig.json file like this :
"angularCompilerOptions": { "enableIvy": false, "allowEmptyCodegenFiles": true }
A friend suggested that AOT with ivy configuration must be avoided in dev environment to avoid this kind of issues.

Requirejs issue in OroCRM 4.1

I have installed OroCRM 4.1 version.The requirejs bundle doesn't seem to have loaded. I checked the bundles folder and i do not see the ororequirejs folder there, which was present in the previous version (4.0). Because of this the custom extension i have that uses require to include js files are failing. I tried php bin/console oro:requirejs:build command but its failing with the messsage There are no commands defined in the "oro:requirejs" namespace. Can someone help me fix this issue?
RequireJsBundle is not available in OroCRM 4.1, as an application migrated to the webpack build.
Please, follow the migration guide referenced from CHANGELOG.md:
https://github.com/oroinc/platform/blob/master/CHANGELOG.md#requirejsbundle

Package web static site to exe nodejs

I have static site with some file below:
index.html
bundle.js
images/some file
some file font, and svg
Problem: I want to build an exe file to serve above file which should run on window.
When install exe file, program will run static site and other component can connect
Please suggest me a for me tool
You may build a node application using express.js web server, then you can compile the code and assets into an exe file using the the pkg module
Using the pkg module you can bundle your node application to run on windows, mac or linux.
To package your statics files with pkg you need to add assets directory to the package.json as mentioned in the document
"pkg": {
"assets": "your-assets-dir/**/*"
}
Please follow these links,
pkg module
expressjs
If you want to make an installer for windows you may use, inno script studio
You can use Electron. It can serve your static site in a chrome window. But as a Desktop app. You can build this for cross platform and you can also make installer file.

PhpStorm + JSCS + TWIG with JavaScript. JSCS doesn't work

JSCS is installed correctly and I have tested it with a .js file.
When I am editing a .html.twig or .js.twig JSCS doesn't kick in.
PhpStorm detects that it's a HTML and JS file.
Is it possible for JSCS to work in PhpStorm when editing twig files?
Thanks
JSCS supports --extract option that allows linting embedded javascript (http://jscs.info/overview). But:
only html format is supported (JavaScript inside <script> is checked)
PHPStorm doesn't currently support this option, as it doesn't work reliably (see https://youtrack.jetbrains.com/issue/WEB-19491#comment=27-1307471)

How do you set up Jade file watcher in Webstorm?

I set up a Jade file watcher in the following way in WebStorm. However it does not produces any HTML files.
How is it possible to convert Jade file to HTML file with WebStorm 9.0.3?
You have specified a wrong path to Jade in a Program field.
Do you have Jade installed globally? Please run 'npm install jade -g', then test jade in your system terminal by running 'jade <your jade file>.jade'. Then specify a path to installed jade script as a 'Program' in your file watcher

Resources