I am looking for a nexus-compliant repository where I can get a node installer (a nexus-compliant alternative to http://nodejs.org/dist/.
Context :
In a java environment, our builds are processed by maven. Recently we add a javascript frontend app and I am trying to get it built via maven with the excellent plugin frontend-maven-plugin.
The plugin installs node and npm, then run npm install and grunt build.
Everything works perfectly.
But we MUST put all our dependencies under nexus (or some locally proxified repository).
About frontend dependencies: no problem since nexus 2.10 supports the npm registries. It works.
About the node and npm installers, they are initially downloaded from http://nodejs.org/dist/ by the plugin, and I do not know how to locally proxify this repo ... or where I can find theses installers on a nexus-compliant's one.
Any suggestions ?
Thx.
I would suggest to create a pull request/patch for the frontend plugin that allows you to add a full url for npm and node rather than just the version and the root url. Then you can host the two installed e.g. by uploading them to Nexus into a Maven 2 repository and using that URL. I filed an issue for that btw. https://github.com/eirslett/frontend-maven-plugin/issues/126
Alternatively could try to create a site repository in Nexus with the same structure and use that.
Related
I am studying a TeamCity project which has to do with a .NET application with Angular at the frontend. What it does not make sense to me is I cannot find anywhere npm install. For example:
The thing is in case I add a dependency in package.json which requires update of node_modules folder, everything works fine as far as the artifacts are concerned and Angular finds the files it needs!!
But how node_modules folder on TeamCity is updated?
Sorry, for being a little bit abstract; honestly, I cannot find npm install anywhere.
I would highly recommend looking at the TeamCity Node Plugin available at https://github.com/jonnyzzz/TeamCity.Node. The plugin, which is also available via the TeamCity Plugin repository for an integrated installer, will allow you to use NVM to install a specific version of Node as well as run NPM to install other dependencies, etc.
I hope this helps!
I am new angular2 development, and what i came to know is before starin the angular2 development, I must install the nodejs for server and npm to download dependencies from official documentation.
I succesfully deployed the source code in tomcat sever[by build]
So my Question is after installation and creating the new project, i got node_modules. By using these node_modules(can i start development of angular2 on another i.e a new machine where node & npm is not installed)
Basically my question is.. I want to start development of angular2 by using the project structure on new machine. Without the installation on node & npm
From Angular docs
Node.js and npm are essential to Angular development.
If you built/compiled the app and have all the modules installed (you have your node_modules) folder then its just javascript and html which you can run on any server you want.
For npm, if you need any modules/packages, I think you can manually download the package and add it to your development environment. But what if the process needs to be automated? You can't just sit there and download all the packages from github. So npm is really helpful when it come to this. You only need a file containing all dependencies, and run it at build time (package.json)
About nodejs, nodejs allows you to run javascript on the server when you need any interaction with the database. So why don't we just go with the easy way?
I'm evaluating JHipster; it looks great for rapid development!
Maybe a novice question: I see that the generated .gitignore ignores certain things, e.g.
/node/**
/node_modules/**
So, if I check in the generated project to a repository, and then some other developer in my team checks it out in his environment, the project would not work in his environment. Would it?
Was curious to know how to handle this. Thanks.
Since your git repo won't track node packages, others using your git repo will need install node.js, then run npm install to download all the node packages.
It's similar to them having to have java and maven installed on their environment.
Update: A developer will run 'git clone '. The source (not including node or bower) will be on their workstation. Once they've installed node.js, they'll run 'npm install' and the node directories will be created automatically for your project by downloading them from the Internet. That way you don't need to keep all your node libraries in your own git repository ...just their package name and version in the package.json file (similar to maven dependencies in pom.xml).
No one should commit the node_modules or bower_components to git, what you would do is share the project like you share the maven projects.
Write in the read me what needs to be done to get them ready, for example the installation of yo, bower, grunt or gulp and generator-jhipster.
What is very nice about liquibase, each developer can have his own version of the database, and every commit has its own database version.
What we our team does, if a developer adds something to node js package.json then we mention it in the comment: npm install needed and the same applies for bower.
That way you keep all your environments clean, and if you would like to install continuous integration like "Jenkins or Teamcity" then you make sure Jenkins is building rebuilding the whole project.
I am looking for a nexus-compliant repository where I can get a node installer (a nexus-compliant alternative to http://nodejs.org/dist/.
Context :
In a java environment, our builds are processed by maven. Recently we add a javascript frontend app and I am trying to get it built via maven with the excellent plugin frontend-maven-plugin.
The plugin installs node and npm, then run npm install and grunt build.
Everything works perfectly.
But we MUST put all our dependencies under nexus (or some locally proxified repository).
About frontend dependencies: no problem since nexus 2.10 supports the npm registries. It works.
About the node and npm installers, they are initially downloaded from http://nodejs.org/dist/ by the plugin, and I do not know how to locally proxify this repo ... or where I can find theses installers on a nexus-compliant's one.
Any suggestions ?
Thx.
I would suggest to create a pull request/patch for the frontend plugin that allows you to add a full url for npm and node rather than just the version and the root url. Then you can host the two installed e.g. by uploading them to Nexus into a Maven 2 repository and using that URL. I filed an issue for that btw. https://github.com/eirslett/frontend-maven-plugin/issues/126
Alternatively could try to create a site repository in Nexus with the same structure and use that.
I use multiple npm packages in my meteor application, for instance the 'knox' package for amazon s3 access.
On my local system I don't have any problems, because I have the 'knox'- npm package installed on my system. But on the server this is obviously not the case.
I have read different suggestions what I could do:
1)
Install the npm module into the /public folder of my application
- unfortunately I don't know how to do that.
2)
I followed this tutorial:
NPM Deploy Tutorial
I created packages/knox/package.js packages/knox/knox.js and I am pretty sure I did everything as described in the tutorial but this is not even working locally
Use npm package from Atmosphere. See details on how to use it.
Did you remember to add the knox package to the .meteor/packages file?
The link you shared is pre Meteor 0.6.5, which loaded all packages in packages/ automatically. Now, you need to specify them individually.