Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import grapesjs from 'grapesjs';
import { Plugin } from 'grapesjs';

declare const plugin: grapesjs.Plugin;
declare const plugin: Plugin;

export {
plugin as default,
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grapesjs-parser-postcss",
"version": "1.0.1",
"version": "1.0.2",
"description": "Custom CSS parser via PostCSS for GrapesJS",
"main": "dist/index.js",
"files": ["dist/*"],
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type grapesjs from 'grapesjs';
import { Plugin } from 'grapesjs';
import parser from './parser';

const plugin: grapesjs.Plugin = (editor) => {
const plugin: Plugin = (editor) => {
editor.setCustomParserCss(parser);
};

Expand Down
4 changes: 1 addition & 3 deletions src/parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type grapesjs from 'grapesjs';
import { Editor } from 'grapesjs';
import postcss, { Rule, AtRule, Declaration } from 'postcss';

export type ParsedRule = {
Expand All @@ -8,8 +8,6 @@ export type ParsedRule = {
params?: string;
}

type Editor = grapesjs.Editor;

/**
* Log stuff
* @param {Editor} editor
Expand Down