Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a7337c2
Showing
25 changed files
with
1,455 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "stage-0", "react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"scripts": { | ||
"postinstall": "npm run rename-css-bower-dependencies" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
// I want to use babel-eslint for parsing! | ||
"parser": "babel-eslint", | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"jasmine": true | ||
}, | ||
|
||
// To give you an idea how to override rule options: | ||
"rules": { | ||
"quotes": [2, "single"], | ||
"strict": [2, "never"], | ||
"eol-last": [0], | ||
"no-mixed-requires": [0], | ||
"no-underscore-dangle": [0], | ||
"no-use-before-define": [2, "nofunc"], | ||
|
||
"no-alert": 0, | ||
|
||
// react | ||
"react/display-name": 0, | ||
"react/jsx-boolean-value": 1, | ||
"react/jsx-quotes": 1, | ||
"react/jsx-no-undef": 1, | ||
"react/jsx-sort-props": 0, | ||
"react/jsx-sort-prop-types": 1, | ||
"react/jsx-uses-react": 1, | ||
"react/jsx-uses-vars": 1, | ||
"react/no-did-mount-set-state": 1, | ||
"react/no-did-update-set-state": 1, | ||
"react/no-multi-comp": 0, | ||
"react/no-unknown-property": 1, | ||
"react/prop-types": 0, | ||
"react/react-in-jsx-scope": 1, | ||
"react/self-closing-comp": 1, | ||
"react/wrap-multilines": 1 | ||
}, | ||
|
||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
|
||
"plugins": [ | ||
"react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
bower_components | ||
.DS_Store | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# react calendar timeline | ||
|
||
Get the AMD module located at `react-calendar-timeline.js` and include it in your project. | ||
|
||
Here is a sample integration: | ||
|
||
```js | ||
require.config({ | ||
paths: { | ||
'react': 'vendor/bower_components/react/react', | ||
'ReactCalendarTimeline': 'react-calendar-timeline' | ||
} | ||
}); | ||
|
||
require(['react', 'ReactCalendarTimeline'], function(React, ReactCalendarTimeline) { | ||
|
||
React.render(React.createElement(ReactCalendarTimeline), document.getElementById('widget-container')); | ||
|
||
}); | ||
``` | ||
|
||
## Development | ||
|
||
* Development server `npm start`. | ||
* Continuously run tests on file changes `npm run watch-test`; | ||
* Run tests: `npm test`; | ||
* Build `npm run build`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "react-calendar-timeline", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"author": "", | ||
"private": true, | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"spec", | ||
"test", | ||
"tests" | ||
], | ||
"moduleType": [ | ||
"amd", | ||
"globals" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<html> | ||
<head> | ||
<title>react calendar timeline Demo</title> | ||
</head> | ||
<body> | ||
<div id="main"></div> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0/react.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.js"></script> | ||
<script src="react-calendar-timeline.js"></script> | ||
<script> | ||
var groups = [ | ||
{ | ||
id: '1', | ||
title: "First" | ||
}, | ||
{ | ||
id: '2', | ||
title: "Second" | ||
}, | ||
{ | ||
id: '3', | ||
title: "Third" | ||
} | ||
]; | ||
|
||
var items = [ | ||
{ | ||
id: '1000', | ||
group: '1', | ||
title: "First Item", | ||
start: moment("2014-09-24T10:00:00Z").toDate(), | ||
end: moment("2014-09-25T10:00:00Z").toDate() | ||
}, | ||
{ | ||
id: '1001', | ||
group: '3', | ||
title: "Second Item", | ||
start: moment("2014-09-24T12:00:00Z").toDate(), | ||
end: moment("2014-09-24T16:00:00Z").toDate() | ||
} | ||
]; | ||
|
||
/* jshint undef:false */ | ||
ReactDOM.render(React.createElement(ReactCalendarTimeline['default'], {groups: groups, items: items}), document.getElementById('main')); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module.exports = function(config) { | ||
config.set({ | ||
basePath: '.', | ||
|
||
frameworks: ['jasmine'], | ||
browsers: ['PhantomJS'], | ||
|
||
files: [ | ||
// shim to workaroud PhantomJS 1.x lack of `bind` support | ||
// see: https://github.com/ariya/phantomjs/issues/10522 | ||
'node_modules/es5-shim/es5-shim.js', | ||
|
||
// React is an external dependency of the component | ||
'node_modules/react/dist/react-with-addons.js', | ||
|
||
'spec/spec-helper.js', | ||
'spec/**/*.spec.*', | ||
{ pattern: 'lib/**/*', watched: true, included: false } | ||
], | ||
|
||
preprocessors: { | ||
// add webpack as preprocessor | ||
'spec/**/*.spec.*': ['webpack', 'sourcemap'] | ||
}, | ||
|
||
webpack: loadWebpackConfig(), | ||
|
||
webpackServer: { | ||
noInfo: true | ||
}, | ||
|
||
singleRun: true | ||
}); | ||
}; | ||
|
||
|
||
/** | ||
Loads configuration while ensuring sounce-map is enabled | ||
*/ | ||
function loadWebpackConfig () { | ||
var webpackConfig = require('./webpack.config.js'); | ||
webpackConfig.devtool = 'inline-source-map'; | ||
return webpackConfig; | ||
} |
Oops, something went wrong.