first commit
This commit is contained in:
commit
e0f91d6fd5
|
@ -0,0 +1,9 @@
|
|||
# sublime
|
||||
*.sublime*
|
||||
|
||||
# minified files
|
||||
*.min.*
|
||||
|
||||
# installed dependencies
|
||||
node_modules/
|
||||
bower_components/
|
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
'pkg': grunt.file.readJSON('package.json'),
|
||||
'copy': {
|
||||
'main': {
|
||||
'files': [
|
||||
{
|
||||
'src': 'bower_components/angular/angular.min.js',
|
||||
'dest': 'assets/scripts/angular.min.js'
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
'uglify': {
|
||||
'main': {
|
||||
'files': {
|
||||
}
|
||||
}
|
||||
},
|
||||
'cssmin': {
|
||||
'main': {
|
||||
'files': {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
|
||||
grunt.registerTask('default', ['copy', 'uglify', 'cssmin']);
|
||||
};
|
|
@ -0,0 +1,42 @@
|
|||
# Interfug16
|
||||
|
||||
This is the source of the website for the Interfug 2016 event.
|
||||
|
||||
## Installation
|
||||
|
||||
Just clone the repository and install the dependencies
|
||||
```
|
||||
# you need grunt-cli installed on your system
|
||||
npm install -g grunt-cli
|
||||
|
||||
git clone https://github.com/ChaosChemnitz/interfug16
|
||||
cd IntraStart
|
||||
npm install
|
||||
bower install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
npm start
|
||||
```
|
||||
|
||||
This will run grunt to minify js files and copy 3rd party js files to their
|
||||
final location. After that the actual server is started.
|
||||
You may want to set **NODE_ENV** to 'production' when the page is ready for use.
|
||||
|
||||
## LICENSE
|
||||
|
||||
Copyright © 2016, Chaostreff Chemnitz
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
/* global __dirname */
|
||||
|
||||
var path = require('path');
|
||||
var express = require('express');
|
||||
var app = express();
|
||||
var config = require('../config');
|
||||
var bodyParser = require('body-parser');
|
||||
|
||||
if (config.environment === 'development') {
|
||||
app.locals.pretty = true;
|
||||
}
|
||||
|
||||
app.use(bodyParser.urlencoded({ 'extended': true }));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.json({ 'type': 'application/vnd.api+json' }));
|
||||
|
||||
app.use('/assets', express.static(path.join(__dirname, '../assets')));
|
||||
|
||||
app.set('view engine', 'pug');
|
||||
app.set('views', path.join(__dirname, '../views'));
|
||||
|
||||
var routes = require('../routes');
|
||||
app.use('/', routes);
|
||||
|
||||
app.listen(config.port, config.host, 5, function() {
|
||||
console.log('Server listening on [' + config.host + ']:' + config.port + '...');
|
||||
});
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "interfug16",
|
||||
"description": "Website for the Interfug 2016 event",
|
||||
"main": "bin/server.js",
|
||||
"authors": [
|
||||
"Felix Bytow <drako@drako.guru>"
|
||||
],
|
||||
"license": "ISC",
|
||||
"homepage": "https://github.com/ChaosChemnitz/interfug16#readme",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "^1.5.5"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"host": "localhost",
|
||||
"port": 8080
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
/* global __dirname */
|
||||
|
||||
var path = require('path');
|
||||
var process = require('process');
|
||||
var env = process.env.NODE_ENV || 'development';
|
||||
|
||||
var config = require(path.join(__dirname, env));
|
||||
config.environment = env;
|
||||
|
||||
module.exports = config;
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"host": "[::]",
|
||||
"port": 80
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "interfug16",
|
||||
"version": "0.1.0",
|
||||
"description": "Website for the Interfug 2016 event",
|
||||
"main": "bin/server.js",
|
||||
"scripts": {
|
||||
"prestart": "grunt",
|
||||
"start": "node bin/server.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ChaosChemnitz/interfug16.git"
|
||||
},
|
||||
"author": "Felix Bytow <drako@drako.guru>",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ChaosChemnitz/interfug16/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ChaosChemnitz/interfug16#readme",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.15.1",
|
||||
"express": "^4.13.4",
|
||||
"pug": "^2.0.0-alpha6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-cssmin": "^1.0.1",
|
||||
"grunt-contrib-uglify": "^1.0.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
|
||||
router.get('/', function(req, res) {
|
||||
res.render('index', {
|
||||
title: 'Interfug16'
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
|
@ -0,0 +1,8 @@
|
|||
doctype html
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(http-equiv='content-type', content='text/html; charset=utf-8')
|
||||
title= title
|
||||
script(src='assets/scripts/angular.min.js')
|
||||
body(ng-app='interfug')
|
Loading…
Reference in New Issue