Skip to content

Commit

Permalink
[BREAKING] chore: change build output from lib -> dist
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Feb 17, 2023
1 parent 1b5e6e4 commit 22b3b94
Show file tree
Hide file tree
Showing 84 changed files with 380 additions and 380 deletions.
17 changes: 17 additions & 0 deletions .changeset/funny-bats-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@svelte-put/preprocess-auto-slug': major
'@svelte-put/clickoutside': major
'@svelte-put/dragscroll': major
'@svelte-put/intersect': major
'@svelte-put/shortcut': major
'@svelte-put/movable': major
'@svelte-put/resize': major
'@svelte-put/copy': major
'@svelte-put/toc': major
'@svelte-put/avatar': major
'@svelte-put/modal': major
'@svelte-put/select': minor
'@svelte-put/transitions': minor
---

[BREAKING] move build output from `lib` to `dist` to stay consistent of new changes from [@sveltejs/package@2](https://github.com/sveltejs/kit/releases/tag/%40sveltejs/package%402.0.0). Also fixes some api docs issues
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ node_modules
# testing
coverage

# next.js
# built files
.next/
out/
build/
dist

# misc
.DS_Store
Expand All @@ -32,7 +33,7 @@ build/
temp/

# svelte-kit
.svelte-kit/
.svelte-kit
.vercel

# vite temp
Expand Down
2 changes: 1 addition & 1 deletion configs/apirc/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"bundledPackages": [],
"compiler": {
"tsconfigFilePath": "<projectFolder>/tsconfig.json"
Expand Down
1 change: 0 additions & 1 deletion packages/actions/clickoutside/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/clickoutside/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
8 changes: 4 additions & 4 deletions packages/actions/clickoutside/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@svelte-put/clickoutside",
"version": "1.2.1",
"description": "Event for clicking outside a node",
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib"
"dist"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"./**/*/*{ts,js,cjs}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/clickoutside/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: RollupOptions = {
input: 'src/index.ts',
output: {
sourcemap: true,
dir: './lib',
dir: './dist',
format: 'esm',
},
plugins: [
Expand Down
5 changes: 2 additions & 3 deletions packages/actions/clickoutside/src/clickoutside.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Action, ActionReturn } from 'svelte/action';
import type { Action } from 'svelte/action';

import { ClickOutsideAttributes, ClickOutsideParameters } from './clickoutside.types';

Expand Down Expand Up @@ -57,7 +56,7 @@ import { ClickOutsideAttributes, ClickOutsideParameters } from './clickoutside.t
*
* @param node - node outside of which `click` event will trigger `clickoutside`
* @param parameters - instructions for `clickoutside` behavior
* @returns svelte {@link ActionReturn}
* @returns svelte {@link svelte/action#ActionReturn | ActionReturn}
*/
export const clickoutside: Action<
HTMLElement,
Expand Down
4 changes: 2 additions & 2 deletions packages/actions/clickoutside/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src/**/*.ts", "rollup.config.ts"],
"extends": "@svelte-put/tsconfig/base.package.json",
"compilerOptions": {
"outDir": "./lib",
"declarationDir": "./lib",
"outDir": "./dist",
"declarationDir": "./dist"
}
}
1 change: 0 additions & 1 deletion packages/actions/copy/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/copy/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
8 changes: 4 additions & 4 deletions packages/actions/copy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@svelte-put/copy",
"version": "1.1.1",
"description": "Svelte action & utilities for copying text to clipboard",
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib"
"dist"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"./**/*/*{ts,js,cjs}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/copy/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: RollupOptions = {
input: 'src/index.ts',
output: {
sourcemap: true,
dir: './lib',
dir: './dist',
format: 'esm',
},
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/copy/src/copy.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { CopyParameters, TextResolver, CopyAttributes, CopyDetail } from '.
*
* @param node - HTMLElement to register action
* @param parameters - svelte action parameters
* @returns svelte {@link ActionReturn }
* @returns svelte {@link svelte/action#ActionReturn}
*/
export function copy<K extends keyof HTMLElementEventMap>(
node: HTMLElement,
Expand Down
4 changes: 2 additions & 2 deletions packages/actions/copy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src/**/*.ts", "rollup.config.ts"],
"extends": "@svelte-put/tsconfig/base.package.json",
"compilerOptions": {
"outDir": "./lib",
"declarationDir": "./lib"
"outDir": "./dist",
"declarationDir": "./dist"
}
}
1 change: 0 additions & 1 deletion packages/actions/dragscroll/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/dragscroll/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
8 changes: 4 additions & 4 deletions packages/actions/dragscroll/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@svelte-put/dragscroll",
"version": "1.1.1",
"description": "Svelte action for drag-to-scroll behavior",
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib"
"dist"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"./**/*/*{ts,js,cjs}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/dragscroll/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: RollupOptions = {
input: 'src/index.ts',
output: {
sourcemap: true,
dir: './lib',
dir: './dist',
format: 'esm',
},
plugins: [
Expand Down
5 changes: 2 additions & 3 deletions packages/actions/dragscroll/src/dragscroll.action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Action, ActionReturn } from 'svelte/action';
import type { Action } from 'svelte/action';

import type { DragScrollParameters } from './dragscroll.types';

Expand Down Expand Up @@ -30,7 +29,7 @@ function resolveParameters(parameters: Partial<DragScrollParameters> = {}) {
*
* @param node - node to apply the action
* @param parameters - instructions for customizing action behavior
* @returns svelte {@link ActionReturn}
* @returns svelte {@link svelte/action#ActionReturn | ActionReturn}
*/
export const dragscroll: Action<HTMLElement, Partial<DragScrollParameters>> = function (
node,
Expand Down
4 changes: 2 additions & 2 deletions packages/actions/dragscroll/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src/**/*.ts", "rollup.config.ts"],
"extends": "@svelte-put/tsconfig/base.package.json",
"compilerOptions": {
"outDir": "./lib",
"declarationDir": "./lib"
"outDir": "./dist",
"declarationDir": "./dist"
}
}
1 change: 0 additions & 1 deletion packages/actions/intersect/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/intersect/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
8 changes: 4 additions & 4 deletions packages/actions/intersect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@svelte-put/intersect",
"version": "1.2.1",
"description": "Action that wraps IntersectionObserver",
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib"
"dist"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"./**/*/*{ts,js,cjs}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/intersect/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: RollupOptions = {
input: 'src/index.ts',
output: {
sourcemap: true,
dir: './lib',
dir: './dist',
format: 'esm',
},
plugins: [
Expand Down
5 changes: 2 additions & 3 deletions packages/actions/intersect/src/intersect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Action, ActionReturn } from 'svelte/action';
import type { Action } from 'svelte/action';

import { IntersectAttributes, IntersectDetail, IntersectParameters } from './intersect.types';

Expand Down Expand Up @@ -94,7 +93,7 @@ import { IntersectAttributes, IntersectDetail, IntersectParameters } from './int
*
* @param node - HTMLElement to observe
* @param parameters - svelte action parameters
* @returns svelte {@link ActionReturn}
* @returns svelte {@link svelte/action#ActionReturn | ActionReturn}
*/
export const intersect: Action<HTMLElement, IntersectParameters, IntersectAttributes> = function (
node,
Expand Down
4 changes: 2 additions & 2 deletions packages/actions/intersect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src/**/*.ts", "rollup.config.ts"],
"extends": "@svelte-put/tsconfig/base.package.json",
"compilerOptions": {
"outDir": "./lib",
"declarationDir": "./lib",
"outDir": "./dist",
"declarationDir": "./dist"
}
}
1 change: 0 additions & 1 deletion packages/actions/movable/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/movable/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## MovableParameters.cursor property

automatically change cursor to `grab` on hover and `grabbing` on mousedown of \`<!-- -->handle
automatically change cursor to `grab` on hover and `grabbing` on mousedown of `handle`

**Signature:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface MovableParameters

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [cursor?](./movable.movableparameters.cursor.md) | | boolean | _(Optional)_ automatically change cursor to <code>grab</code> on hover and <code>grabbing</code> on mousedown of \`<!-- -->handle |
| [cursor?](./movable.movableparameters.cursor.md) | | boolean | _(Optional)_ automatically change cursor to <code>grab</code> on hover and <code>grabbing</code> on mousedown of <code>handle</code> |
| [enabled?](./movable.movableparameters.enabled.md) | | boolean | _(Optional)_ whether to activate the action. Default to <code>true</code> |
| [handle?](./movable.movableparameters.handle.md) | | HTMLElement | _(Optional)_ A node that triggers mousedown event, otherwise the node itself is the handle |
| [ignore?](./movable.movableparameters.ignore.md) | | string \| string\[\] | _(Optional)_ CSS selectors within the <code>handle</code> node to exclude from triggering <code>movable</code>. Use this options with caution because it might affect performance. |
Expand Down
8 changes: 4 additions & 4 deletions packages/actions/movable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "@svelte-put/movable",
"version": "1.4.1",
"description": "Action to move node on mousedown & mousemove",
"main": "lib/index.js",
"module": "lib/index.js",
"types": "lib/src/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"publishConfig": {
"access": "public"
},
"files": [
"lib"
"dist"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"./**/*/*{ts,js,cjs}\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/movable/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: RollupOptions = {
input: 'src/index.ts',
output: {
sourcemap: true,
dir: './lib',
dir: './dist',
format: 'esm',
},
plugins: [
Expand Down
5 changes: 2 additions & 3 deletions packages/actions/movable/src/movable.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { Action, ActionReturn } from 'svelte/action';
import type { Action } from 'svelte/action';

import type { MovableAttributes, MovableEventDetails, MovableParameters } from './movable.types';
import { input } from './utils';
Expand Down Expand Up @@ -99,7 +98,7 @@ import { input } from './utils';
*
* @param node - HTMLElement to be moved
* @param parameters - svelte action parameters
* @returns svelte {@link ActionReturn}
* @returns svelte {@link svelte/action#ActionReturn | ActionReturn}
*
*/
export const movable: Action<HTMLElement, MovableParameters, MovableAttributes> = function (
Expand Down
2 changes: 1 addition & 1 deletion packages/actions/movable/src/movable.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export interface MovableParameters {
* Use this options with caution because it might affect performance.
*/
ignore?: string | string[];
/** automatically change cursor to `grab` on hover and `grabbing` on mousedown of `handle */
/** automatically change cursor to `grab` on hover and `grabbing` on mousedown of `handle` */
cursor?: boolean;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/actions/movable/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"include": ["src/**/*.ts", "rollup.config.ts"],
"extends": "@svelte-put/tsconfig/base.package.json",
"compilerOptions": {
"outDir": "./lib",
"declarationDir": "./lib",
"outDir": "./dist",
"declarationDir": "./dist"
}
}
1 change: 0 additions & 1 deletion packages/actions/resize/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion packages/actions/resize/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@svelte-put/apirc/base.json",
"projectFolder": ".",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts"
}
Loading

0 comments on commit 22b3b94

Please sign in to comment.