mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
modify structure
This commit is contained in:
parent
9d1e0d2abc
commit
939b9db597
36 changed files with 19 additions and 19 deletions
|
@ -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",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { NodeData, TextData } from './interfaces';
|
||||
import { NodeData, TextData } from '../common/interfaces';
|
||||
|
||||
interface Signatures {
|
||||
[key: string]: string;
|
|
@ -1,5 +1,5 @@
|
|||
import { createPenpotItem } from '.';
|
||||
import { NodeData } from '../interfaces';
|
||||
import { NodeData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
import { translateFills } from '../translators';
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { NodeData } from '../interfaces';
|
||||
import { NodeData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
import { translateFills } from '../translators';
|
||||
|
|
@ -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) => {
|
|
@ -1,5 +1,5 @@
|
|||
import { createPenpotItem } from '.';
|
||||
import { NodeData } from '../interfaces';
|
||||
import { NodeData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
|
||||
export const createPenpotGroup = (
|
|
@ -1,4 +1,4 @@
|
|||
import { NodeData } from '../interfaces';
|
||||
import { NodeData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
|
||||
export const createPenpotImage = (
|
|
@ -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';
|
||||
|
|
@ -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) => {
|
|
@ -1,4 +1,4 @@
|
|||
import { NodeData } from '../interfaces';
|
||||
import { NodeData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
import { translateFills } from '../translators';
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import slugify from 'slugify';
|
||||
|
||||
import { TextData } from '../interfaces';
|
||||
import { TextData } from '../../common/interfaces';
|
||||
import { PenpotFile } from '../penpot';
|
||||
import {
|
||||
translateFills,
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
src/penpot.d.ts → src/ui/penpot.d.ts
vendored
0
src/penpot.d.ts → src/ui/penpot.d.ts
vendored
|
@ -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;
|
|
@ -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;
|
|
@ -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
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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']
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue