2015-06-04 18:44:08 +02:00
|
|
|
var path = require('path');
|
|
|
|
|
|
|
|
var srcDir = 'static_src';
|
|
|
|
var destDir = 'static';
|
|
|
|
|
|
|
|
var App = function(dir, options) {
|
|
|
|
this.dir = dir;
|
|
|
|
this.options = options || {};
|
|
|
|
this.appName = this.options.appName || path.basename(dir);
|
|
|
|
this.sourceFiles = path.join('.', this.dir, srcDir);
|
|
|
|
};
|
|
|
|
App.prototype = Object.create(null);
|
|
|
|
App.prototype.scssIncludePaths = function() {
|
|
|
|
return [this.sourceFiles];
|
|
|
|
};
|
|
|
|
App.prototype.scssSources = function() {
|
2016-04-16 18:15:47 +02:00
|
|
|
// Assume that any scss we care about is always within the expected
|
2015-12-03 18:11:08 +01:00
|
|
|
// "appname/static_url/appname/scss/" folder.
|
|
|
|
// NB: this requires the user to adhere to sass's underscore prefixing
|
|
|
|
// to tell the compiler what files are includes.
|
|
|
|
return path.join(this.sourceFiles, this.appName, '/scss/**/*.scss')
|
2015-06-04 18:44:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// All the Wagtail apps that contain static files
|
|
|
|
var apps = [
|
2015-12-03 18:11:08 +01:00
|
|
|
new App('wagtail/wagtailadmin'),
|
2015-06-04 18:44:08 +02:00
|
|
|
new App('wagtail/wagtaildocs'),
|
|
|
|
new App('wagtail/wagtailembeds'),
|
2015-12-03 18:11:08 +01:00
|
|
|
new App('wagtail/wagtailimages'),
|
2015-06-04 18:44:08 +02:00
|
|
|
new App('wagtail/wagtailsnippets'),
|
2015-12-03 18:11:08 +01:00
|
|
|
new App('wagtail/wagtailusers'),
|
|
|
|
new App('wagtail/contrib/wagtailstyleguide'),
|
2015-10-23 12:33:48 +02:00
|
|
|
new App('wagtail/contrib/settings', {
|
|
|
|
'appName': 'wagtailsettings',
|
|
|
|
}),
|
2016-04-13 08:01:04 +02:00
|
|
|
new App('wagtail/contrib/modeladmin', {
|
2016-04-16 18:15:47 +02:00
|
|
|
'appName': 'wagtailmodeladmin',
|
2016-04-13 08:01:04 +02:00
|
|
|
}),
|
2015-06-04 18:44:08 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
apps: apps,
|
|
|
|
srcDir: srcDir,
|
|
|
|
destDir: destDir
|
2015-07-09 13:36:34 +02:00
|
|
|
}
|