I want to create a JavaScript API project in Visual Studio 2013/2015/etc. I don't want any bin/obj/dll/framework as it will be pure JS. Actually, it will be using Typescript, so I do need it to be in a web project so I can get Typescript compilation, etc.
Is there any existing project template which would give me just a plain old web application with no framework attached?
Yes, at least in VS 2013 there is. New Project->Templates->TypeScript->HTML Application with TypeScript. Then, in order to avoid generating a useless dll, you have to turn off the build of the project - go to the solution Configuration Manager and uncheck Build for the project.
Related
, i am creating a the front end part of a project that i am doing and i have some questions about deploying a vanilla js app.
i am using webcomponentes with the shadow dom to create componentes for my project but since i am only using vanilla js - html -css without frameworks i wanna know if is possible to configure a image with docker and then upload that image to a custom server and deploy it then ? i dont know if you could give me some tips or some documentation on how to do the deploy process of a vanilla app, or how to do the deploy using docker with kubernetes.
Also wanna know if using webpack with babel loader can be of any help in terms of performance if i am using only vanilla js with webcomponents.
thanks in advance
We are planning to switch new technologies like react for my CMS project which is under development for 10 years.
Until now everything was simple and plain on the front end.
First include jquery.js then if necessary include the components and third party scripts, then code and dance with the DOM.
But now while trying to jump into a higher level of technology and different approach, things can easily get very complicated for me.
After spending more than 10 hours with React documents and tutorials I have a very good understanding about what it is and how it works.
But I realized that I am very unfamiliar with some popular concepts. I never used node.js, never used npm, babel, webpack, and may other many "new" things I have seen every where. I am face to face with these tools because of React and I am convinced that these are the inevitable for modern front end development.
Now the question
Our CMS runs on PHP and depends on MooTools heavily at the front end. Instead of a complete rewrite of a 10 years old CMS I just want to try new technologies partially for some cases. Decided to starting with React.
For the case I want to integrate ag-Grid to React also.
What I did not understand is that how to bring all these tools together.
I won't be able to use the simply include js way of react because of ag-Grid.
In the examples the code written has some JSX. Which means that we write JSX and run it translated for the browser to test if it is ok.
Each time before testing do I need to translate these files?
And more over if the files are translated does debugging become very
complicated?
Can babel make it on the run time? If yes is it a good practice.
There are lots of file in the node_modules folder. Which of them
should I include for production?
All sources on the net are very theoretical and assumes a knowledge. Need some guidance for best practices.
There are lots of questions and not a single step by step guide from beginning to production.
JSX is an extension over spec-compliant JavaScript. It is syntactic sugar for React.createElement(...) and is optional in React development.
React can be written in plain ES5:
React.createElement("div", { foo: "foo" });
Instead of JSX:
<div foo="foo" />
Or with helper functions like h that achieve the same goal, e.g. react-hyperscript.
The fact that there is PHP backend application doesn't prevent from developing React frontend application with JSX. This may require to configure React project to not use built-in Express web server and build client-side application to custom location, i.e. existing app's public folder. In case create-react-app is used, this may require to eject the project).
Each time before testing do I need to translate these files?
They should be transpiled to plain JavaScript (ES5 if it targets older browsers). They can be translated on every change in source files when client-side project runs in watch mode (conventionally npm start).
And more over if the files are translated does debugging become very
complicated?
This is what source maps are for.
Can babel make it on the run time? If yes is it a good practice.
It's possible to use Babel at runtime, and this isn't a good practice, even in development environment.
There are lots of file in the node_modules folder. Which of them
should I include for production?
The contents of node_modules doesn't matter. Almost all of them are development dependencies that are needed to build client-side app. This is the task for a bundler, which is Webpack in create-react-app template. It builds project dependencies to plain JS in dist folder.
I am currently struggling to find a basic project template for a simple angular app that I am building in VS 2017. This app will consist of only html/js/typescript files, npm's package.json file and a gulpfile. All templates I'm finding are for class libraries or include other aspects of server side based projects that I don't want or need in my project.
Is there a way to make a basic web project in VS 2017? I'd like to stick with Visual Studio since it is the IDE we use for our other projects.
All help is appreciated.
If you are going to work on Angular I will suggest you to use visual studio code. To create a basic structure of an angular app use angular-cli.
First you need to install angular cli. Follow this link to install cli : https://github.com/angular/angular-cli
Hope it will help
The easiest way to create a new Angular project is to use Angular CLI it builds the skeleton of the project including build/ transpilation tools. It will create a lot of the boiler-plate code for you too, e.g. adding a new module can be done from the cli.
I'd suggest looking at other IDEs such as Sublime Text, VS code etc. but if you must integrate with VS 2017, there are resources available, such as angular cli and vs2017.
I'm developing simple websites in Visual Studio with external tools like angular cli or webpack.
It doesn't seem as if there is an appropriate project template for that. I don't need special things like the nodejs or asp .net project provides. I just want to be able to define my own actions, nothing else.
What I want:
Simple project structure showing files (just like normal but without listing npm packages)
Configurations such as Debug/Release
Run own scripts on build/rebuild/start etc. (depending on configurations)
I know that this could be accomplished using vs code. But vs2017 offers much functionality that I need.
Is there a way i can accomplish this in VS2017?
If not, would it be possible to write an own project template for that?
I'm developing a web application on java and I have a number of js files there.
Is it possible to configure eclipse ee to make autocomplete in javascript code in js files in a java project?
How is it possible, if it's possible?
Right-click on the project (in the Project or Package Explorer), and from the Configure menu, make it a JavaScript project as well. This won't remove any Java features from the project, it will simply make it able to have the features of a JavaScript project at the same time.