Skip to content

Commit

Permalink
feat(base): Create v2 base components. (#4600)
Browse files Browse the repository at this point in the history
- Change `mdl-base-component` -> `mdl-base`
- Add description and correct license to `mdl-base`
- Implement base foundation and component classes
- Deprecate MDLBaseAdapter; remove from index exports
- Update all build and dependency targets
- (extra) Fix false positive in mdl-auto-init test
- (extra) Update quotes eslint rule to avoid escaping
- (extra) Fix failing ripple tests
- (extra) Allow TravisCI to run all PRs via saucelabs

Resolves #4579

[Delivers #126819203]
  • Loading branch information
traviskaufman committed Jul 28, 2016
1 parent 69cce5b commit bba0d0d
Show file tree
Hide file tree
Showing 27 changed files with 610 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins:
rules:
max-len: [error, 120]
no-new: warn
quotes: [error, single]
quotes: [error, single, {"avoidEscape": true}]
no-var: error
curly: error
no-floating-decimal: error
Expand Down
15 changes: 2 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
# Force TravisCI to run outside of a container
sudo: required
dist: trusty
language: node_js
node_js:
- node # stable
- '4' # LTS
branches:
only:
- master
before_install:
- '[ -n "$SAUCE_ACCESS_KEY" ] || echo "NON-SECURE BUILD. Falling back to Chrome + FF only."'
- '[ -n "$SAUCE_ACCESS_KEY" ] || export CHROME_BIN=/usr/bin/google-chrome'
- '[ -n "$SAUCE_ACCESS_KEY" ] || export DISPLAY=:99.0'
- '[ -n "$SAUCE_ACCESS_KEY" ] || sh -e /etc/init.d/xvfb start'
- '[ -n "$SAUCE_ACCESS_KEY" ] || sudo apt-get update -qq'
- '[ -n "$SAUCE_ACCESS_KEY" ] || sudo apt-get install -y libappindicator1 fonts-liberation'
- '[ -n "$SAUCE_ACCESS_KEY" ] || wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
- '[ -n "$SAUCE_ACCESS_KEY" ] || sudo dpkg -i google-chrome*.deb'
env:
global:
- SAUCE_USERNAME=material-sauce
-
secure: aJ9IOc3ngZAujpeNdRRfEZf32tEiPJhNEt/QeoKspP+ivDDxtX4tP+5PlefnQqu5z4M1puF4A6UyiKXZJ5AThFBX0L+FP531lCNibZppyK7KZgl68O92iBooA0EZH45Pb36v9rN5Xl4ZwzJhcx8QiFWXwHp3fQHCgtoxiSdaOBt3l63Wg1vCFPSPPI/8BGiJDwxrOretholor63gMBXUoxJl2ZCMG8NnT5KF1YBzi6ZEWtMLBnuEeKxQcgi3l70UJfR9K/VTfxaoctGrc9UfmyJmD27gGHdBZc0HfZF0Z00SufXn7hILUqfaioJPzRylKxEy0h0KTeX5ZBEQNeLXSIxfcnFHbKk5OeTCkIF+cs9hUrhQfwTpoxyLNPNNeg8P2DMkUvBy/QllEuiESg3LcJlM/ziLhHJpZ7MerbSAZC91rQKX7N/2R8UkaKH6GkEMf5JtK+t1s1fgInBMfPt6oqY250GFq6QJaO/n9a5ndBnDIkjBqbUQYD+8IE793t9HjAN7XwYBk+WgLiStWR+FACLN1VLg8+9K6SfnQujOO2ZYXe2Q2Bdbwk5QqJQCvvb1WHKRMOG2+DN9A2S8zOVfGdC1B9Ih/UZXmXF0r+fEOiY2yuWhgSwd5r16KERxgnG189Gs+7kveT0gfl8SUdEXTEF+fATGEcG+RIv2LSrCNVY=
- SAUCE_ACCESS_KEY=5e3395b4-2026-48a4-82a0-35bc756a0d2b
addons:
firefox: latest
sauce_connect: true
24 changes: 8 additions & 16 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ const SL_LAUNCHERS = {
}
};

const TRAVISCI_FALLBACK_LAUNCHERS = {
'travisci-chrome': {
base: 'Chrome',
flags: ['--no-sandbox']
}
};

module.exports = function(config) {
config.set({
basePath: '',
Expand All @@ -115,12 +108,12 @@ module.exports = function(config) {
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: getBrowsers(),
browsers: USING_SL ? Object.keys(SL_LAUNCHERS) : ['Chrome'],
browserDisconnectTimeout: 20000,
browserNoActivityTimeout: 240000,
captureTimeout: 120000,
concurrency: Infinity,
customLaunchers: USING_SL ? SL_LAUNCHERS : TRAVISCI_FALLBACK_LAUNCHERS,
customLaunchers: SL_LAUNCHERS,

coverageReporter: {
dir: 'coverage',
Expand Down Expand Up @@ -158,14 +151,13 @@ module.exports = function(config) {
testName: 'Material Design Lite Unit Tests - CI',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
startConnect: false
},
// Attempt to de-flake Sauce Labs tests on TravisCI.
transports: ['polling'],
browserDisconnectTolerance: 3,
client: {
captureConsole: false
}
});
}
};

function getBrowsers() {
if (USING_SL) {
return Object.keys(SL_LAUNCHERS);
}
return USING_TRAVISCI ? Object.keys(TRAVISCI_FALLBACK_LAUNCHERS).concat(['Firefox']) : ['Chrome'];
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"css-loader": "^0.23.1",
"cz-conventional-changelog": "^1.1.6",
"dom-events": "^0.1.1",
"es6-promise": "^3.2.1",
"eslint": "^2.12.0",
"eslint-config-google": "^0.5.0",
"eslint-plugin-tape": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/material-design-lite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import BaseComponent from 'mdl-base-component';
import BaseComponent from 'mdl-base';
import Checkbox from 'mdl-checkbox';
import Radio from 'mdl-radio';
import Ripple from 'mdl-ripple';
Expand Down
2 changes: 1 addition & 1 deletion packages/material-design-lite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"mdl-animation": "^1.0.0",
"mdl-auto-init": "^1.0.0",
"mdl-base-component": "^1.0.0",
"mdl-base": "^1.0.0",
"mdl-checkbox": "^1.0.0",
"mdl-radio": "^1.0.0",
"mdl-ripple": "^1.0.0"
Expand Down
127 changes: 0 additions & 127 deletions packages/mdl-base-component/index.js

This file was deleted.

9 changes: 0 additions & 9 deletions packages/mdl-base-component/package.json

This file was deleted.

Loading

0 comments on commit bba0d0d

Please sign in to comment.