I am trying to integrate react js app in sonarqube with Bamboo by running ant configuration.
sonar -Dsonar.host.url=${bamboo.sonarqube_host_url} -Dsonar.login=${sonarqube_auth_token} -DCommandLineParameter=${bamboo.buildKey} -Dsonar.projectVersion=3.0 -Dsonar.sources=src -Dsonar.tests=src/test -Dsonar.exclusions=src/assets/**/*.js, src/utils/**/*.js, src/test/**/*.js, src/store/**/*.js -DBranchType=${bamboo.planRepository.branch} -Dsonar.projectName=testProject]
But it's failing with
Target "sonar.host.url=sonarqube.....com" does not exist in the project "My Project".
Q1. Is this the right way to do this? (As Ant is for Java)
If not how should I so this?
Using an Ant task to run your scan doesn't make sense since you don't user/need Ant in Javascript development. The better alternatives would be to:
Call the sonarqube scanner from a shell script task
use the 'Sonar for Bamboo' pluging (a for pay plugin) to have a more GUI-like interface to ostensibly the same thing.
You should look at the sonar scanner documentation https://docs.sonarqube.org/display/SCAN
Related
I have created two apps using 'Visual Studio Code' and 'node.js.' I run them using command 'npm start,' and they show in the browser. I want to build them or deploy them so they can be used by anyone. It says there to use command 'npm run build.' How to do that, and what technique you use in order to build them?
It depends on what configuration you used for building the React app. If you used create-react-app, npm run build is the correct command for building it.
If you used a different configuration (e.g. webpack), you should use the relevant command for that configuration.
Either way, deploying it will be as easy as copy/pasting the build folder's content to the server you want to host it, after running the build command.
Visual Studio Code or any other Code Editor for that matter is not relevant. You can develop, build and deploy any React app using any Code Editor you want, it's just a matter of preference.
"Building" refers to the task of preparing (transforming, minifying, compressing, etc.) all the relevant project files so that they're ready for production (assuming that your build scripts are configured to do so).
"Deploying" an app is usually a separate task that will deploy (upload) your current project build to a development platform provider like Firebase, Netlify, Azure, etc. Note that you have to register with a provider and setup a new project on their end before your deploy your project.
Which provider you use is totally up to you. Also, you have to configure your current project once you've chosen your development provider. They'll provide instructions on how to deploy your project.
On a side note, keep in mind that you can configure your own npm scripts so that they run whatever you want. More about that here
I'm new to React JS and trying to use in my front end design. Using Eclipse IDE,I would like to integrate React JS into my existing web application. Is it enough to add Jars associated with React into WEB-INF/lib and proceed?
Your help and time is much appreciated.
Thanks
Another approach could be using something lightweight like VSCODE with create-react-app. Once you build the project you'll load it into your existing project as a singular widget.
I have this question because i was a PHP developer before and all of my project is run in apache server.
I’m newbee or Kotlin languague. I want learn Kotlin via create a project. Now I want create a project use Kotlin web server (may be use ktor framework). I want use this with react kotlin like https://github.com/JetBrains/create-react-kotlin-app to build my front end. How can i oganize my project to build that ?
I was trying to figure this out as well. The command itself structures your project to do this. See the readme documentation on the github page:
https://github.com/JetBrains/create-react-kotlin-app
You should have to run npx create-react-kotlin-app my-app but you will also some additional setup according to the docs.
If you are looking for a fullstack example, there is one here that uses react:
https://github.com/Kotlin/kotlin-fullstack-sample
I also found this Spring example here:
https://spring.io/guides/tutorials/react-and-spring-data-rest/
The Spring example actually uses Java, but you can just initialize your project with Kotlin instead.
I'd like to integrate/use an aspnet core 2 mvc app with react built using the react CLI "create-react-app".
I'd prefer to avoid all the boilerplate provide by SPA template.
Could you please me help to figure out all the steps required to integrate for. ex. gulp to code against the app created with the CLI in VS editor and see the result when I launch the website from VS and see the change while the website is running?
I started to learn angular.js and build the hello world app according to the official angular site.
I'm working with Spring Tool Suite 3.8.4 and installed the AngularJS Eclipse 1.2.0 plugin and the test project was working fine without any validation errors.
After finishing this tutorial I made a git clone from this demo application, did all the installation steps, imported it as a project into Eclipse and configured it as an angular project (nature).
After all validation was done Eclipse showed me about 2500 errors with the message Unexpected token. I opened some files and it seems that the import and export keyword isn't recognized properly.
As the hello world app uses also these keywords and didn't have any validation errors I assume the reason could be a configuration problem. If i compare them in my project explorer i was wondering why in my hello world app was only a folder "TypeScript Resources (2.2.2)" and in this imported project there is also one folder/lib called "Javascript Resources". Might be ok, just something i noticed.
As im totally new to angular I have no clue what I could check. I read that the angular js support for the Eclipse IDE isn't perfect but these articles have been partly outdated as they were using Angular 1.x and 2.x.
Running the application with npm start in a terminal or "Run as" ==> ng serve" works fine without any problem.
Both applications (hello world and the cloned one) use Angular 4.x.
Does anybody have an idea? Do I need to provide more information?
At first just to clarify things, you have installed Angular2 Eclipse which is for Angular2, Angular4 and where you develop with TypeScript. AngularJS Eclipse is for Angular1 where you develop with JavaScript.
You error is a JavaScript Problem which comes from the JSDT plugins. It seems that you have added JSDT nature. I suggest you to remove JSDT nature from your project because you develop with TypeScript and not with JavaScript.
To do that you can edit your .project file and remove this line:
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
If you need to open JavaScript file in an editor with validation, completion, etc, TypeScript IDE provide a JavaScript (Salsa) Editor which does that. You open your JS file with JavaScript (Salsa) Editor:
and after you benefit from the same feature than TypeScript editor: