Skip to content

Commit 23acac0

Browse files
committedMar 19, 2018
feat: Rename Options to Configuration.
BREAKING CHANGE: Options are things that you *can* pass in and in this project they derive from the project configuration. So this is the first of a few commits that will result in SparseOptions being named just Options.
1 parent 1bd3241 commit 23acac0

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎packages/css-blocks/src/cssBlocks.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import * as postcss from "postcss";
33
import { OutputMode } from "./OutputMode";
44
import { Plugin } from "./Plugin";
55
import { CssBlockError, InvalidBlockSyntax, MissingSourcePath } from "./errors";
6-
import { Options } from "./options";
6+
import { Configuration } from "./options";
77

88
// This is ugly but it's the only thing I have been able to make work.
99
// I welcome a patch that cleans this up.
1010

1111
type temp = {
12-
(postcssImpl: typeof postcss): (opts?: Partial<Readonly<Options>>) => postcss.Plugin<Partial<Readonly<Options>>>;
12+
(postcssImpl: typeof postcss): (opts?: Partial<Readonly<Configuration>>) => postcss.Plugin<Partial<Readonly<Configuration>>>;
1313
OutputMode: typeof OutputMode;
1414
CssBlockError: typeof CssBlockError;
1515
InvalidBlockSyntax: typeof InvalidBlockSyntax;
@@ -19,7 +19,7 @@ type temp = {
1919
function makeApi(): temp {
2020
let cssBlocks: temp;
2121
cssBlocks = <temp>function(postcssImpl: typeof postcss) {
22-
return (opts?: Partial<Readonly<Options>>) => {
22+
return (opts?: Partial<Readonly<Configuration>>) => {
2323
let plugin = new Plugin(postcssImpl, opts);
2424
return plugin.process.bind(plugin);
2525
};

‎packages/css-blocks/src/importing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Syntax } from "./BlockParser";
66
import { ReadonlyOptions } from "./options";
77

88
declare module "./options" {
9-
export interface Options {
9+
export interface Configuration {
1010
importer: Importer;
1111
importerData: ImporterData;
1212
}

‎packages/css-blocks/src/options.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export interface Configuration {
2727
/**
2828
* Valid user-provided options for the CSS Blocks plugin.
2929
*/
30-
export type SparseOptions = Partial<Readonly<Options>>;
30+
export type SparseOptions = Partial<Readonly<Configuration>>;
3131

3232
/**
3333
* Options that can/will be read but not changed. Default
3434
* values will have already been provided.
3535
*/
36-
export type ReadonlyOptions = Readonly<Options>;
36+
export type ReadonlyOptions = Readonly<Configuration>;

0 commit comments

Comments
 (0)
Please sign in to comment.