Skip to content

Commit 299709d

Browse files
committed
Improve naming
1 parent 3cbb217 commit 299709d

15 files changed

+7
-16
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ packages/**/types/
66
packages/**/tsconfig.*
77
*.log
88
storybook-static/
9-
packages/webcomponent/custom-elements.json
9+
packages/webcomponents/custom-elements.json
1010
**/stats.html
1111
packages/svelte/.svelte-kit
1212
packages/qwik/tsconfig.tsbuildinfo

compiler/base.compiler.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ async function compile(defaultOptions) {
6969

7070
// Create specific README
7171
const data = fs.readFileSync('README.md', 'utf8');
72-
const result = data.replace(
73-
/\/\[target\].+/g,
74-
`/${options.target + (options.target === 'webcomponent' ? 's' : '')}`
75-
);
72+
const result = data.replace(/\/\[target\].+/g, `/${options.target}`);
7673

7774
fs.writeFileSync(`${outPath}/README.md`, result, 'utf8');
7875

@@ -105,7 +102,7 @@ async function compile(defaultOptions) {
105102
parameters: {
106103
options: {
107104
from: 'mitosis',
108-
to: options.target,
105+
to: options.target === 'webcomponents' ? 'webcomponent' : options.target,
109106
out: outFile,
110107
force: true,
111108
state: options.state,

compiler/compiler.tasks.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ const optionDefinitions = [
7777
cliConfig.platforms.map((platform) => ({
7878
title: `Move ${platform} theme`,
7979
task: () =>
80-
execa(`copyfiles .themes/** ./packages/${platform}/dist/ --flat`).catch((error) => {
80+
execa(
81+
`copyfiles .themes/** ./packages/${platform}/${platform === 'qwik' ? 'lib' : 'dist'}/ --flat`
82+
).catch((error) => {
8183
throw new Error(`Error moving ${platform} theme ${error.message}`);
8284
})
8385
})),

compiler/platforms/webcomponents.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
const prependFile = require('prepend-file');
44

55
const DEFAULT_OPTIONS = {
6-
target: 'webcomponent',
6+
target: 'webcomponents',
77
extension: 'ts',
88
state: '',
99
styles: ''

packages/angular/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"description": "Papanasi Angular UI Library",
77
"main": "./dist/papanasi-angular.umd.js",
88
"module": "./dist/papanasi-angular.es.js",
9-
"style": "./dist/papanasi.css",
109
"types": "./dist/index.d.ts",
1110
"exports": {
1211
".": {

packages/preact/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"description": "Papanasi Preact UI Library",
77
"main": "./dist/papanasi-preact.umd.js",
88
"module": "./dist/papanasi-preact.es.js",
9-
"style": "./dist/papanasi.css",
109
"types": "./dist/index.d.ts",
1110
"exports": {
1211
".": {

packages/qwik/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"qwik": "./lib/index.qwik.mjs",
1010
"module": "./lib/index.qwik.mjs",
1111
"types": "./types/index.d.ts",
12-
"style": "./lib/papanasi.css",
1312
"exports": {
1413
".": {
1514
"import": "./lib/index.qwik.mjs",

packages/react/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"description": "Papanasi React UI Library",
77
"main": "./dist/papanasi-react.umd.js",
88
"module": "./dist/papanasi-react.es.js",
9-
"style": "./dist/papanasi.css",
109
"types": "./dist/index.d.ts",
1110
"exports": {
1211
".": {

packages/solid/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"main": "dist/cjs/papanasi.js",
99
"module": "dist/esm/papanasi.js",
1010
"types": "dist/types/papanasi.d.ts",
11-
"style": "./dist/papanasi.css",
1211
"exports": {
1312
".": {
1413
"solid": "./dist/index/index.js",

packages/svelte/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"module": "./dist/index.js",
99
"type": "module",
1010
"svelte": "../src/index.ts",
11-
"style": "./dist/papanasi.css",
1211
"types": "./dist/index.d.ts",
1312
"exports": {
1413
".": {

packages/vue/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"description": "Papanasi Vue UI Library",
77
"main": "./dist/papanasi-vue.umd.js",
88
"module": "./dist/papanasi-vue.es.js",
9-
"style": "./dist/papanasi.css",
109
"types": "./dist/index.d.ts",
1110
"exports": {
1211
".": {
File renamed without changes.
File renamed without changes.

packages/webcomponent/package.json packages/webcomponents/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"description": "Papanasi Web Components UI Library",
77
"main": "./dist/papanasi-webcomponents.umd.js",
88
"module": "./dist/papanasi-webcomponents.es.js",
9-
"style": "./dist/papanasi.css",
109
"types": "./dist/index.d.ts",
1110
"exports": {
1211
".": {
File renamed without changes.

0 commit comments

Comments
 (0)