0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00

modify structure

This commit is contained in:
Jordi Sala Morales 2024-04-08 16:04:11 +00:00
parent 9d1e0d2abc
commit 939b9db597
No known key found for this signature in database
GPG key ID: C5127140107F55FD
36 changed files with 19 additions and 19 deletions

View file

@ -9,12 +9,12 @@
"watch": "webpack watch",
"lint": "run-p lint:*",
"lint:eslint": "eslint .",
"lint:stylelint": "stylelint src/**.css",
"lint:stylelint": "stylelint src/ui/**.css",
"lint:prettier": "prettier --check .",
"lint:tsc": "tsc --noEmit --pretty false",
"fix-lint": "run-p fix-lint:*",
"fix-lint:eslint": "eslint . --fix",
"fix-lint:stylelint": "stylelint src/**.css --fix",
"fix-lint:stylelint": "stylelint src/ui/**.css --fix",
"fix-lint:prettier": "prettier --write ."
},
"author": "Kaleidos",

View file

@ -1,4 +1,4 @@
import { NodeData, TextData } from './interfaces';
import { NodeData, TextData } from '../common/interfaces';
interface Signatures {
[key: string]: string;

View file

@ -1,5 +1,5 @@
import { createPenpotItem } from '.';
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
import { translateFills } from '../translators';

View file

@ -1,4 +1,4 @@
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
import { translateFills } from '../translators';

View file

@ -1,5 +1,5 @@
import { createPenpotItem } from '.';
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { createFile } from '../penpot';
export const createPenpotFile = (node: NodeData) => {

View file

@ -1,5 +1,5 @@
import { createPenpotItem } from '.';
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
export const createPenpotGroup = (

View file

@ -1,4 +1,4 @@
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
export const createPenpotImage = (

View file

@ -7,7 +7,7 @@ import {
createPenpotRectangle,
createPenpotText
} from '.';
import { NodeData, TextData } from '../interfaces';
import { NodeData, TextData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
import { calculateAdjustment } from '../utils';

View file

@ -1,5 +1,5 @@
import { createPenpotItem } from '.';
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
export const createPenpotPage = (file: PenpotFile, node: NodeData) => {

View file

@ -1,4 +1,4 @@
import { NodeData } from '../interfaces';
import { NodeData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
import { translateFills } from '../translators';

View file

@ -1,6 +1,6 @@
import slugify from 'slugify';
import { TextData } from '../interfaces';
import { TextData } from '../../common/interfaces';
import { PenpotFile } from '../penpot';
import {
translateFills,

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,4 +1,4 @@
import { TextData, TextDataChildren } from '../interfaces.js';
import { TextData, TextDataChildren } from '../../common/interfaces';
export const translateTextDecoration = (node: TextData | TextDataChildren) => {
const textDecoration = node.textDecoration;

View file

@ -1,4 +1,4 @@
import { TextData, TextDataChildren } from '../interfaces.js';
import { TextData, TextDataChildren } from '../../common/interfaces';
export const translateTextTransform = (node: TextData | TextDataChildren) => {
const textCase = node.textCase;

View file

@ -1,4 +1,4 @@
import { NodeData } from '../interfaces.js';
import { NodeData } from '../../common/interfaces';
export const calculateAdjustment = (node: NodeData) => {
// For each child, check whether the X or Y position is less than 0 and less than the

View file

@ -9,7 +9,7 @@
"module": "ESNext",
"moduleResolution": "Node10",
"strict": true,
"typeRoots": ["src/penpot.d.ts", "node_modules/@figma", "node_modules/@types"],
"typeRoots": ["src/ui/penpot.d.ts", "node_modules/@figma", "node_modules/@types"],
"resolveJsonModule": true
}
}

View file

@ -12,8 +12,8 @@ module.exports = (env, argv) => ({
devtool: argv.mode === 'production' ? false : 'inline-source-map',
entry: {
ui: './src/ui.tsx', // The entry point for your UI code
code: './src/code.ts' // The entry point for your plugin code
ui: './src/ui/ui.tsx', // The entry point for your UI code
code: './src/plugin/code.ts' // The entry point for your plugin code
},
module: {
@ -54,7 +54,7 @@ module.exports = (env, argv) => ({
}),
new HtmlWebpackPlugin({
inject: 'body',
template: './src/ui.html',
template: './src/ui/ui.html',
filename: 'ui.html',
chunks: ['ui']
}),