Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscox committed Dec 2, 2016
2 parents 56e82db + 3a8d1d5 commit c344527
Show file tree
Hide file tree
Showing 12 changed files with 165 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_STORE
npm-debug.log
node_modules
build
dist
coverage
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: node_js
cache:
directories:
- node_modules
sudo: false
node_js:
- "stable"
before_script:
- "export CHROME_BIN=chromium-browser"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
install:
- npm install
after_success:
- npm run codecov
notifications:
email: false
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
![remixer](https://cdn.rawgit.com/material-foundation/material-remixer/master/docs/assets/lockup_remixer_icon_horizontal_dark_small.svg)

[![Build Status](https://travis-ci.org/material-foundation/material-remixer-web.svg?branch=develop)](https://travis-ci.org/material-foundation/material-remixer-web) [![codecov](https://codecov.io/gh/material-foundation/material-remixer-web/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-foundation/material-remixer-web) [![npm version](https://badge.fury.io/js/material-remixer.svg)](https://badge.fury.io/js/material-remixer)

Remixer helps teams use and refine design specs by providing an abstraction for these values that is accessible and configurable from both inside and outside the app itself.

This SDK for Web is currently in development.
Expand All @@ -13,23 +15,21 @@ This SDK for Web is currently in development.

`npm install material-remixer --save`

This will install the Remixer files in your project's node_modules folder.
This will install the Remixer files in your project's `node_modules` folder.

### 2. Include the `remixer.js` script in your app.

```html
<head>
<script src="./node_modules/material-remixer/dist/remixer.js"></script>
</head>
<script src="./node_modules/material-remixer/dist/remixer.js"></script>
```

### 3. Begin by starting Remixer
### 3. Begin by starting Remixer.

```javascript
remixer.start();
```

### 4. Add variables
### 4. Add variables.
Now you can add any desired variables and use the callback method to assign the `selectedValue` property.

```javascript
Expand All @@ -49,6 +49,9 @@ Visit our [State of Development](https://github.com/material-foundation/material

## Other Repositories

The main Remixer GitHub repo for documentation, project tracking, and general information:
- [Remixer docs](https://github.com/material-foundation/material-remixer)

Other platform specific libraries and tools can be found in the following GitHub repos:

- [iOS](https://github.com/material-foundation/material-remixer-ios) - Remixer for iOS.
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ This folder contains an example of using Remixer in a simple web app.

1. Run `npm install` or `yarn` within this folder.
2. Run `gulp serve` to start the demo server.
3. The demo should open in new window. If not, navigate to `[http://localhost:8000/](http://localhost:8000/)` to view it.
3. The demo should open in new window. If not, navigate to [http://localhost:8000/](http://localhost:8000/) to view it.
4. Hit `ESC` key to toggle Remixer overlay visibility.
15 changes: 15 additions & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<!DOCTYPE html>
<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
-->
<html>

<head>
Expand Down
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"dependencies": {
"material-design-lite": "^1.2.1",
"material-remixer": "file:../"
"material-remixer": "^0.5.1"
}
}
18 changes: 17 additions & 1 deletion examples/styles.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
/** @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

.page-content { padding: 40px; }

#box {
width: 200px;
height: 200px;
background-color: lightGray;
}
}
31 changes: 26 additions & 5 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,46 @@
/** @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

const webpackConfig = require('./webpack.config.js');

module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['mocha'],
browsers: ['Chrome', 'ChromeCanary', 'Safari', 'Firefox'],
reporters: ['progress'],
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
client: {
mocha: {
reporter: 'html',
},
},
coverageReporter: {
reporters: [{
type: 'lcov'
}]
},
files: [
'src/**/__tests__/**',
],
exclude: [
'**/*.map',
],
preprocessors: {
'**/*.ts': ['webpack'],
'**/*.js': ['webpack'],
'./src/**/*.ts': ['webpack', 'coverage'],
'./src/**/*.js': ['webpack', 'coverage'],
},
webpack: {
devtool: webpackConfig.devtool,
Expand All @@ -34,7 +55,7 @@ module.exports = function(config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
singleRun: false,
singleRun: true,
concurrency: Infinity,
});
};
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-remixer",
"version": "0.5.0",
"version": "0.5.1",
"description": "A set of libraries and protocols to allow the sharing of design values and live refinement of apps during the development process.",
"homepage": "https://github.com/material-foundation/material-remixer",
"author": "The Material Remixer Authors (see AUTHORS)",
Expand All @@ -17,8 +17,9 @@
"url": "https://github.com/material-foundation/material-remixer-web/issues/"
},
"scripts": {
"test": "karma start",
"prepublish": "gulp"
"codecov": "cat coverage/*/lcov.info | codecov",
"prepublish": "gulp",
"test": "karma start"
},
"devDependencies": {
"@types/chai": "^3.4.34",
Expand All @@ -28,6 +29,7 @@
"@types/sinon": "^1.16.32",
"@types/sinon-chai": "^2.7.27",
"chai": "^3.5.0",
"codecov.io": "^0.1.6",
"css-loader": "^0.26.0",
"del": "^2.2.2",
"gulp": "^3.9.1",
Expand All @@ -42,8 +44,9 @@
"karma": "^1.3.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-safari-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
Expand Down
16 changes: 16 additions & 0 deletions src/ui/styles/iframe.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/** @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

#__remixer-overlay-frame__ {
position:fixed;
border: 0;
Expand Down
35 changes: 27 additions & 8 deletions src/ui/templates/overlay_iframe.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
<!doctype html>
<!DOCTYPE html>
<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License
-->

<html>

<head>
<link rel="stylesheet" href="./node_modules/material-design-lite/material.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="./node_modules/material-design-lite/material.min.js"></script>
<script src="./node_modules/react/dist/react.js"></script>
<script src="./node_modules/react-dom/dist/react-dom.js"></script>
<link rel="stylesheet" href="./node_modules/material-design-lite/material.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="./node_modules/material-design-lite/material.min.js"></script>
<script src="./node_modules/react/dist/react.js"></script>
<script src="./node_modules/react-dom/dist/react-dom.js"></script>
</head>

<body>
<div id="rmx-overlay-wrapper"></div>
<script src="./node_modules/material-remixer/dist/overlay.js"></script>
<div id="rmx-overlay-wrapper"></div>
<script src="./node_modules/material-remixer/dist/overlay.js"></script>
</body>

</html>
36 changes: 27 additions & 9 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
/** @license
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

'use strict';

module.exports = {
entry: {
remixer: './src/core/Remixer.ts',
overlay: './src/ui/render.tsx'
},
output: {
path: __dirname + "/dist",
filename: "[name].js",
path: __dirname + '/dist',
filename: '[name].js',
libraryTarget: 'umd',
umdNamedDefine: true
},
devtool: "inline-source-map",
devtool: 'inline-source-map',
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
module: {
loaders: [{
test: /\.tsx?$/,
loader: "ts-loader"
loader: 'ts-loader'
}, {
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
loader: 'style-loader!css-loader!less-loader'
}, {
test: /\.html$/,
loader: "html-loader"
loader: 'html-loader'
}],
},
externals: {
"react": "React",
"react-dom": "ReactDOM",
'react': 'React',
'react-dom': 'ReactDOM',
}
};

0 comments on commit c344527

Please sign in to comment.