Move Stylesheet arguments into an object

pull/4377/head
Christian Kaisermann 7 years ago
parent 2f55fc4fe7
commit a038f72fb3

@ -136,12 +136,10 @@ export default class Component {
this.stylesheet = new Stylesheet({ this.stylesheet = new Stylesheet({
source, source,
ast, ast,
options: {
filename: compile_options.filename, filename: compile_options.filename,
component_name: name, component_name: name,
dev: compile_options.dev, dev: compile_options.dev,
scope_class_getter: compile_options.scopeClass scope_class_getter: compile_options.scopeClass
}
}); });
this.stylesheet.validate(this); this.stylesheet.validate(this);

@ -296,21 +296,17 @@ export default class Stylesheet {
constructor({ constructor({
source, source,
ast, ast,
options: {
component_name, component_name,
filename, filename,
dev, dev,
scope_class_getter = getDefaultScopeClass, scope_class_getter = getDefaultScopeClass,
},
}: { }: {
source: string; source: string;
ast: Ast; ast: Ast;
options: {
filename: string | undefined; filename: string | undefined;
component_name: string | undefined; component_name: string | undefined;
dev: boolean; dev: boolean;
scope_class_getter: CssScopeClassGetter; scope_class_getter: CssScopeClassGetter;
};
}) { }) {
this.source = source; this.source = source;
this.ast = ast; this.ast = ast;

@ -105,7 +105,7 @@ export interface Warning {
export type ModuleFormat = 'esm' | 'cjs'; export type ModuleFormat = 'esm' | 'cjs';
export type CssScopeClassGetter = (args: { export type CssScopeClassGetter = (args: {
name: string | undefined; name: string;
filename: string | undefined; filename: string | undefined;
hash: string; hash: string;
}) => string; }) => string;

Loading…
Cancel
Save