mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Merge remote-tracking branch 'remotes/origin/master' into AD-416-account-settings-page-navbar
Conflicts: .gitmodules node_modules/react-s3-fineuploader
This commit is contained in:
commit
b4c2cd73a5
35
docs/git-submodule-workflow.md
Normal file
35
docs/git-submodule-workflow.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Git Submodule Workflow
|
||||
|
||||
**ATTENTION: Adding submodules at the wrong place of the project will actually f&%k up your git if you want to remove them again. So please take all those steps with care!!!**
|
||||
|
||||
1. Create a new repository on bitbucket
|
||||
2. Clone it and create the main file: `my_component.js`
|
||||
```javascript
|
||||
import React from 'react';
|
||||
|
||||
let MyComponent = React.createClass({
|
||||
render() {
|
||||
return (
|
||||
<div></div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default MyComponent;
|
||||
```
|
||||
|
||||
3. Open a shell and go to `cd onion/node_modules`
|
||||
4. Commit and push to your newly created repository
|
||||
5. Open `.gitignore` and add your future package folder to *NOT* to be ignored by git `!node_modules/<my-repository-name>`
|
||||
6. Copy the repository's SSH link from bitbucket
|
||||
7. Do `git submodule add <your-ssh-link>`
|
||||
8. Git will clone the repository and add it to `node_modules`
|
||||
9. open `package.json` inside of onion and adjust the `browser` field
|
||||
```
|
||||
"browser": {
|
||||
"MyComponent": "./node_modules/my_component/my_component.js"
|
||||
}
|
||||
```
|
||||
10. (Optional) If you have browserify-shims in your newly created module, then add them in the `browserify-shim` as well. Check `package.json` for example.
|
||||
11. Open `gulpfile.js` and find the `filesToWatch` property of `var config`. Add your newly added `my_component` folder to it: `'node_modules/<my_component>/*.js'`
|
||||
12. THAT'S IT! YOU'RE AWESOME!
|
13
docs/refactor-todo.md
Normal file
13
docs/refactor-todo.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Refactor TODO
|
||||
|
||||
*This should be a living document. So if you have any ideas for refactoring stuff, then feel free to add them to this document*
|
||||
|
||||
- Get rid of all Mixins.
|
||||
- Make all standalone components independent from things like global utilities (GeneralUtils is maybe used in table for example)
|
||||
- Check if all polyfills are appropriately initialized and available: Compare to this
|
||||
- Extract all standalone components to their own folder structure and write application independent tests (+ figure out how to do that in a productive way) (fetch lib especially)
|
||||
- Refactor forms to generic-declarative form component
|
||||
- Check for mobile compatibility: Is site responsive anywhere?
|
||||
queryParams of the piece_list_store should all be reflected in the url and not a single component each should manipulate the URL bar (refactor pagination, use actions and state)
|
||||
- Refactor string-templating for api_urls
|
||||
- Use classNames plugin instead of if-conditional-classes
|
@ -45,7 +45,12 @@ var config = {
|
||||
'react',
|
||||
'es6'
|
||||
]
|
||||
}
|
||||
},
|
||||
filesToWatch: [
|
||||
'build/css/*.css',
|
||||
'build/js/*.js',
|
||||
'node_modules/react-s3-fineuploader/*.js'
|
||||
]
|
||||
};
|
||||
|
||||
var constants = {
|
||||
@ -83,7 +88,7 @@ gulp.task('run-server', function() {
|
||||
|
||||
gulp.task('browser-sync', function() {
|
||||
browserSync({
|
||||
files: ['build/css/*.css', 'build/js/*.js'],
|
||||
files: config.filesToWatch,
|
||||
proxy: 'http://localhost:4000',
|
||||
port: 3000
|
||||
});
|
||||
|
20
package.json
20
package.json
@ -12,12 +12,32 @@
|
||||
"build": "gulp build --production",
|
||||
"start": "node server.js"
|
||||
},
|
||||
"browser": {
|
||||
"fineUploader": "./node_modules/react-s3-fineuploader/vendor/s3.fine-uploader.js",
|
||||
"ReactS3FineUploader": "./node_modules/react-s3-fineuploader/react_s3_fineuploader.js"
|
||||
},
|
||||
"browserify-shim": {
|
||||
"fineUploader": "qq"
|
||||
},
|
||||
"browserify": {
|
||||
"transform": [
|
||||
[
|
||||
"babelify",
|
||||
{
|
||||
"compact": false
|
||||
}
|
||||
],
|
||||
"reactify",
|
||||
"browserify-shim"
|
||||
]
|
||||
},
|
||||
"author": "Ascribe",
|
||||
"license": "Copyright",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^3.1.11",
|
||||
"babel-jest": "^5.2.0",
|
||||
"browserify-shim": "^3.8.9",
|
||||
"jest-cli": "^0.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
Loading…
Reference in New Issue
Block a user