Commit 8647858c authored by Aymane KHOUAJI's avatar Aymane KHOUAJI
Browse files

Init commit

parents
{
"directory": "frontend/components"
}
\ No newline at end of file
frontend/app/**
{
"extends": "linagora-esn",
"rules": {
"consistent-this": ["warn", "self"],
"no-unused-vars": ["error", { "vars": "all", "args": "after-used" }],
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-process-env": "off",
"arrow-parens": ["error", "as-needed"]
}
}
node_modules
frontend/components
.vscode
\ No newline at end of file
{
"preset": "airbnb",
"requirePaddingNewLinesAfterBlocks": null,
"requireTrailingComma": null,
"disallowTrailingComma": true,
"disallowMultipleVarDecl": null,
"requirePaddingNewLinesBeforeLineComments": null,
"safeContextKeyword": ["self"],
"requireCamelCaseOrUpperCaseIdentifiers": null,
"requireSpacesInAnonymousFunctionExpression": null,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
requireSpacesInsideObjectBrackets: null
}
{
"node": true,
"browser": true,
"esnext": true,
"bitwise": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": "vars",
"strict": true,
"trailing": true,
"smarttabs": true,
"white": false,
"expr": true,
"globals": {
"angular": false,
"jQuery": false,
"$": false,
"after": false,
"afterEach": false,
"angular": false,
"before": false,
"beforeEach": false,
"browser": false,
"describe": false,
"inject": false,
"element": false,
"it": false
}
}
'use strict';
module.exports = function(grunt) {
var CI = grunt.option('ci');
var KARMA_REPORTERS = (grunt.option('reporter') || '').split(',').filter(Boolean);
if (!KARMA_REPORTERS.length) {
KARMA_REPORTERS = CI ? ['spec', 'coverage'] : ['dots'];
}
grunt.initConfig({
eslint: {
options: {
config: '.eslintrc'
},
all: {
src: [
'Gruntfile.js',
'tasks/**/*.js',
'test/**/**/*.js',
'backend/**/*.js',
'frontend/app/**/*.js'
]
}
},
lint_pattern: {
options: {
rules: [
{ pattern: /(describe|it)\.only/, message: 'Must not use .only in tests' }
]
},
all: {
src: ['<%= eslint.all.src %>']
},
css: {
options: {
rules: [
{ pattern: /important;(\s*$|(?=\s+[^\/]))/, message: 'CSS important rules only allowed with explanatory comment' }
]
},
src: [
'frontend/css/**/*.less'
]
}
},
mochacli: {
options: {
require: ['chai', 'mockery'],
reporter: 'spec',
timeout: process.env.TEST_TIMEOUT || 20000
},
backend: {
options: {
files: ['test/unit-backend/all.js', grunt.option('test') || 'test/unit-backend/**/*.js']
}
}
},
karma: {
unit: {
configFile: './test/config/karma.conf.js',
browsers: ['PhantomJS'],
reporters: KARMA_REPORTERS
}
},
i18n_checker: {
all: {
options: {
baseDir: __dirname,
dirs: [{
localeDir: 'backend/lib/i18n/locales',
templateSrc: [
'frontend/app/**/*.jade'
],
core: true
}],
verifyOptions: {
defaultLocale: 'en',
locales: ['en', 'fr', 'vi']
}
}
}
}
});
grunt.loadNpmTasks('grunt-lint-pattern');
grunt.loadNpmTasks('grunt-mocha-cli');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-i18n-checker');
grunt.registerTask('i18n', 'Check the translation files', ['i18n_checker']);
grunt.registerTask('linters', 'Check code for lint', ['eslint:all', 'lint_pattern:all']);
grunt.registerTask('test-unit-backend', 'Test backend code', ['mochacli:backend']);
grunt.registerTask('test-unit-frontend', 'Test frontend code', ['karma:unit']);
grunt.registerTask('test', ['linters', 'test-unit-frontend', 'test-unit-backend']);
grunt.registerTask('default', ['test']);
};
{
"PATH" : {
"MIMETYPE": "/detect/stream",
"LANGUAGE": "/language/stream",
"RAWTEXT": "/tika"
}
}
'use strict';
var i18n = require('i18n');
i18n.configure(
{
defaultLocale: 'en',
locales: ['en', 'fr', 'vi'],
directory: __dirname + '/locales',
updateFiles: false,
indent: ' ',
extension: '.json',
cookie: 'locale'
}
);
module.exports = function() {
return i18n;
};
{
}
\ No newline at end of file
{
}
\ No newline at end of file
'use strict';
module.exports = function() {
return {
};
};
'use strict';
module.exports = function(dependencies, application) {
var i18n = require('../../lib/i18n')(dependencies);
application.use(i18n.init);
};
'use strict';
const express = require('express');
const FRONTEND_PATH = require('../constants').FRONTEND_PATH;
const CORE_FRONTEND_PATH = require('../constants').CORE_FRONTEND_PATH;
module.exports = function(dependencies, application) {
application.use(express.static(FRONTEND_PATH));
application.set('views', FRONTEND_PATH + '/app');
application.get('/app/*', function(req, res) {
res.render(req.params[0].replace(/\.html$/, ''), { basedir: CORE_FRONTEND_PATH + '/views' });
});
};
'use strict';
// add your constants here.
var path = require('path');
module.exports.FRONTEND_PATH = path.normalize(__dirname + '/../../frontend');
module.exports.CORE_FRONTEND_PATH = path.normalize(path.dirname(require.main.filename) + '/frontend');
'use strict';
const express = require('express');
// This is you own express application
module.exports = function(dependencies) {
const application = express();
// Every express new configuration are appended here.
// This needs to be initialized before the body parser
require('./config/i18n')(dependencies, application);
require('./config/views')(dependencies, application);
return application;
};
{
"name": "linagora.esn.hublin",
"main": "index.js",
"version": "0.0.1",
"authors": [
"Linagora Folks <openpaas@linagora.com>"
],
"description": "just a link to hubl.in",
"keywords": [
"safe",
"openpaas",
"collaboration",
"linagora"
],
"license": "AGPLv3",
"homepage": "https://open-paas.org/",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"frontend/components",
"test",
"tests"
],
"dependencies": {
"components-font-awesome": "^4.7.0"
},
"devDependencies": {
"angular": "1.3.16",
"chai": "3.4.0",
"jquery": "2.1.4",
"angular-mocks": "1.3.16",
"angular-ui-router": "0.2.15",
"dynamic-directive": "2.0.0",
"angular-scroll-glue": "^2.0.7",
"angular-messages": "1.3.16",
"angular-file-saver": "1.1.2",
"restangular": "1.3.1",
"lodash": "2.4.1",
"sinon-chai": "~2.8.0"
}
}
(function() {
'use strict';
angular.module('linagora.esn.linshare')
.directive('linshareApplicationMenu', linshareApplicationMenu);
function linshareApplicationMenu(applicationMenuTemplateBuilder) {
var directive = {
retrict: 'E',
replace: true,
template: applicationMenuTemplateBuilder('http://linshare.cgg-demo.open-paas.org/', { url: '/linshare/images/linshare.jpg' }, 'Linshare')
};
return directive;
}
})();
\ No newline at end of file
(function() {
'use strict';
angular.module('linagora.esn.linshare', [])
.run(function(dynamicDirectiveService, session) {
session.ready.then(function() {
var linshare = new dynamicDirectiveService.DynamicDirective(true, 'linshare-application-menu', { priority: -10 });
dynamicDirectiveService.addInjection('esn-application-menu', linshare);
});
})
})();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment