mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 01:22:07 +01:00
b96be5aa35
* Hyphenate classname: result_list => result-list * Fixed gulp config for compiling scss Was compiling to modeladmin/index.css instead of wagtailmodeladmin.css which caused the styles to not load * Nest scss rules Makes the scss easier to read I think * Let choose_parent_page.scss use an id selector * Converted ids to classes * scss style tweaks * Allow choose_parent_page.scss to use id selector We should definitely solve this. But need to get Drone working right now
46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
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() {
|
|
// Assume that any scss we care about is always within the expected
|
|
// "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')
|
|
};
|
|
|
|
// All the Wagtail apps that contain static files
|
|
var apps = [
|
|
new App('wagtail/wagtailadmin'),
|
|
new App('wagtail/wagtaildocs'),
|
|
new App('wagtail/wagtailembeds'),
|
|
new App('wagtail/wagtailimages'),
|
|
new App('wagtail/wagtailsnippets'),
|
|
new App('wagtail/wagtailusers'),
|
|
new App('wagtail/contrib/wagtailstyleguide'),
|
|
new App('wagtail/contrib/settings', {
|
|
'appName': 'wagtailsettings',
|
|
}),
|
|
new App('wagtail/contrib/modeladmin', {
|
|
'appName': 'wagtailmodeladmin',
|
|
}),
|
|
];
|
|
|
|
module.exports = {
|
|
apps: apps,
|
|
srcDir: srcDir,
|
|
destDir: destDir
|
|
}
|