mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-02 21:00:12 -05:00
Merge pull request #7 from Runroom/hotfix/structure
Modify folder structure
This commit is contained in:
commit
f9531f831c
38 changed files with 21 additions and 21 deletions
|
@ -1,3 +1,3 @@
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
src/penpot.js
|
src/ui/penpot.js
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
src/penpot.js
|
src/ui/penpot.js
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
"watch": "webpack watch",
|
"watch": "webpack watch",
|
||||||
"lint": "run-p lint:*",
|
"lint": "run-p lint:*",
|
||||||
"lint:eslint": "eslint .",
|
"lint:eslint": "eslint .",
|
||||||
"lint:stylelint": "stylelint src/**.css",
|
"lint:stylelint": "stylelint src/ui/**.css",
|
||||||
"lint:prettier": "prettier --check .",
|
"lint:prettier": "prettier --check .",
|
||||||
"lint:tsc": "tsc --noEmit --pretty false",
|
"lint:tsc": "tsc --noEmit --pretty false",
|
||||||
"fix-lint": "run-p fix-lint:*",
|
"fix-lint": "run-p fix-lint:*",
|
||||||
"fix-lint:eslint": "eslint . --fix",
|
"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 ."
|
"fix-lint:prettier": "prettier --write ."
|
||||||
},
|
},
|
||||||
"author": "Kaleidos",
|
"author": "Kaleidos",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { NodeData, TextData } from './interfaces';
|
import { NodeData, TextData } from '../common/interfaces';
|
||||||
|
|
||||||
interface Signatures {
|
interface Signatures {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
|
@ -1,5 +1,5 @@
|
||||||
import { createPenpotItem } from '.';
|
import { createPenpotItem } from '.';
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
import { translateFills } from '../translators';
|
import { translateFills } from '../translators';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
import { translateFills } from '../translators';
|
import { translateFills } from '../translators';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { createPenpotItem } from '.';
|
import { createPenpotItem } from '.';
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { createFile } from '../penpot';
|
import { createFile } from '../penpot';
|
||||||
|
|
||||||
export const createPenpotFile = (node: NodeData) => {
|
export const createPenpotFile = (node: NodeData) => {
|
|
@ -1,5 +1,5 @@
|
||||||
import { createPenpotItem } from '.';
|
import { createPenpotItem } from '.';
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
|
|
||||||
export const createPenpotGroup = (
|
export const createPenpotGroup = (
|
|
@ -1,4 +1,4 @@
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
|
|
||||||
export const createPenpotImage = (
|
export const createPenpotImage = (
|
|
@ -7,7 +7,7 @@ import {
|
||||||
createPenpotRectangle,
|
createPenpotRectangle,
|
||||||
createPenpotText
|
createPenpotText
|
||||||
} from '.';
|
} from '.';
|
||||||
import { NodeData, TextData } from '../interfaces';
|
import { NodeData, TextData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
import { calculateAdjustment } from '../utils';
|
import { calculateAdjustment } from '../utils';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { createPenpotItem } from '.';
|
import { createPenpotItem } from '.';
|
||||||
import { NodeData } from '../interfaces';
|
import { NodeData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
|
|
||||||
export const createPenpotPage = (file: PenpotFile, node: NodeData) => {
|
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 { PenpotFile } from '../penpot';
|
||||||
import { translateFills } from '../translators';
|
import { translateFills } from '../translators';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import slugify from 'slugify';
|
import slugify from 'slugify';
|
||||||
|
|
||||||
import { TextData } from '../interfaces';
|
import { TextData } from '../../common/interfaces';
|
||||||
import { PenpotFile } from '../penpot';
|
import { PenpotFile } from '../penpot';
|
||||||
import {
|
import {
|
||||||
translateFills,
|
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) => {
|
export const translateTextDecoration = (node: TextData | TextDataChildren) => {
|
||||||
const textDecoration = node.textDecoration;
|
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) => {
|
export const translateTextTransform = (node: TextData | TextDataChildren) => {
|
||||||
const textCase = node.textCase;
|
const textCase = node.textCase;
|
|
@ -1,4 +1,4 @@
|
||||||
import { NodeData } from '../interfaces.js';
|
import { NodeData } from '../../common/interfaces';
|
||||||
|
|
||||||
export const calculateAdjustment = (node: NodeData) => {
|
export const calculateAdjustment = (node: NodeData) => {
|
||||||
// For each child, check whether the X or Y position is less than 0 and less than the
|
// For each child, check whether the X or Y position is less than 0 and less than the
|
|
@ -9,7 +9,7 @@
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node10",
|
"moduleResolution": "Node10",
|
||||||
"strict": true,
|
"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
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ module.exports = (env, argv) => ({
|
||||||
devtool: argv.mode === 'production' ? false : 'inline-source-map',
|
devtool: argv.mode === 'production' ? false : 'inline-source-map',
|
||||||
|
|
||||||
entry: {
|
entry: {
|
||||||
ui: './src/ui.tsx', // The entry point for your UI code
|
ui: './src/ui/ui.tsx', // The entry point for your UI code
|
||||||
code: './src/code.ts' // The entry point for your plugin code
|
code: './src/plugin/code.ts' // The entry point for your plugin code
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
|
@ -54,7 +54,7 @@ module.exports = (env, argv) => ({
|
||||||
}),
|
}),
|
||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
inject: 'body',
|
inject: 'body',
|
||||||
template: './src/ui.html',
|
template: './src/ui/ui.html',
|
||||||
filename: 'ui.html',
|
filename: 'ui.html',
|
||||||
chunks: ['ui']
|
chunks: ['ui']
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue