i have downloaded a foreign web solution from my clients httpdoc folder.
Now i need to edit them in Visual Studio 2013/2015 but i dont know how to integrate them.
their htdocs files and folders;
global.asax
package.config
web.config
gruntfile.js bower.json
package.json
./app/components/account/
logincontroller.html
login.js
register.html
registercontroller.js *and some more......)
./app/components/home/
indexcontroller
index.js
and some more......)
./app/components/shared/
headercontroller.js
header.html
more file like this......)
./app/components/
... and more folders
./app/services/
ajaxService.js
services.js and
..a lot more .js files)
./app/vendors/
angular, bootstrap, jquery stuff)
./bin/
EntityFramework.dll
System.web.razor.dll
...and more dll's
For me this looks MVC like, but with a folder structure i do not understand
However, i need to edit, debug and run the sources in VS and i have no idea how to include it. Do i need to create a simple project (type?) and copy and paste or how would this work.
Can you please advice me?
I am not sure if I understand your question but I am guessing you have an ASP.NET MVC project using AngularjS. Right click the path from your existing project on Solution Explorer and add existing files.
Warning: You might need to include dll files as well.
I agree with mason. Probably should just add the files to an existing project.
Looks like an Angular SPA. May have no .Net aspect to it (i.e. VS just used as an editor). Just copy the files into a new VS project. If it has compiled code associated with it, it will be hard to reproduce the .Net code.
Related
I want to export the rendered HTML files with its resources to a zip file in order to share it via mail but i could not find any solution for this usecase. Could you please guide me how to proceed?
The web application is developed using Angular8.
Sure. I guess you had a code test or something: just build your project for development, compress the /dist folder and send it as a compressed file of your choice. Type and execute:
ng build
In the project main folder. Notice that --watch doesn’t help here, since you don’t need a CI/CD. Check the official documentation for more details.
I am trying to build a PDF viewing component for an Ionic 2 app. I have lots of experience of Angular 2, but not of Ionic.
The component will be built using pdf.js and have created the pdf.js asset to be included in my project as described on the github page. However, trying to require this fails — require is not defined —, so I copied the script to the asset folder and tried importing it. It seems the file is not being copied to the build so that fails too.
Anyone have any pointers for requiring or importing a non-weboack non-SystemJS script into an Ionic 2 app?
Create a js folder (or something like this) in the www folder; include the files needed and reference them from there. This folder is not emptied on build.
EDIT
The root of the www folder does not change and you can reference it as someting like ... 'js/need-this.js'.
There should have some references in your index.html file to the build folder and maybe the assets folder (icon); this concept of using a js folder works the same. Only build and assets will change.
I feel that I should point out that you shouldn't copy anything into www since this is autogenerated and any changes will be overwritten. You should copy into assets instead.
I just installed VS 2015 Community.
After building no js files are created inside the solution or the explorer.
TypeScript is part of Community. The produced .js files aren't part of the project, so you won't see them unless you turn on 'show all files' from the solution explorer. Here is the button you need to press:
Then the .js files will appear after you build:
If you're not seeing these, then check to make sure you're using this project template:
I want to thanks all who tryied to help But the solution in cordova typescript project - The compiled .ts files are inside the www\scripts\appBundle.js.
*you may need to use #Micheal Braude solution to see the appBundle.js file.
thanks agian.
I`m not sure that VS 2015 Enterprise works like Community version, but I tried to explain you, how to create Simple TypeScript project, and configure it for using step by step.
Steps
Create new HTML Application, developed for TypeScript.
When you have done it, you would get something like on image below:
It is a simple structure of application, here we have file app.ts, html view, and css style-sheet.
Configure compilation - What you should to know about this step:
ES target version
Compile single merged file or separate files.
Enter project configurations -->> Open TypeScripts Compilation tab -->>
Choose required ES version in ComboBox -->> Write path to compiled file and it name, if needed (located slightly below).
Add your first file to solution and write some code in it
Create your file.
4.1. If you prefer separate compilation then you should add dependency for your js file into html view. Usually, the *.js file compiled in the same location folder of *.ts file, that`s why targeting on you ts file when write dependency to js file
4.2. If you prefer merged compilation, first that you need - it is configure order of file, it is very simple challenge:
Add into the main file (in my case usually it is app.ts) and write in it list of your dependencies
///<reference path="path/to/file1.ts"/>
///<reference path="path/to/file2.ts"/>
Than, you should replace in html view this default script path:
with path to your final js file
Test your application:
try to add some code that would help you to be ensure that your code works perfectly
run you application and ensure that it works as you expected.
Good Luck! I hope that this post helps you in your beginnings!!
P.S. Here working project.
I'm trying to generate a karma.conf.js for my testing.
My app has already aout 30 tags in it referencing my code. I'm writing my AngularJS code in a modulized structure, like it is recommended here.
I wonder how to not write all the refereneces into the karma.conf.js again.. Does anybody know a solution for this?
I looked at https://preview.npmjs.com/package/karma-loadscripts-preprocessor but it didn't do the job. Seems to be for loading external scripts from cdn-sources.
I'm a bit stuck and right before writing my own shell script wich does the job for me.
In my experience this is not a big problem in angular projects. The included files do not change too often and they are manually manageable. It also happens sometimes to have different includes in the Karma file, because you may want to mock some modules.
If you are really committed to be dry on this, and you are using the angular generator in Yeoman, a solution could be to include the built version of your app in Karma
In your karma.conf.js file you can reference multiple files in a directory or in subdirectories. For the files property in your karma.conf you can do similar to below.
files: [
'www/js/*.js',
'www/**/*.js'
]
The first show will get all in the in the js folder. However the second will get you all the javascript files in the www/ folder and subfolders including the js/ folder.
Hope this helps.
I ran into the same challange as you did. I don't want to manually include every script I use in my app into the karma config but I do want to test the unbundled javascripts.
I have created a karma preprocessor myself to include all the local script from a html file. It works for my own projects, I hope it does for yours as well.
https://www.npmjs.com/package/karma-preprocessor-includelocalscripts
Have a look at it and feel free to comment.
I'm using Visual Studio 2013 to create an MVC5 application. I decided to use TypeScript for the client side. I have TypeScript installed and more or less configured. When I build the project JavaScript files appear next the TypeScript files (*.js and *js.map).
The problem is that those files are not included in the solution. I can only see them when I select "Show All Files" in Solution Explorer or browse my solution folder with file explorer.
I see 2 bad consequences:
When I add a .js file to a view like that <script src="~/Scripts/Custom/Tmp.js"></script> Resharper complains "Project file expected at XYZ". However when I run the MVC application JavaScripts work fine.
If the .js files are not included in the solution they won't be published and so the webpage won't work properly.
The only solution that comes to my mind is to add the files manually, but:
this sounds very tedious
I think the .js files are not being added for some purpose
What's the proper way to use TypeScript in an MVC application?
My experience so far with a project just like yours is unproblematic. After working with TypeScript so much, it's become painful to look at JavaScript!
Problem 1) doesn't happen in plain VS suggesting that the issue is with ReSharper.
Problem 2) isn't. Deployment works somehow; the .js files are published but the .js.map files are not.