...
 
Commits (15)
# Constitution participative
Le meta-projet traitant des différents logiciels utilisés pour le projet de réforme participative de la constitution
\ No newline at end of file
Le meta-projet traitant des différents logiciels utilisés pour le projet de réforme participative de la constitution
* [Documentation en ligne](http://parlement-ouvert.frama.io/amenda/) générée automatiquement
const app = require('express')();
const bodyParser = require('body-parser');
const proxy = require('express-http-proxy');
const querystring = require('querystring');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
......@@ -47,7 +48,7 @@ app.use('/api/v1/ping', require('./ping'));
*/
app.get('/api/v1/project/:project_id/articles', proxy('localhost:8000', {
proxyReqPathResolver: (req) => {
return '/admin/api/v4/projects/' + req.params.project_id + '/repository/tree'
return '/admin/api/v4/projects/' + req.params.project_id + '/repository/tree';
},
userResDecorator: (proxyRes, proxyResData, userRaq, userReq) => {
var data = JSON.parse(proxyResData.toString('utf8'));
......@@ -57,13 +58,13 @@ app.get('/api/v1/project/:project_id/articles', proxy('localhost:8000', {
}));
/**
* @api {get} /project/:project_id/:branch/:file_path An article
* @api {get} /project/:project_id/:branch/:file_path Get article content
* @apiVersion 1.0.0
* @apiDescription Render a specific article for the specified project
* @apiName An article
* @apiGroup Utils
* @apiDescription Get an article content
* @apiName Get article content
* @apiGroup Article
*
* @apiSuccess {String} text of file
* @apiSuccess {String} content of the file
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
......@@ -72,10 +73,105 @@ app.get('/api/v1/project/:project_id/articles', proxy('localhost:8000', {
* ]
*/
app.get('/api/v1/project/:project_id/:ref/:file_path', proxy('localhost:8000', {
proxyReqPathResolver: (req) => {
console.log('/admin/api/v4/projects/' + req.params.project_id + '/repository/files/' + req.params.file_path + '?re/raw=' + req.params.ref);
return '/admin/api/v4/projects/' + req.params.project_id + '/repository/files/' + req.params.file_path + '/raw?ref=' + req.params.ref
}
proxyReqPathResolver: (req) => {
return '/admin/api/v4/projects/' + req.params.project_id
+ '/repository/files/' + req.params.file_path
+ '/raw?ref=' + req.params.ref;
}
}));
/**
* @api {put} /project/:project_id/:amendment/:file_path Set an article content
* @apiVersion 1.0.0
* @apiDescription Set an article content
* @apiName Set article article
* @apiGroup Article
*
* @apiParam (URL) {String} project_id the ID of the project
* @apiParam (URL) {String} project_id the path of the update article
* @apiParam (URL) {String} amendment the amendment name
* @apiParam (URL) {String} article_path the article path
* @apiParam (POST) {String} content the new content of the article
* @apiParam (POST) {String} commit_message the commit message
*
* @apiSuccess {String} file_path path of the modified article
* @apiSuccess {String} branch the amendment name
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 200 OK
* {
* "file_path": "Article_42.md",
* "branch": "master"
* }
*/
app.put('/api/v1/project/:project_id/:amendment/:file_path', proxy('localhost:8000', {
proxyReqPathResolver: (req) => {
return '/admin/api/v4/projects/' + req.params.project_id
+ '/repository/files/' + req.params.file_path
+ '?branch=' + req.params.amendment;
}
}));
/**
* @api {post} /api/v1/project/:project_id/amendment/:amendment Create amendment
* @apiVersion 1.0.0
* @apiDescription Create a new amendment project (=> a new git branch).
* @apiName Create amendment
* @apiGroup Amendment
*
* @apiParam (URL) {String} project_id the ID of the project
* @apiParam (URL) {String} amendment the amendment name
*
* @apiSuccessExample Success-Response:
* HTTP/1.1 201 OK
* {
* "commit": {
* "author_email": "john@example.com",
* "author_name": "John Smith",
* "authored_date": "2012-06-27T05:51:39-07:00",
* "committed_date": "2012-06-28T03:44:20-07:00",
* "committer_email": "john@example.com",
* "committer_name": "John Smith",
* "id": "7b5c3cc8be40ee161ae89a06bba6229da1032a0c",
* "short_id": "7b5c3cc",
* "title": "add projects API",
* "message": "add projects API",
* "parent_ids": [
* "4ad91d3c1144c406e50c7b33bae684bd6837faf8"
* ]
* },
* "name": "newbranch",
* "merged": false,
* "protected": false,
* "developers_can_push": false,
* "developers_can_merge": false
* }
*/
app.post('/api/v1/project/:project_id/amendment/:amendment', proxy('localhost:8000', {
proxyReqPathResolver: (req) => {
return '/admin/api/v4/projects/' + req.params.project_id
+ '/repository/branches'
+ '?ref=master'
+ '&branch=' + querystring.escape(req.params.branch);
},
}));
/**
* @api {delete} /api/v1/project/:project_id/amendment/:amendment Delete amendment
* @apiVersion 1.0.0
* @apiDescription Delete an amendment (aka a git branch) from a project.
* @apiName Delete amendment
* @apiGroup Amendment
*
* @apiParam (URL) {String} project_id the ID of the project
* @apiParam (URL) {String} amendment the amendment name
*
*/
app.delete('/api/v1/project/:project_id/amendment/:amendment', proxy('localhost:8000', {
proxyReqPathResolver: (req) => {
return '/admin/api/v4/projects/' + req.params.project_id
+ '/repository/branches/' + encodeURIComponent(req.params.amendment);
},
}));
app.listen(3001, () => {
......
This diff is collapsed.
......@@ -4,14 +4,62 @@
"private": true,
"dependencies": {
"react": "^16.0.0",
"react-collapsible": "^2.0.3",
"react-dom": "^16.0.0",
"react-scripts": "1.0.13"
"react-redux": "^5.0.6",
"react-scripts": "1.0.13",
"react-toolbox": "^2.0.0-beta.12",
"redux": "^3.7.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"toolbox": "react-toolbox-themr"
},
"proxy": "http://localhost:3001/"
"proxy": "http://localhost:3001/",
"devDependencies": {
"react-toolbox-themr": "^1.0.2"
},
"reactToolbox": {
"include": [
"APP_BAR",
"AUTOCOMPLETE",
"AVATAR",
"BUTTON",
"CARD",
"CHECKBOX",
"CHIP",
"DATE_PICKER",
"DIALOG",
"DRAWER",
"DROPDOWN",
"INPUT",
"LAYOUT",
"LINK",
"LIST",
"MENU",
"NAVIGATION",
"OVERLAY",
"PROGRESS_BAR",
"RADIO",
"RIPPLE",
"SLIDER",
"SNACKBAR",
"SWITCH",
"TABLE",
"TABS",
"TIME_PICKER",
"TOOLTIP"
],
"customProperties": {
"animation-duration": "0.3s",
"color-accent": "var(--palette-pink-a200)",
"color-accent-dark": "var(--palette-pink-700)",
"color-primary-contrast": "var(--color-dark-contrast)",
"color-accent-contrast": "var(--color-dark-contrast)"
},
"output": "src/asset/react-toolbox"
}
}
This diff is collapsed.
module.exports={"RTButton":{"button":"_2Agdx","rippleWrapper":"_3AVBi","squared":"_2GH_L","icon":"_3aBSX","solid":"_1ZxqC","raised":"_221ic _2Agdx _2GH_L _1ZxqC","flat":"_1jWAQ _2Agdx _2GH_L","floating":"_3IRMZ _2Agdx _1ZxqC","mini":"_2DCN-","toggle":"hC5Z2 _2Agdx","primary":"_3tTAW","accent":"_2wp6F","neutral":"_2CPs4","inverse":"_2SPZr"},"RTRipple":{"rippleWrapper":"_16N7o","ripple":"_3SV_u","rippleRestarting":"_2OZWa","rippleActive":"_3O2Ue"},"RTDatePicker":{"input":"_2ISvI","disabled":"Cf3yF","inputElement":"x7MhN","header":"_2vLUd","year":"_1VWY-","date":"_3K2Ws","calendarWrapper":"_1t-4v","yearsDisplay":"_2OzvT","monthsDisplay":"_2DDdC","dialog":"_3fCV6","button":"_2hL6u","calendar":"_1X9ls","prev":"Nv9Bc","next":"_3iPkS","title":"_2ESpD","years":"zEdgW","active":"_1pjXb","week":"PcByv","days":"_1qh3T","day":"_2qF_L","month":"_1hSm5","slideRightEnter":"Rk89h","slideRightLeave":"_1nam4","slideRightEnterActive":"m5B3T","slideRightLeaveActive":"_2bZap","slideLeftEnter":"bGml_","slideLeftLeave":"_2WGqM","slideLeftEnterActive":"_3Ghls","slideLeftLeaveActive":"_2WLHG"},"RTInput":{"input":"lFVgC","withIcon":"_1nKdf","icon":"_3ga1V","inputElement":"_4bZUj","bar":"_3FySS","label":"_34120","fixed":"GRQEP","required":"_2G0aY","hint":"bMyi_","filled":"_34NWn","error":"_2k5Jz","counter":"_1oTuT","disabled":"_3ZfJq","errored":"_2s74E","hidden":"_2gAMv"},"RTDialog":{"wrapper":"_3nrqp","dialog":"_3lw90","active":"_3ea_1","small":"_38VTT","normal":"_1K3iz","large":"_10LcP","fullscreen":"_3tLXQ","title":"_2J-aP","body":"_1Ivuq","navigation":"wgwdj","button":"_22_c6"},"RTOverlay":{"overlay":"_2LA9x","active":"_1mb5R"}}
\ No newline at end of file
import React, { Component } from 'react';
import './asset/react-toolbox/theme.css';
import './asset/font/material-icons.css';
import './asset/font/roboto.css';
import './App.css';
import AppBar from 'react-toolbox/lib/app_bar/AppBar';
import Navigation from 'react-toolbox/lib/navigation/Navigation';
import Link from 'react-toolbox/lib/link/Link';
import Tab from 'react-toolbox/lib/tabs/Tab';
import Tabs from 'react-toolbox/lib/tabs/Tabs';
import Layout from 'react-toolbox/lib/layout/Layout';
import Panel from 'react-toolbox/lib/layout/Panel';
import {List, ListItem, ListDivider} from 'react-toolbox/lib/list';
import Collapsible from 'react-collapsible';
import theme from './asset/react-toolbox/theme';
import ThemeProvider from 'react-toolbox/lib/ThemeProvider';
class App extends Component {
state = {
index: 0,
selectedAmendment: false,
};
// FIXME: should come from a "store"
amendements = [
{
id: 0,
title: "Dr. Manhattan",
description: "Exemple d'amendement soumis",
status: "done",
},
{
id: 1,
title: "Ozymandias",
description: "Exemple d'amendement accepté",
status: "done_all",
},
{
id: 2,
title: "Rorschach",
description: "Exemple d'amendement en cours de rédaction",
status: "mode_edit",
},
{
id: 3,
title: "The Comedian",
description: "Exemple d'amendement rejeté",
status: "not_interested",
}
];
handleTabChange = (index) => {
this.setState({
index,
selectedAmendment: false,
});
};
handleAmendmentClick = (amendmentId) => {
this.setState({
selectedAmendment: this.amendements.filter((a) => a.id === amendmentId)[0]
});
};
render() {
return (
<div className="App">
<div className="App-header">
<h2>Hello World!</h2>
</div>
<p className="App-intro">
To get started, edit <code>src/App.js</code> and save to reload.
</p>
</div>
<ThemeProvider theme={theme}>
<Layout>
<Panel>
<AppBar title='Amenda'>
<Navigation type='horizontal'>
</Navigation>
</AppBar>
<div style={{ flex: 1, overflowY: 'auto', padding: '1.8rem' }}>
<Tabs
index={this.state.index}
onChange={this.handleTabChange}>
<Tab label='Projet de loi'>
<List selectable ripple>
<Collapsible
trigger={
<ListItem
rightIcon="keyboard_arrow_down"
caption="Article 1" />
}
triggerWhenOpen={
<ListItem
rightIcon="keyboard_arrow_up"
caption="Article 1" />
}
easing="ease-in-out">
<ListItem>
<small>
Contenu de l'article 1.
</small>
</ListItem>
</Collapsible>
<Collapsible
trigger={
<ListItem
rightIcon="keyboard_arrow_down"
caption="Article 2" />
}
triggerWhenOpen={
<ListItem
rightIcon="keyboard_arrow_up"
caption="Article 2" />
}
easing="ease-in-out">
<ListItem>
<small>
Contenu de l'article 2.
</small>
</ListItem>
</Collapsible>
</List>
</Tab>
<Tab
label='Amendements (4)'
onActive={this.handleActive}>
{
this.state.selectedAmendment === false
?
<List selectable ripple>
{
this.amendements.map((amendement) => {
return <ListItem
key={amendement.id}
caption={amendement.title}
legend={amendement.description}
leftIcon={amendement.status}
onClick={() => this.handleAmendmentClick(amendement.id) }
/>
})
}
</List>
:
<section>
<h1>
{this.state.selectedAmendment.title}
</h1>
<p>
{this.state.selectedAmendment.description}
</p>
</section>
}
</Tab>
</Tabs>
</div>
</Panel>
</Layout>
</ThemeProvider>
);
}
}
......
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url(MaterialIcons-Regular.woff2) format('woff2'),
url(MaterialIcons-Regular.woff) format('woff'),
url(MaterialIcons-Regular.ttf) format('truetype');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}
This diff is collapsed.
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('roboto-v18-latin-regular.eot'); /* IE9 Compat Modes */
src: local('Roboto'), local('Roboto-Regular'),
url('roboto-v18-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('roboto-v18-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
url('roboto-v18-latin-regular.woff') format('woff'), /* Modern Browsers */
url('roboto-v18-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
url('roboto-v18-latin-regular.svg#Roboto') format('svg'); /* Legacy iOS */
}
This diff is collapsed.
module.exports={"RTAppBar":{"appBar":"_3Py1Z","scrollHide":"PyOfn","flat":"_1J9he","fixed":"_2dwFx","inner":"lGWLJ","title":"_37vtt","leftIcon":"_30BcY","rightIcon":"_1hv3P"},"RTButton":{"button":"_2Agdx","rippleWrapper":"_3AVBi","squared":"_2GH_L","icon":"_3aBSX","solid":"_1ZxqC","raised":"_221ic _2Agdx _2GH_L _1ZxqC","flat":"_1jWAQ _2Agdx _2GH_L","floating":"_3IRMZ _2Agdx _1ZxqC","mini":"_2DCN-","toggle":"hC5Z2 _2Agdx","primary":"_3tTAW","accent":"_2wp6F","neutral":"_2CPs4","inverse":"_2SPZr"},"RTRipple":{"rippleWrapper":"_16N7o","ripple":"_3SV_u","rippleRestarting":"_2OZWa","rippleActive":"_3O2Ue"},"RTAutocomplete":{"autocomplete":"_07g5","focus":"_3qQkg","suggestions":"_3-Nb6","values":"_14fVf","value":"cBUoJ","up":"_3rmye","suggestion":"_1erPE","active":"kDY3Z","input":"_1ryxc"},"RTChip":{"chip":"_3Iv9P","avatar":"_2o8mD","deletable":"_2hlBs","delete":"_3nnfj","deleteIcon":"_2sopz","deleteX":"_10NaZ"},"RTAvatar":{"avatar":"_3OjJz","image":"_2Ueo9","letter":"_26GdB"},"RTInput":{"input":"lFVgC","withIcon":"_1nKdf","icon":"_3ga1V","inputElement":"_4bZUj","bar":"_3FySS","label":"_34120","fixed":"GRQEP","required":"_2G0aY","hint":"bMyi_","filled":"_34NWn","error":"_2k5Jz","counter":"_1oTuT","disabled":"_3ZfJq","errored":"_2s74E","hidden":"_2gAMv"},"RTCard":{"card":"_8pay8","raised":"_1AHwB","cardMedia":"_3Yc6z","wide":"_35NNe","square":"_1HBxg","content":"ewAVM","contentOverlay":"_1bBKz","cardTitle":"_1dU3o","cardActions":"ZoLIG","cardText":"K_kzH","title":"_3qCP3","subtitle":"_3p3mO","large":"_2iwOK","small":"_1RHxe"},"RTCheckbox":{"field":"_3Tq32","ripple":"_2NWrZ","text":"dXU7C","input":"_271V1","check":"_1CXAo","checked":"nSz7s","checkmark-expand":"_3GU9D","disabled":"_2jVLS"},"RTDatePicker":{"input":"_2ISvI","disabled":"Cf3yF","inputElement":"x7MhN","header":"_2vLUd","year":"_1VWY-","date":"_3K2Ws","calendarWrapper":"_1t-4v","yearsDisplay":"_2OzvT","monthsDisplay":"_2DDdC","dialog":"_3fCV6","button":"_2hL6u","calendar":"_1X9ls","prev":"Nv9Bc","next":"_3iPkS","title":"_2ESpD","years":"zEdgW","active":"_1pjXb","week":"PcByv","days":"_1qh3T","day":"_2qF_L","month":"_1hSm5","slideRightEnter":"Rk89h","slideRightLeave":"_1nam4","slideRightEnterActive":"m5B3T","slideRightLeaveActive":"_2bZap","slideLeftEnter":"bGml_","slideLeftLeave":"_2WGqM","slideLeftEnterActive":"_3Ghls","slideLeftLeaveActive":"_2WLHG"},"RTDialog":{"wrapper":"_3nrqp","dialog":"_3lw90","active":"_3ea_1","small":"_38VTT","normal":"_1K3iz","large":"_10LcP","fullscreen":"_3tLXQ","title":"_2J-aP","body":"_1Ivuq","navigation":"wgwdj","button":"_22_c6"},"RTOverlay":{"overlay":"_2LA9x","active":"_1mb5R"},"RTDrawer":{"wrapper":"_3eRY8","drawer":"_1sAOY","active":"EWFXC","right":"_2-4-H","left":"FKhpR"},"RTDropdown":{"dropdown":"ZzBNK","active":"_1DQ-E","values":"_2767w","label":"_2KjGM","value":"_6c1D5","up":"_1OA-G","disabled":"_1skVH","field":"d5bru","errored":"_3dZUG","templateValue":"_6dCtT","required":"_1j4LX","error":"fySw3","selected":"_3uiEo"},"RTLayout":{"layout":"wiKya","panel":"_3aW3s","bodyScroll":"_2uzOU","sidebarDrawer":"_2kCN0","navDrawerDrawer":"Cte92","pinned":"qf0ha","clipped":"_1y5eh","appbarInner":"_1S9wz","appbarFixed":"_2Q-xL","appbarAppBar":"F9Fy2","navDrawerPinned":"_2eOy5","appbarLeftIcon":"fZ13o","navDrawerClipped":"_2kROG","navDrawerWrapper":"_2gpOZ","sidebarPinned":"_3yo9c","sidebarClipped":"_1paQt","sidebarWrapper":"_1TUxm","sidebarWidth1":"_1EWpa","sidebarWidth2":"_37z5O","sidebarWidth3":"_24Dtc","sidebarWidth4":"_28mqi","sidebarWidth5":"K39iB","sidebarWidth6":"_2PjBX","sidebarWidth7":"_16Oxc","sidebarWidth8":"_3fr9v","sidebarWidth9":"iF_4K","sidebarWidth10":"_3mnwI","sidebarWidth11":"_2uccf","sidebarWidth12":"_1pU-9","sidebarWidth25":"_10h-v","sidebarWidth33":"BYRr2","sidebarWidth50":"_2L3ft","sidebarWidth66":"_31jol","sidebarWidth75":"_2Xvmh","sidebarWidth100":"_3T7B6"},"RTLink":{"icon":"_1-mD4","link":"_1Od3D","active":"_3blKB"},"RTList":{"list":"caNNQ","divider":"_2Jg3-","subheader":"q2l8C","inset":"_1HHo_","listItem":"ni6RH","ripple":"_2mi0Y","item":"_2GtDw","selectable":"_1OoR-","disabled":"_38DD6","checkboxItem":"OVyge","checkbox":"_3SG-0","left":"bHOJq","right":"OQ3Je","itemAction":"VB7pN","itemContentRoot":"_2FBCh","large":"EO5bo","itemText":"_12FqV","primary":"_3SxNr"},"RTMenu":{"iconMenu":"_2aMxm","icon":"_1b8Ml","menu":"_1gvr5","topLeft":"SYeW8","outline":"_2PdTB","topRight":"DFQvY","bottomLeft":"_3i7lA","bottomRight":"_3q-zB","static":"_2xf5n","menuInner":"_2t8UE","rippled":"_3o1JI","active":"_2Cekp","menuItem":"lyzBJ","disabled":"zGTpA","selected":"_2-j_P","ripple":"_2m_Cl","caption":"_3MsfE","shortcut":"_1anRY","menuDivider":"VX5Lv"},"RTNavigation":{"horizontal":"_1MJ9B","vertical":"xUlwz"},"RTProgressBar":{"linear":"_3vxHj","indeterminate":"_1gPzb","value":"I0PhY","linear-indeterminate-bar":"_1cU21","buffer":"SzbNd","circular":"_2j3vC","circle":"DlWjM","circular-indeterminate-bar-rotate":"zfZzh","path":"_1xZSU","circular-indeterminate-bar-dash":"_3DSlU","multicolor":"_3XHT8","colors":"Z_PDt"},"RTRadio":{"radio":"_1vWJb","ripple":"_78FVB","radioChecked":"_210O6 _1vWJb","field":"_36UDg","text":"_3guDD","input":"_2CPDD","disabled":"_39I6g _36UDg"},"RTSlider":{"container":"_-dLk","knob":"kq8Om","innerknob":"_8VjZ5","snaps":"_2x5j_","snap":"_12aGJ","input":"_2JHGy","progress":"_2R4jW","innerprogress":"_3p0mR","slider":"_3-BtZ","editable":"hkAL6","pinned":"_28Oo0","pressed":"_292qK","ring":"_2Oh5L"},"RTSnackbar":{"snackbar":"zDi3X","accept":"_2Y0Cy","button":"_2pCxU","warning":"_2li3o","cancel":"_3731C","active":"_38CsO","label":"_1JIbY"},"RTSwitch":{"field":"_1T2D0","text":"rxx-p","thumb":"_1pMry","ripple":"_1I9tv","on":"p92Yp","off":"_25ui_","input":"_3BTU_","switch-on":"_2Bwve","switch-off":"_1ZBFp","disabled":"_1CQ_q _1T2D0"},"RTTable":{"table":"_2xofu","head":"_1eF5Z","row":"_1qppP","selected":"_1H1dU","rowCell":"_18bqN","headCell":"gfcPv","numeric":"_3suRQ","checkboxCell":"_2yhwA","sorted":"_2r5OG","sortIcon":"_3NJs5","asc":"wZHUA"},"RTTabs":{"tabs":"_2EaQV","navigation":"_3e55Z","navigationContainer":"_3oZmF","arrow":"wPL4g","arrowContainer":"i_TGW","label":"_1yb8L","rippleWrapper":"_3c0W3","active":"_2LZ7Z","disabled":"_2gi1s","hidden":"_3kq1J","withIcon":"_1OFOx","withText":"_1Yf4A","icon":"_1LUZH","pointer":"_1xgdB","tab":"_26SP9","fixed":"_3bROj","inverse":"_33mT_"},"RTTimePicker":{"input":"_2APuy","disabled":"_2Vc_4","inputElement":"_2Z4kT","header":"_2u1sB","hours":"_3Kl2E","minutes":"_3Bp7w","separator":"_1c2VQ","ampm":"_1vAVQ","am":"_14hQA","pm":"aU9C9","dialog":"_1YlHq","button":"_1Kf0L","hoursDisplay":"_2JeOG","minutesDisplay":"_3UMNx","amFormat":"_26MJk","pmFormat":"_3H_-m","clock":"_2CwF0","placeholder":"zCpyM","clockWrapper":"_3paoD","face":"_3ui0r","number":"qr9pw","active":"_30yS_","hand":"_1rtAF","small":"_3eEHh","knob":"VqPQb","zoomInEnter":"_3DTnI","zoomInLeave":"_1tgJ3","zoomInEnterActive":"_1Fr4_","zoomInLeaveActive":"_1EUpH","zoomOutEnter":"_1Lb15","zoomOutLeave":"_3LDEu","zoomOutEnterActive":"_3y67C","zoomOutLeaveActive":"_18Ean"},"RTTooltip":{"tooltip":"_1v8bI","tooltipActive":"_2xWjx","tooltipTop":"_1PfOK","tooltipLeft":"_3uj3d","tooltipRight":"_3UQWj","tooltipInner":"_9q2WH"}}
\ No newline at end of file
......@@ -3,3 +3,17 @@ body {
padding: 0;
font-family: sans-serif;
}
a, abbr, address, article, aside, audio, b, blockquote, body,
caption, cite, code, dd, del, dfn, dialog, div, dl, dt, em,
fieldset, figure, footer, form, h1, h2, h3, h4, h5, h6, header,
hgroup, hr, html, i, iframe, img, ins, kbd, label, legend, li,
mark, menu, nav, object, ol, p, pre, q, samp, section, small,
span, strong, sub, sup, table, tbody, td, tfoot, th, thead,
time, tr, ul, var, video
{
padding: 0;
margin: 0;
border: 0;
outline: 0;
}
......@@ -4,6 +4,8 @@
"description": "",
"main": "index.js",
"dependencies": {
"amenda-gitlab": "../lib/amenda-gitlab",
"amenda-logger": "../lib/amenda-logger",
"express": "^4.15.5",
"express-winston": "^2.4.0",
"nodemon": "^1.12.1",
......@@ -17,7 +19,7 @@
"babel-preset-es2015": "^6.24.1"
},
"scripts": {
"build": "rm -rf dist && babel src --out-dir dist --source-maps inline",
"build": "rm -rf dist node_modules/amenda-* && npm install && babel src --out-dir dist --source-maps inline",
"start": "nodemon -L -w src -w /etc/amenda --exec 'npm run build && nodejs ./dist/index.js'",
"test": "echo \"Error: no test specified\" && exit 1"
},
......
......@@ -5,7 +5,8 @@
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf dist && babel src --out-dir dist --source-maps inline"
"build": "rm -rf dist && babel src --out-dir dist --source-maps inline",
"install": "npm run build"
},
"author": "",
"dependencies": {
......
......@@ -5,7 +5,8 @@
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "rm -rf dist && babel src --out-dir dist --source-maps inline"
"build": "rm -rf dist && babel src --out-dir dist --source-maps inline",
"install": "npm run build"
},
"author": "",
"dependencies": {
......
......@@ -6,7 +6,6 @@
- { role: config, tags: ["config", "api", "gitlab", "gitlab-bot"] }
- { role: gitlab, tags: ["api", "gitlab", "gitlab-bot"] }
- { role: reverse-proxy, tags: ["api", "doc", "gitlab"] }
- { role: lib, tags: ["lib", "gitlab-bot"] }
- { role: api, tags: ["api"] }
- { role: app, tags: ["app"] }
- { role: gitlab-bot, tags: ["gitlab-bot"] }
......
---
dependencies:
- { role: nodejs }
---
- name: Create /usr/local/lib/npm/lib/node_modules
file:
path: "/usr/local/lib/npm/lib/node_modules"
state: "directory"
- name: Symlink the global NPM packages
file:
src: "/vagrant/lib/{{ item }}"
dest: "/usr/local/lib/npm/lib/node_modules/{{ item }}"
state: "link"
with_items:
- amenda-gitlab
- amenda-logger
- name: Install global NPM packages dependencies
npm:
path: "/vagrant/lib/{{ item }}"
with_items:
- amenda-gitlab
- amenda-logger