0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-28 00:17:06 +01:00
wagtail/gulpfile.js/config.js
Karl Hobley bf0f3e02ba Rename wagtail.wagtailimages to wagtail.images
Conflicts:
	docs/advanced_topics/api/v2/configuration.rst
	docs/advanced_topics/jinja2.rst
	docs/advanced_topics/settings.rst
	docs/getting_started/integrating_into_django.rst
	docs/getting_started/tutorial.rst
	docs/topics/pages.rst
	docs/topics/streamfield.rst
	gulpfile.js/config.js
	tox.ini
	wagtail/admin/tests/test_compare.py
	wagtail/admin/tests/test_edit_handlers.py
	wagtail/api/v2/signal_handlers.py
	wagtail/contrib/wagtailstyleguide/views.py
	wagtail/core/tests/test_streamfield.py
	wagtail/documents/tests/test_models.py
	wagtail/images/models.py
	wagtail/images/permissions.py
	wagtail/images/tests/test_admin_views.py
	wagtail/images/tests/test_image_operations.py
	wagtail/images/tests/test_models.py
	wagtail/images/tests/test_signal_handlers.py
	wagtail/images/views/chooser.py
	wagtail/images/views/images.py
	wagtail/images/views/multiple.py
	wagtail/images/wagtail_hooks.py
	wagtail/images/widgets.py
	wagtail/project_template/project_name/settings/base.py
	wagtail/tests/demosite/models.py
	wagtail/tests/non_root_urls.py
	wagtail/tests/settings.py
	wagtail/tests/testapp/migrations/0001_initial.py
	wagtail/tests/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py
	wagtail/tests/testapp/migrations/0009_defaultstreampage.py
	wagtail/tests/urls.py
2017-11-26 22:43:47 +00:00

48 lines
1.5 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/admin'),
new App('wagtail/documents'),
new App('wagtail/embeds'),
new App('wagtail/images'),
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,
// Determines whether the pipeline is used in production or dev mode.
isProduction: process.env.NODE_ENV === 'production',
};