diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000000..65e5acff5a --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,23 @@ +## This is a module to build zanata frontend javascript projects + +At the moment it only contains "user profile page" bundle. + +To build it, just run + +```mvn install``` + +It will build and deploy to local maven repository a jar file containing the javascript bundle. +The jar file can be used directly under any servlet 3 compatible container and the bundle is accessible as static resources. +See [Servlet 3 static resources](http://www.webjars.org/documentation#servlet3). + +The following Maven properties can be overridden on the command line with ```-Dkey=value```: + +``` +v0.12.2 +2.7.6 +${download.dir}/zanata-frontend/node-${node.version}-npm-${npm.version} +${node.install.directory}/node/npm/bin/npm-cli.js +``` + +By default it will try to install npm modules from npm registry (default cache TTL is 10 seconds). +If you activate profile ```-DnpmOffline``` the cache-min option will become 9999999 which means it will try to install npm modules from cache first. diff --git a/frontend/pom.xml b/frontend/pom.xml index 4a3b2992b2..741196cf34 100644 --- a/frontend/pom.xml +++ b/frontend/pom.xml @@ -17,8 +17,10 @@ ${project.build.directory}/web ${project.build.directory}/build ${bundle.output}/META-INF/resources - ${project.build.directory} + ${download.dir}/zanata-frontend/node-${node.version}-npm-${npm.version} ${node.install.directory}/node/npm/bin/npm-cli.js + + 10 user-profile-page @@ -85,6 +87,8 @@ ${npm.cli.script} install + --cache-min + ${npm.cache.min} @@ -125,4 +129,18 @@ + + + npmOffline + + + npmOffline + + + + 9999999 + + + +