Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
damusnet committed Apr 6, 2015
0 parents commit 460f221
Show file tree
Hide file tree
Showing 26 changed files with 1,037 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"rules": {
"quotes": [2, "single"],
"strict": [2, "never"],
"no-underscore-dangle": [0],
"curly": [0]
}
}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Project generated files #
###########################
public

# NPM generated files #
#######################
logs
*.log
node_modules
bower_components

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014 Dan Abramov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Empty file added README.md
Empty file.
30 changes: 30 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "react-swipe-views",
"version": "0.0.1",
"description": "React Component for binded Tabs and Swipeable Views",
"main": [
"./dist/SwipeViews.js",
"./src/SwipeViews.css"
],
"moduleType": [
"globals"
],
"dependencies": {
"react": "~0.13.1"
},
"keywords": [
"react",
"reactjs",
"swipe",
"views",
"tabs"
],
"author": "Damien Varron <[email protected]> (https://github.com/damusnet)",
"license": "MIT",
"homepage": "https://github.com/damusnet/react-swipe-views",
"ignore": [
"**/.*",
"node_modules",
"example"
]
}
183 changes: 183 additions & 0 deletions dist/SwipeViews.js

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions examples/bower-brunch/app/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>React Swipe Views - Bower/Brunch Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="/css/bundle.css">
</head>
<body>
<!-- This script adds the Roboto font to our project. For more detail go to this site: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
<script>
var WebFontConfig = {
google: { families: [ 'Roboto:400,300,500:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<section id='root'></section>
</body>
<script type="text/javascript" src="/js/bundle.js"></script>
<script>require('scripts/index');</script>
</html>
30 changes: 30 additions & 0 deletions examples/bower-brunch/app/scripts/components/App.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions examples/bower-brunch/app/scripts/components/MyAwesomeComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

export default class MyAwesomeComponent extends React.Component {

render() {
return (
<div className="test">
<h1>This is a test!</h1>
<p>lorem ipsum</p>
</div>
);
}

}
10 changes: 10 additions & 0 deletions examples/bower-brunch/app/scripts/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';

import App from './components/App';

React.initializeTouchEvents(true);

React.render(
<App />,
document.getElementById('root')
);
21 changes: 21 additions & 0 deletions examples/bower-brunch/app/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
html, body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}

section {
height: 100%;
}

.SwipeViewsTab {
font-family: Roboto, sans-serif;
font-size: 13px;
font-weight: 500;
color: #CCCCCC;
}

.SwipeView {
padding: 10px;
}
21 changes: 21 additions & 0 deletions examples/bower-brunch/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "react-swipe-views-bower-brunch-example",
"version": "0.0.1",
"moduleType": [
"globals"
],
"author": "Damien Varron <[email protected]> (http://github.com/damusnet)",
"license": "MIT",
"homepage": "https://github.com/damusnet/react-swipe-views",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"react": "~0.13.1",
"react-swipe-views": "~0.0.1"
}
}
6 changes: 6 additions & 0 deletions examples/bower-brunch/brunch-config.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = config:
files:
javascripts: joinTo: 'js/bundle.js'
stylesheets: joinTo: 'css/bundle.css'
server:
run: yes
18 changes: 18 additions & 0 deletions examples/bower-brunch/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "react-swipe-views-bower-brunch-example",
"version": "0.0.1",
"description": "An implementation example of react-swipe-views built with Bower and Brunch",
"main": "app/scripts/main.js",
"scripts": {
"install": "bower install",
"start": "brunch watch",
"build": "brunch build"
},
"devDependencies": {
"babel-brunch": "^4.0.0",
"browser-sync-brunch": "0.0.9",
"brunch": "^1.7.20",
"css-brunch": "^1.7.0",
"javascript-brunch": "^1.7.1"
}
}
28 changes: 28 additions & 0 deletions examples/npm-webpack/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>React Swipe Views - NPM/Webpack Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
</head>
<body>
<!-- This script adds the Roboto font to our project. For more detail go to this site: http://www.google.com/fonts#UsePlace:use/Collection:Roboto:400,300,500 -->
<script>
var WebFontConfig = {
google: { families: [ 'Roboto:400,300,500:latin' ] }
};
(function() {
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<section id='root'></section>
</body>
<script src="/src/bundle.js"></script>
</html>
21 changes: 21 additions & 0 deletions examples/npm-webpack/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "react-swipe-views-npm-webpack-example",
"version": "0.0.1",
"description": "An implementation example of react-swipe-views built with NPM and Webpack",
"scripts": {
"start": "node server.js"
},
"devDependencies": {
"babel-core": "^4.7.4",
"babel-loader": "^4.1.0",
"react-hot-loader": "^1.2.2",
"webpack": "^1.7.2",
"webpack-dev-server": "^1.7.0"
},
"dependencies": {
"react": "^0.13.0",
"react-swipe-views": "~0.0.1",
"style-loader": "~0.9.0",
"css-loader": "~0.9.1"
}
}
15 changes: 15 additions & 0 deletions examples/npm-webpack/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var config = require('./webpack.config');

new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
hot: true,
historyApiFallback: true
}).listen(3000, '0.0.0.0', function (err, result) {
if (err) {
console.log(err);
}

console.log('Listening at localhost:3000');
});
32 changes: 32 additions & 0 deletions examples/npm-webpack/src/components/App.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions examples/npm-webpack/src/components/MyAwesomeComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

import React from 'react';

export default class MyAwesomeComponent extends React.Component {

render() {
return (
<div className="test">
<h1>This is a test!</h1>
<p>lorem ipsum</p>
</div>
);
}

}
14 changes: 14 additions & 0 deletions examples/npm-webpack/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

import React from 'react';
import App from './components/App';

require('./main.css');
require('../../../src/SwipeViews.css');

React.initializeTouchEvents(true);

React.render(
<App />,
document.getElementById('root')
);
Loading

0 comments on commit 460f221

Please sign in to comment.