Skip to content

Commit

Permalink
fix: pkg name and convert to PaskalCase
Browse files Browse the repository at this point in the history
  • Loading branch information
si3nloong committed Jan 1, 2021
1 parent e1c1c88 commit 83cc58f
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
@@ -1,14 +1,14 @@
{
"name": "@responsive-ui/date",
"name": "@responsive-ui/date-picker",
"version": "0.2.6",
"description": "Date component",
"description": "Date Picker component",
"author": "Si3nLoong <sianloong90@gmail.com>",
"homepage": "https://github.com/wetix/responsive-ui#readme",
"license": "MIT",
"main": "lib/index.cjs",
"browser": "lib/index.js",
"module": "lib/index.mjs",
"svelte": "src/Date.svelte",
"svelte": "src/DatePicker.svelte",
"types": "types/index.d.ts",
"publishConfig": {
"access": "public"
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions components/date-picker/types/index.d.ts
@@ -0,0 +1,17 @@
import type { SvelteComponentTyped } from "svelte/internal";

export interface DatePickerProps {}

export interface DatePickerEvents {}

export interface DatePickerSlots {
default: {};
}

declare class DatePicker extends SvelteComponentTyped<
DatePickerProps,
DatePickerEvents,
DatePickerSlots
> {}

export default DatePicker;
17 changes: 0 additions & 17 deletions components/date/types/index.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -36,6 +36,7 @@
"@types/jest": "^26.0.19",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"camelcase": "^6.2.0",
"chalk": "^4.1.0",
"css-loader": "^5.0.1",
"faker": "^5.1.0",
Expand Down
10 changes: 7 additions & 3 deletions scripts/build.js
Expand Up @@ -2,11 +2,12 @@ import fs from "fs-extra";
import path from "path";
import chalk from "chalk";
import { rollup } from "rollup";
import camelCase from "camelcase";
import svelte from "rollup-plugin-svelte";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import commonjs from "@rollup/plugin-commonjs";
import css from "rollup-plugin-css-only";
// import css from "rollup-plugin-css-only";
import sveltePreprocess from "svelte-preprocess";

const extractCss = () => {
Expand Down Expand Up @@ -97,18 +98,21 @@ const analyzePackageJson = async (bundle, filepath, pkg) => {
const map = new Map();
for (let i = 0; i < files.length; i++) {
const file = files[i];
console.log(file);

if (!file) continue;

const filename = path.basename(file);
map.set(filename, true);
if (map.has(file)) continue;

const name = camelCase(pkg.name.replace("@responsive-ui/", ""), {
pascalCase: true,
});
const ext = path.extname(file).toLowerCase();
let result = {
file: filename,
format: "iife",
name: "app",
name,
};

switch (ext) {
Expand Down

0 comments on commit 83cc58f

Please sign in to comment.