Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Change browserify options to use alias / external
Browse files Browse the repository at this point in the history
Use SystemJS instead of custom implementation for libraries dependencies.
  • Loading branch information
cdujeu committed Apr 1, 2017
1 parent 44b154b commit d96c2fd
Show file tree
Hide file tree
Showing 22 changed files with 192 additions and 259 deletions.
6 changes: 3 additions & 3 deletions core/src/plugins/access.fs/fsActions.xml
Expand Up @@ -372,9 +372,9 @@
</actions>
<client_configs>
<component_config className="InfoPanel">
<infoPanel mime="generic_file" reactComponent="PydioDetailPanes.GenericFile" weight="-1000"/>
<infoPanel mime="generic_dir" reactComponent="PydioDetailPanes.GenericDir" weight="-1000"/>
<infoPanel mime="generic_multiple" reactComponent="PydioDetailPanes.GenericMultiple" weight="-1000"/>
<infoPanel mime="generic_file" reactComponent="PydioWorkspaces.InfoGenericFile" weight="-1000"/>
<infoPanel mime="generic_dir" reactComponent="PydioWorkspaces.InfoGenericDir" weight="-1000"/>
<infoPanel mime="generic_multiple" reactComponent="PydioWorkspaces.InfoGenericMultiple" weight="-1000"/>
</component_config>
</client_configs>
</registry_contributions>
6 changes: 3 additions & 3 deletions core/src/plugins/action.share/res/react/ShareInfoPanel.js
Expand Up @@ -180,7 +180,7 @@
style={{flex:1, display:'flex', alignItems:'center'}}
labelStyle={{fontSize: 15, paddingLeft: 10}}
avatarSize={26}
richOnHover={u.TYPE !== 'group'}
richOnHover={u.TYPE !== 'group' && u.ID.indexOf('/AJXP_TEAM/')!== 0}
/>
</div>
);
Expand Down Expand Up @@ -266,9 +266,9 @@
];

return (
<PydioDetailPanes.InfoPanelCard title={this.props.pydio.MessageHash['share_center.50']} actions={actions} icon="share-variant" iconColor="#009688" iconStyle={{fontSize:13, display:'inline-block', paddingTop:3}}>
<PydioWorkspaces.InfoPanelCard title={this.props.pydio.MessageHash['share_center.50']} actions={actions} icon="share-variant" iconColor="#009688" iconStyle={{fontSize:13, display:'inline-block', paddingTop:3}}>
<InfoPanel {...this.props}/>
</PydioDetailPanes.InfoPanelCard>
</PydioWorkspaces.InfoPanelCard>
);

}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.conf/standard_conf_actions.xml
Expand Up @@ -257,7 +257,7 @@
paneInfo='{"namespace":"UserAccount", "componentName":"WebDAVPane"}'/>
</component_config>
<component_config className="InfoPanel">
<infoPanel mime="ajxp_root_node" reactComponent="PydioDetailPanes.RootNode" weight="-1000"/>
<infoPanel mime="ajxp_root_node" reactComponent="PydioWorkspaces.InfoRootNode" weight="-1000"/>
</component_config>
</client_configs>
</registry_contributions>
Expand Up @@ -174,7 +174,7 @@

return (

<PydioDetailPanes.InfoPanelCard title={label} icon="pulse" iconColor="#F57C00">
<PydioWorkspaces.InfoPanelCard title={label} icon="pulse" iconColor="#F57C00">
<div style={{padding: 0}}>
<PydioComponents.NodeListCustomProvider
pydio={pydio}
Expand All @@ -193,7 +193,7 @@
defaultSortingInfo={{attribute : 'event_time',sortType:'number',direction : 'desc'}}
/>
</div>
</PydioDetailPanes.InfoPanelCard>
</PydioWorkspaces.InfoPanelCard>

);

Expand Down
12 changes: 9 additions & 3 deletions core/src/plugins/gui.ajax/Gruntfile.js
Expand Up @@ -96,7 +96,10 @@ module.exports = function(grunt) {
alias:[
'./res/js/core/http/Connexion.js:pydio/http/connexion',
'./res/js/core/PydioBootstrap.js:pydio-bootstrap'
]
],
browserifyOptions: {
debug: true
}
},
files: {
'res/js/vendor/nodejs/boot.prod.js': 'res/js/vendor/nodejs/boot.js',
Expand All @@ -106,7 +109,10 @@ module.exports = function(grunt) {
options:{
alias: Object.keys(PydioCoreRequires).map(function(key){
return './res/js/core/' + key + ':' + PydioCoreRequires[key];
})
}),
browserifyOptions: {
debug: true
}
},
files: {
'res/js/core/PydioCore.js': 'res/js/core/index.js',
Expand Down Expand Up @@ -188,7 +194,7 @@ module.exports = function(grunt) {
'res/js/es6/*.es6',
'res/js/es6/**/*.es6'
],
tasks:['babel:dist'],
tasks:['babel:dist', 'browserify:core'],
options:{
spawn:false
}
Expand Down
43 changes: 33 additions & 10 deletions core/src/plugins/gui.ajax/manifest.xml
Expand Up @@ -3,25 +3,48 @@
<client_settings>
<resources>
<i18n namespace="ajax_gui" path="plugins/gui.ajax/res/i18n"/>
<js file="plugins/gui.ajax/res/js/vendor/nodejs/bundle.prod.min.js" className="React"
fallbackCondition="!window.addEventListener" fallbackFile="plugins/gui.ajax/res/js/vendor/nodejs/bundle.legacy.min.js"/>
<js className="PydioCoreActions" file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioCoreActions.js" depends="React"/>
<js className="PydioForm" file="plugins/gui.ajax/res/js/ui/reactjs/build/ReactFormComponents.js"/>
<js
className="React"
file="plugins/gui.ajax/res/js/vendor/nodejs/bundle.prod.min.js"
fallbackCondition="!window.addEventListener"
fallbackFile="plugins/gui.ajax/res/js/vendor/nodejs/bundle.legacy.min.js"
/>
<js
className="PydioCoreActions"
file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioCoreActions.js"
depends="React"
/>
<js
className="PydioForm"
file="plugins/gui.ajax/res/js/ui/reactjs/build/ReactFormComponents.js"
/>
<js
className="PydioReactUI"
file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioReactUI.min.js"
fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioReactUI.js"
fallbackCondition="pydio.Parameters.get('debugMode')"
depends="React"
/>
<js className="PydioComponents" file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioComponents.min.js" depends="React"
fallbackCondition="pydio.Parameters.get('debugMode')" fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioComponents.js"
<js
className="PydioComponents"
file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioComponents.min.js"
depends="React"
fallbackCondition="pydio.Parameters.get('debugMode')"
fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioComponents.js"
/>
<js className="PydioHOCs" file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioHOCs.min.js" depends="React"
fallbackCondition="pydio.Parameters.get('debugMode')" fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioHOCs.js"
<js
className="PydioHOCs"
file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioHOCs.min.js"
depends="React"
fallbackCondition="pydio.Parameters.get('debugMode')"
fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioHOCs.js"
/>
<js className="PydioWorkspaces" file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioWorkspaces.min.js" depends="React,PydioComponents,PydioHOCs,PydioTasks"
fallbackCondition="pydio.Parameters.get('debugMode')" fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioWorkspaces.js"
<js
className="PydioWorkspaces"
file="plugins/gui.ajax/res/js/ui/reactjs/build/PydioWorkspaces.min.js"
fallbackCondition="pydio.Parameters.get('debugMode')"
fallbackFile="plugins/gui.ajax/res/js/ui/reactjs/build/PydioWorkspaces.js"
depends="React,PydioComponents,PydioHOCs,PydioTasks"
/>
<css file="plugins/gui.ajax/res/mui/pydio-mui.css" autoload="true"/>
</resources>
Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/gui.ajax/package.json
Expand Up @@ -43,6 +43,7 @@
"react-tap-event-plugin": "^2.0.1",
"reactify": "^1.1.1",
"redux": "*",
"systemjs": "^0.20.11",
"whatwg-fetch": "^2.0.2"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion core/src/plugins/gui.ajax/res/js/dist.js
Expand Up @@ -54,7 +54,8 @@ const LibRequires = [ // modules we want to require and export
'react-mfb',
'cronstrue',
'react-tap-event-plugin',
'whatwg-fetch'
'whatwg-fetch',
'systemjs'
]

const Externals = Object.keys(PydioCoreRequires).map(function(key){
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/es6/http/Connexion.es6
Expand Up @@ -88,7 +88,7 @@ class Connexion{
*/
addParameter(paramName, paramValue){
if(this._parameters.get(paramName) && paramName.endsWith('[]')){
var existing = this._parameters.get(paramName);
let existing = this._parameters.get(paramName);
if(!existing instanceof Array) {
existing = [existing];
}
Expand Down
13 changes: 1 addition & 12 deletions core/src/plugins/gui.ajax/res/js/es6/http/PydioApi.es6
Expand Up @@ -17,6 +17,7 @@
*
* The latest code can be found at <https://pydio.com>.
*/
import XMLUtils from '../util/XMLUtils'
/**
* API Client
*/
Expand Down Expand Up @@ -95,18 +96,6 @@ class PydioApi{
let c = new Connexion();
return c.uploadFile(file, fileParameterName, uploadUrl, onComplete, localError, onProgress, xhrSettings);

}else if(window.jQuery){

let formData = new FormData();
formData.append(fileParameterName, file);
return jQuery.ajax(uploadUrl, {
method:'POST',
data:formData,
complete:onComplete,
error:onError,
progress:onProgress
});

}

}
Expand Down

0 comments on commit d96c2fd

Please sign in to comment.