diff --git a/.travis.yml b/.travis.yml index 6d662f4af..bbc6cfcb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,30 @@ language: node_js -node_js: -- "stable" -sudo: required -dist: trusty -addons: - apt: - sources: - - google-chrome - packages: - - google-chrome-stable +matrix: + include: + - os: linux + dist: trusty + node_js: stable + sudo: required + addons: + apt: + packages: + - google-chrome-stable + - os: osx + node_js: stable + osx_image: xcode8.3 before_install: - npm install google-closure-library +- npm install webdriverio # Symlink closure library - ln -s $(npm root)/google-closure-library ../closure-library before_script: - - export CHROME_BIN=/usr/bin/google-chrome - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start + - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then ( scripts/setup_linux_env.sh ) fi + - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then ( scripts/setup_osx_env.sh ) fi + - sleep 2 + script: - set -x - npm test - -os: - - linux diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8cfd55151..fcd866043 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,40 @@ # Contributing to Blockly -Please make pull requests against develop, not master. If your patch needs to go into master immediately, include a note in your PR. +Want to contribute? Great! +- First, read this page (including the small print at the end). +- Second, please make pull requests against develop, not master. If your patch + needs to go into master immediately, include a note in your PR. -For more information, head over to the [Blockly Developers site](https://developers.google.com/blockly/guides/modify/contributing). +For more information on style guide and other details, head over to the [Blockly Developers site](https://developers.google.com/blockly/guides/modify/contributing). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +### Larger changes +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. We +use Github pull requests for this purpose. + +### Browser compatibility +We care strongly about making Blockly work on all browsers. As of 2017 we +support IE 10 and 11, Edge, Chrome, Safari, and Firefox. We will not accept +changes that only work on a subset of those browsers. You can check [caniuse.com](https://caniuse.com/) +for compatibility information. + +### The small print +Contributions made by corporations are covered by a different agreement than +the one above, the +[Software Grant and Corporate Contributor License Agreement](https://cla.developers.google.com/about/google-corporate). diff --git a/README.md b/README.md index cd77906a2..457fb810f 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ blocks together to build programs. All code is free and open source. Blockly has an active [developer forum](https://groups.google.com/forum/#!forum/blockly). Please drop by and say hello. Show us your prototypes early; collectively we have a lot of experience and can offer hints which will save you time. Help us focus our development efforts by telling us [what you are doing with -Blockly](https://goo.gl/forms/kZTsO9wGLmpoPXC02). The questionnaire only takes +Blockly](https://developers.google.com/blockly/registration). The questionnaire only takes a few minutes and will help us better support the Blockly community. Want to contribute? Great! First, read [our guidelines for contributors](https://developers.google.com/blockly/guides/modify/contributing). diff --git a/accessible/app.component.js b/accessible/app.component.js index 117e818a6..c31fd4259 100644 --- a/accessible/app.component.js +++ b/accessible/app.component.js @@ -22,6 +22,29 @@ * @author madeeha@google.com (Madeeha Ghori) */ +goog.provide('blocklyApp.AppComponent'); + +goog.require('Blockly'); + +goog.require('blocklyApp.AudioService'); +goog.require('blocklyApp.BlockConnectionService'); +goog.require('blocklyApp.BlockOptionsModalComponent'); +goog.require('blocklyApp.BlockOptionsModalService'); +goog.require('blocklyApp.KeyboardInputService'); +goog.require('blocklyApp.NotificationsService'); +goog.require('blocklyApp.SidebarComponent'); +goog.require('blocklyApp.ToolboxModalComponent'); +goog.require('blocklyApp.ToolboxModalService'); +goog.require('blocklyApp.TranslatePipe'); +goog.require('blocklyApp.TreeService'); +goog.require('blocklyApp.UtilsService'); +goog.require('blocklyApp.VariableAddModalComponent'); +goog.require('blocklyApp.VariableModalService'); +goog.require('blocklyApp.VariableRenameModalComponent'); +goog.require('blocklyApp.VariableRemoveModalComponent'); +goog.require('blocklyApp.WorkspaceComponent'); + + blocklyApp.workspace = new Blockly.Workspace(); blocklyApp.AppComponent = ng.core.Component({ diff --git a/accessible/audio.service.js b/accessible/audio.service.js index 1225bb6bd..4f7eb4f08 100644 --- a/accessible/audio.service.js +++ b/accessible/audio.service.js @@ -22,6 +22,11 @@ * @author sll@google.com (Sean Lip) */ +goog.provide('blocklyApp.AudioService'); + +goog.require('blocklyApp.NotificationsService'); + + blocklyApp.AudioService = ng.core.Class({ constructor: [ blocklyApp.NotificationsService, function(notificationsService) { diff --git a/accessible/block-connection.service.js b/accessible/block-connection.service.js index 930ef6f15..c1ee03aac 100644 --- a/accessible/block-connection.service.js +++ b/accessible/block-connection.service.js @@ -23,6 +23,12 @@ * @author sll@google.com (Sean Lip) */ +goog.provide('blocklyApp.BlockConnectionService'); + +goog.require('blocklyApp.AudioService'); +goog.require('blocklyApp.NotificationsService'); + + blocklyApp.BlockConnectionService = ng.core.Class({ constructor: [ blocklyApp.NotificationsService, blocklyApp.AudioService, diff --git a/accessible/block-options-modal.component.js b/accessible/block-options-modal.component.js index 73565ec14..6ac7975b5 100644 --- a/accessible/block-options-modal.component.js +++ b/accessible/block-options-modal.component.js @@ -23,6 +23,16 @@ * @author sll@google.com (Sean Lip) */ +goog.provide('blocklyApp.BlockOptionsModalComponent'); + +goog.require('blocklyApp.AudioService'); +goog.require('blocklyApp.BlockOptionsModalService'); +goog.require('blocklyApp.KeyboardInputService'); +goog.require('blocklyApp.TranslatePipe'); + +goog.require('Blockly.CommonModal'); + + blocklyApp.BlockOptionsModalComponent = ng.core.Component({ selector: 'blockly-block-options-modal', template: ` diff --git a/accessible/block-options-modal.service.js b/accessible/block-options-modal.service.js index c7b068d42..ad775c6d4 100644 --- a/accessible/block-options-modal.service.js +++ b/accessible/block-options-modal.service.js @@ -23,6 +23,9 @@ * @author sll@google.com (Sean Lip) */ +goog.provide('blocklyApp.BlockOptionsModalService'); + + blocklyApp.BlockOptionsModalService = ng.core.Class({ constructor: [function() { this.actionButtonsInfo = []; diff --git a/accessible/commonModal.js b/accessible/commonModal.js index 23ac695ac..57e88b529 100644 --- a/accessible/commonModal.js +++ b/accessible/commonModal.js @@ -1,3 +1,6 @@ +goog.provide('Blockly.CommonModal'); + + Blockly.CommonModal = function() {}; Blockly.CommonModal.setupKeyboardOverrides = function(component) { diff --git a/accessible/field-segment.component.js b/accessible/field-segment.component.js index d0020a7fa..8dda20d71 100644 --- a/accessible/field-segment.component.js +++ b/accessible/field-segment.component.js @@ -24,6 +24,13 @@ * @author madeeha@google.com (Madeeha Ghori) */ +goog.provide('blocklyApp.FieldSegmentComponent'); + +goog.require('blocklyApp.NotificationsService'); +goog.require('blocklyApp.TranslatePipe'); +goog.require('blocklyApp.VariableModalService'); + + blocklyApp.FieldSegmentComponent = ng.core.Component({ selector: 'blockly-field-segment', template: ` @@ -51,11 +58,10 @@ blocklyApp.FieldSegmentComponent = ng.core.Component({