Skip to content

Commit

Permalink
p3x-robot
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 19, 2017
1 parent b507e27 commit f1e4d5b
Show file tree
Hide file tree
Showing 209 changed files with 144,937 additions and 14,121 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,18 @@ nbproject
.hg
.svn
.CVS
.idea

node_modules
config.ini
/config.ini
cache.properties
composer.phar
phpunit.xml

/git-test
/bower_components



.idea/workspace.xml
.idea/tasks.xml

25 changes: 25 additions & 0 deletions .idea/gitlist.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://registry.yarnpkg.com/=
registry=https://registry.yarnpkg.com/
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: php

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev

php:
- 5.3
- 5.4
- 7.0
- 7.1
- nightly

before_script:
composer install

script: phpunit
2 changes: 2 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry "https://registry.yarnpkg.com/"
registry.yarnpkg.com true
127 changes: 127 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
const utils = require('corifeus-utils');
const mz = require('mz');

module.exports = function (grunt) {

const themeDir = './themes/default/less/theme';

const filesLess = {
'themes/default/css/bootstrap-default.css': 'themes/default/less/style.less',
'themes/default/css/fontawesome.css': 'themes/default/less/fontawesome.less',
}


grunt.registerTask('build', async function() {
const done = this.async();

const root = './node_modules/bootswatch';
const watches = await mz.fs.readdir(root);
const themes = [];
const excluded = ['fonts'];
const themeCss = {
'bootstrap-default': '/themes/default/css/bootstrap-default.css',
}

await watches.forEachAsync(async(path) => {
const stat = await mz.fs.stat(`${root}/${path}`);
if (stat.isDirectory() && !excluded.includes(path)) {
themes.push(path);
themeCss[`bootstrap-${path}`] = `/themes/default/css/bootstrap-${path}.css`;
}
})
await utils.fs.ensureDir(themeDir);


await themes.forEachAsync(async (theme) => {
const less = `${themeDir}/${theme}.less`;
await mz.fs.writeFile(less, `
@import "../../../../node_modules/bootstrap/less/bootstrap";
@import "../../../../node_modules/bootswatch/${theme}/variables";
@import "../../../../node_modules/bootswatch/${theme}/bootswatch";
@import "../default";
`)
filesLess[`themes/default/css/bootstrap-${theme}.css`] = less;
})
await mz.fs.writeFile(`./themes/default/js/themes.js`, `
var themes = ${JSON.stringify(themeCss, null, 4)}
`);
grunt.log.write(themes);
done();
})

require('time-grunt')(grunt);
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-wiredep');

grunt.initConfig({
clean: {
themes: [
themeDir
],
fonts: [
'themes/default/fonts'
]
},
copy: {
bootstrap: {
expand: true,
cwd: './node_modules/bootstrap/fonts',
src: '**',
dest: 'themes/default/fonts/',
},
fontawesome: {
expand: true,
cwd: './node_modules/font-awesome/fonts',
src: '**',
dest: 'themes/default/fonts/',
},
},
less: {
development: {
files: filesLess
},

},
wiredep: {
target: {
src: 'themes/default/twig/layout.twig',
ignorePath: '../../..',
// overrides: wiredepOverrides,
// exclude: wiredepExclude
fileTypes: {
twig: {
block: /(([ \t]*)<!--\s*bower:*(\S*)\s*-->)(\n|\r|.)*?(<!--\s*endbower\s*-->)/gi,
detect: {
js: /<script.*src=['"]([^'"]+)/gi,
css: /<link.*href=['"]([^'"]+)/gi
},
replace: {
js: '<script src="\{\{ app.request.basepath \}\}{{filePath}}"></script>',
css: '<link rel="stylesheet" href="\{\{ app.request.basepath \}\}{{filePath}}" />'
}
},
},

}
},
watch: {
scripts: {
files: ['themes/default/**/*.*'],
tasks: ['less'],
options: {
spawn: false,
},
},
}
})


grunt.registerTask('default', ['clean','copy', 'build', 'less', 'wiredep']);
grunt.registerTask('run', ['default', 'watch']);



};
11 changes: 9 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# GitList Installation
* Download GitList from [gitlist.org](http://gitlist.org/) and decompress to your `/var/www/gitlist` folder, or anywhere else you want to place GitList.
* Rename the `config.ini-example` file to `config.ini`.
* Download GitList from [https://github.com/patrikx3/gitlist/releases](https://github.com/patrikx3/gitlist/releases/) and decompress to your `/var/www/gitlist` folder, or anywhere else you want to place GitList.
* Rename the `config.example.ini-example` file to `config.ini`.
* Open up the `config.ini` and configure your installation. You'll have to provide where your repositories are located and the base GitList URL (in our case, http://localhost/gitlist).
* Create the cache folder and give read/write permissions to your web server user:

```
cd /var/www/gitlist
mkdir cache
chmod 777 cache
composer install
bower install
```

That's it, installation complete!
Expand Down Expand Up @@ -94,3 +97,7 @@ UrlToolkit {
Match ^/gitlist/.*\.ini DenyAccess
}
```

If you're having problems, check the [Troubleshooting](https://github.com/patrikx3/gitlist/wiki/Troubleshooting) page.


21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Patrik Laszlo / patrikx3 / https://patrikx3.tk and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 0 additions & 9 deletions LICENSE.txt

This file was deleted.

Loading

0 comments on commit f1e4d5b

Please sign in to comment.