In Visual Studio Code if you install the typings(the new tsd) it enables intellisense for the given typing. For example if you execute
$ typings install node --ambient --save
in the base folder of your project, you get intellisense for node.
Is there a way to achieve the same with Atom, or it's not supported?
Atom doesn't support Typescript intellisense out of the box, but it has a great plugin system.
Install the Atom Typescript plugin. It provides many features for working with Typescript, including intellisense.
Related
I use scss in my project and want to use bootstrap.scss so I can define a single class inheriting multiple bootstrap classes e.g.
.myButtonClass { #col-xs-12; #col-sm-6 }
So I can replace class="col-xs-12 col-sm-6" with class="myButtonClass" as I have many buttons that need to be the same. I have installed the yarn extension in VS2017 and can see the Restore Packages (yarn) in my GUI, but yarn is not found in the VS command prompt. So I cannot install the bootstrap scss package.
This is a .Net Framework WebAPI project, not node.js project. There seems to be no examples of how to use js packages in a vanilla .Net Framework WebAPI project.
Or is it simply that I cannot use these style of JS packages?
If you want to use npm on Windows, this is what you need:
Download and install Node (you might need a restart).
Make sure that node is installed by opening a command prompt and running node -v (should print a version number).
Run npm -v and see if it's installed (should be).
Now in the context of an ASP.NET MVC project. The newer versions of Visual Studio (I believe 2017) support npm - you can just open the package.json and add dependencies (it will download them behind the scenes).
In case you're using an old version, you can simply open a command prompt, navigate to your project and use npm install from there.
Simply run npm install bootstrap-scss#4.3.1
Our team is starting to use LESS to write CSS. I am using atom.io and there is a plugin to auto-compile LESS to CSS on save. (Link to plugin) However, some team member prefer to use sublime. While there are also similar plugin for sublime, it requires npm for installation. Our team mainly use PHP with composer for package management, so installing npm just for a plugin seems a bit overkill. Is there any other way to do LESS auto-compile on save with sublime?
Not that I know... :(
There is a python library that compiles less to css. (sublime plugin are written in python) though
So, all you've got to do is: write this plugin using lesspy
If you are a bit patient, I am trying to make this plugin, it shouldn't be to hard, I'll keep you in touch.
Matt
EDIT: Here's the plugin: st-py-less. Follow the (simple) instructions to install it. Only working with Sublime Text 3.
They could probably use SublimeOnSaveBuild
But npm and Composer aren't really comparable here. Composer manages a project's dependencies, npm provides easy access to hundreds of thousands of community-maintained packages. Using Composer isn't a reason to not install npm.
And the package you install when you "install npm" is under 14MB. It also comes included with Node.js. The "Installation Requirements" for sublime-less2css, by listing "install node" and "install npm" as two separate steps are misleading, and the provided links aren't that helpful. Here's the official documentation for Installing Node.js and updating npm
This is getting beyond the scope of your question, but to have a single team-wide editor-agnostic setup for automatically compiling LESS to CSS you could use Gulp. If you aren't familiar with Gulp, follow CSS-Tricks' Gulp for Beginners from the start up through the "Watching Sass files for changes" step. (Note that the guide teaches you how to use gulp-sass to compile Sass to CSS; in your case you'd just use gulp-less instead.)
I've finally started developing locally and have installed Roots.io for WP builds. Bower, gulp, node, it's all great. I've used Bower to install wow.js and it's there, but the dependency is animate.css. Is there a way to install animate.css via Bower/Homebrew/etc?
On the animate.css Github I don't see a simple way to include it in the Roots build. I've tried to manually include in which hasn't worked either, hence looking for the ideal/clean solution to the problem.
Thank you!
When installing dependancies via bower (or any package manager really) that project should include a manifest (bower.json) that lists it's own dependancies. E.g. The bower.json in wow.js should include a reference to animate.css. However if it does not you can include it as any other dependancy:
bower install animate-css --save
Then run you build process again. In this case:
gulp
With the recent release of Polymer 1.0 I was hoping to use the Paper Elements in a ASP.NET MVC/Microsoft Stack, or at least check them out.
I have used nuget in the Visual Studio package manager to attempt to install polymer:
PM> Install-Package polymer
Installing 'polymer 1.0.0'.
Successfully installed 'polymer 1.0.0'.
Adding 'polymer 1.0.0' to Eqs.Mvc.Web.
Successfully added 'polymer 1.0.0' to Eqs.Mvc.Web.
PM> Install-Package paper-elements
...long long list of dependency imports
When I try to import paper-elements.html I notice that in paper-elements.html there are missing files and files in the wrong locations.
For example in paper-elements.html:
<link rel="import" href="../polymer/polymer.html">
is actually located in the project at the scripts root:
<link rel="import" href="../polymer.html">
I get a lot of 404 errors. Did I import the packages incorrectly?
Don't use NuGet to get polymer elements (as it's not maintained by Google so it's not up-to-date), use Bower instead.
Prior to ASP.NET 5
Go to NuGet's Package Management Console and install Bower.
PM> Install-Package Bower
Navigate to your web project folder in File Explorer and then Shift + Right Click anywhere to select Open command window here in the context menu.
Inside the command prompt, run the following commands one after another.
bower init
bower install --save Polymer/polymer
bower install --save PolymerElements/paper-elements
Whenever there's a new version, run the following command.
bower update.
ASP.NET 5
It's a lot simpler in ASP.NET 5, since the project already adds a bower.json file for you. So you just need to add the dependencies there -
{
"name": "Portal",
"private": true,
"dependencies": {
"polymer": "^1.1.3",
"paper-elements": "PolymerElements/paper-elements#^1.0.3",
...
}
Once all dependencies are added, go to your Visual Studio web project and enable Show All Files. You will see a folder called bower_components, just include it into your project.
Have a look at this question I asked too.
Alternatively my company, FrostAura Consolidated now manages a package that you might find useful. This package scaffolds all core and paper components with a demo of how to create a custom web component with automated documentation and unit testing. Check it out at https://www.nuget.org/packages/FrostAura.Dynamics.Polymer.Kickstart/
you may need run Set-ExecutionPolicy Unrestricted in windows powershell to allow Bower install scripts to run...
I am using Aptana 3.4.2 and want to get Symfony2-plugin into Aptana. But if I try to install the plugin it says that org.eclipse.emf.ecore.feature.group is missing. So if I try to install this package (http://download.eclipse.org/technology/dltk/updates/) it will say that something else is missing.
So I need to install this Symfony2-plugin. How can I get it into Aptana?
There doesn't seem to be any official support for Symfony 2 on Aptana, however this might be of help; you can use the aptana plugin on top of eclipse; however that also has a couple of incompatibilities. Probably worth considering an IDE such as NetBeans or PHPStorm, or using Aptana solely as an editor.