Skip to content

Instantly share code, notes, and snippets.

View petrjasek's full-sized avatar
🏡
Working from home

Petr Jašek petrjasek

🏡
Working from home
View GitHub Profile
'use strict';
module.exports = function(grunt) {
require('superdesk-core/Gruntfile')(grunt);
grunt.loadNpmTasks('grunt-connect-proxy');
var middlewareConfig = grunt.config('connect.test.options.middleware');
grunt.config('connect.test.options.middleware', function(connect, options, middlewares) {
middlewares.push(require('grunt-connect-proxy/lib/utils').proxyRequest);
@petrjasek
petrjasek / signals.js
Created April 11, 2019 12:27
signals api
// in module config
signals.connect('authoring:change', (item, diff, $scope) => { ... });
// launch signal
signals.send('authoring:change', {item, diff, $scope});
export class Alert extends React.PureComponent<IProps, IState> {
constructor(props: IProps) {
super(props);
this.state = {
open: true,
};
this.onToggle = this.onToggle.bind(this);
}
onToggle() {