From 09662e211b30b3ec1cd21cd61db7d57d2008e023 Mon Sep 17 00:00:00 2001 From: Evandro Carenho Date: Mon, 27 Mar 2017 10:15:57 -0300 Subject: [PATCH] NPM Publish changes - Changed README as this is a Javascript repository only. - Added map-stream to license validator. - modified travis.yml as this is a Javascript only project. --- .travis.yml | 18 ++++++----------- README.md | 55 ++++++++++++---------------------------------------- package.json | 2 +- 3 files changed, 19 insertions(+), 56 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2806eed7..0d801073 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,23 +26,17 @@ language: node_js node_js: - "6.10" -addons: - apt: - packages: - - openjdk-8-jdk - - maven - - rpm - before_script: - npm install -g node-license-validator - npm install -g semantic-release script: +# Install npm dependencies +- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ npm-publish-webapp-repo ]]; then npm install ; fi" +# Run tests +- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ npm-publish-webapp-repo ]]; then npm run test ; fi" # Validate npmjs licenses -- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then pushd integration-commons/src/main/webapp ; npm run license-check ; popd ; fi" -# Deploy to oss.sonatype.org -- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then mvn clean deploy --settings settings.xml ; fi" -- "if [[ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]]; then mvn clean install ; fi" +- "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ npm-publish-webapp-repo ]]; then npm run license-check ; fi" # Deploy to npmjs.org using semantic-release; make sure that NPM_TOKEN and GH_TOKEN are set on Travis settings -after_success: "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ dev ]]; then pushd integration-commons/src/main/webapp ; npm run semantic-release ; popd ; fi" +after_success: "if [[ \"$TRAVIS_PULL_REQUEST\" = \"false\" && $TRAVIS_BRANCH =~ npm-publish-webapp-repo ]]; then npm run semantic-release ; fi" diff --git a/README.md b/README.md index 5ea43614..c2ea655d 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,26 @@ [![Symphony Software Foundation - Incubating](https://cdn.rawgit.com/symphonyoss/contrib-toolbox/master/images/ssf-badge-incubating.svg)](https://symphonyoss.atlassian.net/wiki/display/FM/Incubating) [![Build Status](https://travis-ci.org/symphonyoss/App-Integrations-Commons.svg?branch=dev)](https://travis-ci.org/symphonyoss/App-Integrations-Commons) -# Integrations Commons Documentation +# Integrations Front-End Commons Documentation -This document provides a brief overview of Integration Commons components and how to build them from scratch. +This document provides a brief overview of Integration Front-End Commons components and how to build and publish them. # Overview -Integration Commons provides the common components required to build a new integration to Symphony Platform, as the common base class for any WebHook based integration, Symphony authentication utility classes, metrics tools, and many other utility classes. +Integration FE Commons provides the common components required to build a configurator application for Symphony Platform integrations, such as room search, webhook creation, webhook editing etc. -The third-party services that would like to post messages into a configurable set of streams should define the integration-parent as a parent of your maven project. - -Example: - -``` - - - - integration-parent - org.symphonyoss - 0.10.0-SNAPSHOT - - 4.0.0 - - integration-test - - - - org.symphonyoss.symphony.integrations - integration-webhook - ${project.version} - - - -``` - -If you want to create a new webhook integration you should define the __integration-webhook__ module as a dependency and start by extending the [WebHookIntegration](integration-webhook/src/main/java/org/symphonyoss/integration/webhook/WebHookIntegration.java) class, as it is the super class of every other integration. - -# Installation instructions for the Java developer +# Installation instructions for the Javasctipt developer ### What you’ll build -You’ll build a simple java library that provides some useful services to build new integrations. +You’ll build a simple Javascript library that provides some useful services to build new configurator apps for integrations. ### What you’ll need -* JDK 1.7 -* Maven 3.0.5+ - -### Build with maven -Integration Commons is compatible with Apache Maven 3.0.5 or above. If you don’t already have Maven installed you can follow the instructions at maven.apache.org. +* Nodejs 6.10 +* NPM node-license-validator +* NPM semantic-release +### Build with NPM To start from scratch, do the following: -1. Clone the source repository using Git: `git clone git@github.com:symphonyoss/App-Integrations-Commons.git` -2. cd into _App-Integrations-Commons_ -3. Build using maven: `mvn clean install` +1. Clone the source repository using Git: `git clone git@github.com:symphonyoss/App-Integrations-FE-Commons.git` +2. cd into _App-Integrations-FE-Commons_ +3. Build using npm: `npm install` diff --git a/package.json b/package.json index ef3816ac..00c049e3 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "test:watch": "npm test -- --watch", "watch": "webpack-dev-server --progress --colors --hot --inline --https", "semantic-release": "semantic-release pre && npm publish && semantic-release post", - "license-check": "node-license-validator --allow-licenses WTFPL Apache Apache-2 BSD-like BSD BSD-2-Clause BSD-3-Clause Apache-2.0 MIT ISC Unlicense MIT/X11 \"MIT / http://rem.mit-license.org\" \"Public Domain\" --allow-packages domelementtype@1.3.0 domhandler@2.3.0 domutils@1.5.1 extsprintf@1.0.2 ripemd160@0.2.0 rx-lite@3.1.2 shellwords@0.1.0 stream-cache@0.0.2 verror@1.3.6" + "license-check": "node-license-validator --allow-licenses WTFPL Apache Apache-2 BSD-like BSD BSD-2-Clause BSD-3-Clause Apache-2.0 MIT ISC Unlicense MIT/X11 \"MIT / http://rem.mit-license.org\" \"Public Domain\" --allow-packages map-stream@0.1.0 domelementtype@1.3.0 domhandler@2.3.0 domutils@1.5.1 extsprintf@1.0.2 ripemd160@0.2.0 rx-lite@3.1.2 shellwords@0.1.0 stream-cache@0.0.2 verror@1.3.6" }, "jest": { "transform": {