This repository has been archived by the owner on Jan 11, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b46d368
commit 2a8e57b
Showing
23 changed files
with
1,552 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ data/ | |
env/ | ||
node_modules/ | ||
tests/coverage/ | ||
tools/server/env/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,97 @@ | ||
/*! | ||
* @author: Divio AG | ||
* @copyright: http://www.divio.ch | ||
/* | ||
* Copyright (c) 2013, Divio AG | ||
* Licensed under BSD | ||
* http://github.com/aldryn/aldryn-boilerplate-bootstrap3 | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// ############################################################################# | ||
// #IMPORTS# | ||
var autoprefixer = require('gulp-autoprefixer'); | ||
// IMPORTS | ||
var argv = require('minimist')(process.argv.slice(2)); | ||
var gulp = require('gulp'); | ||
var gutil = require('gulp-util'); | ||
var karma = require('karma').server; | ||
var sass = require('gulp-sass'); | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
var minifyCss = require('gulp-minify-css'); | ||
var protractor = require('gulp-protractor').protractor; | ||
var webdriverUpdate = require('gulp-protractor').webdriver_update; | ||
|
||
// ############################################################################# | ||
// #SETTINGS# | ||
// SETTINGS | ||
var PROJECT_ROOT = __dirname; | ||
var PROJECT_PATH = { | ||
'sass': PROJECT_ROOT + '/private/sass', | ||
'css': PROJECT_ROOT + '/static/css', | ||
'tests': PROJECT_ROOT + '/tests' | ||
bower: PROJECT_ROOT + '/static/vendor', | ||
css: PROJECT_ROOT + '/static/css', | ||
docs: PROJECT_ROOT + '/static/docs', | ||
fonts: PROJECT_ROOT + '/static/fonts', | ||
html: PROJECT_ROOT + '/templates', | ||
images: PROJECT_ROOT + '/static/img', | ||
icons: PROJECT_ROOT + '/private/icons', | ||
js: PROJECT_ROOT + '/static/js', | ||
sass: PROJECT_ROOT + '/private/sass', | ||
tests: PROJECT_ROOT + '/tests' | ||
}; | ||
|
||
var PROJECT_PATTERNS = { | ||
'sass': [ | ||
images: [ | ||
PROJECT_PATH.images + '/**/*', | ||
// exclude from preprocessing | ||
'!' + PROJECT_PATH.images + '/dummy/*/**' | ||
], | ||
js: [ | ||
'gulpfile.js', | ||
PROJECT_PATH.js + '/**/*.js', | ||
PROJECT_PATH.tests + '/**/*.js', | ||
// exclude from linting | ||
'!' + PROJECT_PATH.js + '/*.min.js', | ||
'!' + PROJECT_PATH.js + '/**/*.min.js', | ||
'!' + PROJECT_PATH.tests + '/coverage/**/*' | ||
], | ||
sass: [ | ||
PROJECT_PATH.sass + '/**/*.{scss,sass}' | ||
] | ||
}; | ||
|
||
// ############################################################################# | ||
// #TASKS# | ||
gulp.task('sass', function () { | ||
gulp.src(PROJECT_PATTERNS.sass) | ||
.pipe(sourcemaps.init()) | ||
.pipe(sass()) | ||
.on('error', function (error) { | ||
gutil.log(gutil.colors.red( | ||
'Error (' + error.plugin + '): ' + error.messageFormatted) | ||
); | ||
}) | ||
.pipe(autoprefixer({ | ||
// browsers are coming from browserslist file | ||
cascade: false | ||
})) | ||
.pipe(minifyCss({ | ||
// fixes font imports from google fonts | ||
rebase: false | ||
})) | ||
.pipe(sourcemaps.write()) | ||
.pipe(gulp.dest(PROJECT_PATH.css)); | ||
}); | ||
var PORT = parseInt(process.env.PORT, 10) || 8000; | ||
var DEBUG = argv.debug; | ||
|
||
// ####################################### | ||
// #TESTS# | ||
gulp.task('tests', ['tests:unit', 'tests:integration']); | ||
gulp.task('tests:unit', function (done) { | ||
// run javascript tests | ||
karma.start({ | ||
configFile: PROJECT_PATH.tests + '/karma.conf.js', | ||
singleRun: true | ||
}, done); | ||
}); | ||
function task(id) { | ||
return require('./tools/tasks/' + id)(gulp, { | ||
PROJECT_ROOT: PROJECT_ROOT, | ||
PROJECT_PATH: PROJECT_PATH, | ||
PROJECT_PATTERNS: PROJECT_PATTERNS, | ||
DEBUG: DEBUG, | ||
PORT: PORT | ||
}); | ||
} | ||
|
||
gulp.task('tests:webdriver', webdriverUpdate); | ||
gulp.task('tests:integration', ['tests:webdriver'], function () { | ||
return gulp.src([PROJECT_PATH.tests + '/integration/specs/*.js']) | ||
.pipe(protractor({ | ||
configFile: PROJECT_PATH.tests + '/protractor.conf.js', | ||
args: [] | ||
})) | ||
.on('error', function (error) { | ||
gutil.log(gutil.colors.red( | ||
'Error (' + error.plugin + '): ' + error.message) | ||
); | ||
}); | ||
}); | ||
gulp.task('bower', task('bower')); | ||
gulp.task('lint:javascript', task('lint/javascript')); | ||
gulp.task('lint', ['lint:javascript']); | ||
gulp.task('sass', task('sass')); | ||
gulp.task('build', ['sass']); | ||
|
||
gulp.task('tests:watch', function () { | ||
// run javascript tests | ||
karma.start({ | ||
configFile: PROJECT_PATH.tests + '/karma.conf.js' | ||
}); | ||
}); | ||
/** | ||
* GULP_MODE === 'production' means we have a limited | ||
* subset of tasks, namely sass, bower and lint to | ||
* speed up the deployment / installation process. | ||
*/ | ||
if (process.env.GULP_MODE !== 'production') { | ||
gulp.task('images', task('images')); | ||
gulp.task('docs', task('docs')); | ||
gulp.task('preprocess', ['sass', 'images', 'docs']); | ||
gulp.task('icons', task('icons')); | ||
|
||
gulp.task('browser', task('browser')); | ||
|
||
gulp.task('tests:lint', ['lint:javascript']); | ||
gulp.task('tests:unit', task('tests/unit')); | ||
gulp.task('tests:watch', ['tests:lint'], task('tests/watch')); | ||
gulp.task('tests', ['tests:unit', 'tests:integration', 'tests:lint']); | ||
|
||
var webdriverUpdate = require('gulp-protractor').webdriver_update; | ||
gulp.task('tests:webdriver', webdriverUpdate); | ||
gulp.task('tests:integration', ['tests:webdriver'], task('tests/integration')); | ||
} | ||
|
||
// ############################################################################# | ||
// #COMMANDS# | ||
gulp.task('watch', function () { | ||
gulp.watch(PROJECT_PATTERNS.sass, ['sass']); | ||
gulp.watch(PROJECT_PATTERNS.js, ['lint']); | ||
}); | ||
|
||
gulp.task('default', ['sass', 'watch']); | ||
gulp.task('default', ['bower', 'sass', 'lint', 'watch']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,41 @@ | ||
{ | ||
"name": "package", | ||
"private": true, | ||
"engines": { | ||
"node": "0.9.0" | ||
"dependencies": { | ||
"gulp": "^3.9.0", | ||
"gulp-autoprefixer": "^3.0.1", | ||
"gulp-bower": "^0.0.10", | ||
"gulp-if": "^1.2.5", | ||
"gulp-util": "^3.0.6", | ||
"gulp-minify-css": "^1.2.0", | ||
"gulp-sass": "^2.0.4", | ||
"gulp-jscs": "^2.0.0", | ||
"gulp-jshint": "^1.11.2", | ||
"jshint-stylish": "^2.0.1", | ||
"gulp-sourcemaps": "^1.5.2", | ||
"minimist": "^1.1.3" | ||
}, | ||
"devDependencies": { | ||
"browserslist-saucelabs": "0.1.2", | ||
"gulp": "3.9.0", | ||
"gulp-autoprefixer": "2.3.1", | ||
"gulp-minify-css": "1.2.0", | ||
"gulp-protractor": "1.0.0", | ||
"gulp-sass": "2.0.3", | ||
"gulp-sourcemaps": "1.5.2", | ||
"gulp-util": "3.0.6", | ||
"jasmine-core": "2.3.4", | ||
"karma": "0.12.37", | ||
"karma-coverage": "0.4.2", | ||
"karma-coveralls": "1.1.0", | ||
"karma-fixture": "0.2.5", | ||
"karma-html2js-preprocessor": "0.1.0", | ||
"karma-jasmine": "0.3.6", | ||
"karma-json-fixtures-preprocessor": "0.0.4", | ||
"karma-phantomjs-launcher": "0.2.0", | ||
"karma-sauce-launcher": "0.2.14", | ||
"phantomjs": "1.9.17", | ||
"protractor": "2.1.0" | ||
"browser-sync": "^2.8.2", | ||
"browserslist-saucelabs": "^0.1.4", | ||
"gulp-cached": "^1.1.0", | ||
"gulp-iconfont": "<5.0.0", | ||
"gulp-iconfont-css": "^1.0.1", | ||
"gulp-imagemin": "^2.3.0", | ||
"gulp-protractor": "^1.0.0", | ||
"gulp-scss-lint": "^0.3.0", | ||
"gulp-yuidoc": "^0.1.2", | ||
"jasmine-core": "^2.3.4", | ||
"karma": "^0.13.8", | ||
"karma-coverage": "^0.5.0", | ||
"karma-coveralls": "^1.1.2", | ||
"karma-fixture": "^0.2.5", | ||
"karma-html2js-preprocessor": "^0.1.0", | ||
"karma-jasmine": "^0.3.6", | ||
"karma-json-fixtures-preprocessor": "^0.0.5", | ||
"karma-phantomjs-launcher": "^0.2.1", | ||
"karma-sauce-launcher": "^0.2.14", | ||
"phantomjs": "^1.9.17", | ||
"protractor": "^2.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
SHELL := /bin/bash | ||
|
||
PORT = 8000 | ||
ENV = env | ||
VENV = source $(ENV)/bin/activate | ||
PIP = $(VENV); $(ENV)/bin/pip | ||
MANAGE = $(VENV); $(ENV)/bin/python | ||
|
||
all: | ||
make run | ||
|
||
install: | ||
virtualenv $(ENV) | ||
$(PIP) install -r requirements.txt | ||
$(MANAGE) manage.py migrate | ||
|
||
run: | ||
$(MANAGE) manage.py runserver 0.0.0.0:$(PORT) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Django>=1.8.0 | ||
django-cms>=3.1.0 | ||
djangocms-text-ckeditor>=2.5.2 |
Empty file.
Oops, something went wrong.