tweakpane-plugin-file-import
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -650,3 +650,3 @@ (function (global, factory) { | ||
const FileInputPlugin = { | ||
const TweakpaneFileInputPlugin = { | ||
id: 'file-input', | ||
@@ -712,3 +712,3 @@ // type: The plugin type. | ||
// Export your plugin(s) as constant `plugins` | ||
const plugins = [FileInputPlugin]; | ||
const plugins = [TweakpaneFileInputPlugin]; | ||
@@ -715,0 +715,0 @@ exports.plugins = plugins; |
{ | ||
"name": "tweakpane-plugin-file-import", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A general-purpose and simple file input Tweakpane plugin", | ||
@@ -42,9 +42,9 @@ "main": "dist/tweakpane-plugin-file-import.js", | ||
"@types/mocha": "^10.0.1", | ||
"@typescript-eslint/eslint-plugin": "^4.15.2", | ||
"@typescript-eslint/parser": "^4.15.2", | ||
"@typescript-eslint/eslint-plugin": "^5.59.8", | ||
"@typescript-eslint/parser": "^5.59.8", | ||
"autoprefixer": "^10.2.4", | ||
"eslint": "^7.20.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint": "^8.42.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-simple-import-sort": "^10.0.0", | ||
"install": "^0.13.0", | ||
@@ -51,0 +51,0 @@ "jsdom": "^22.1.0", |
# `tweakpane-plugin-file-import` | ||
[![npm](https://img.shields.io/npm/v/tweakpane-plugin-file-import?color=red&logo=npm)](https://www.npmjs.com/package/luchoturtle/tweakpane-plugin-file-import) | ||
A Tweakpane plugin for importing files. | ||
@@ -12,10 +14,15 @@ | ||
You need [Tweakpane](https://github.com/cocopon/tweakpane) to install this plugin. | ||
You may use https://unpkg.com/tweakpane-plugin-file-import to get the latest version | ||
and add it as a `<script>` tag on your HTML page. | ||
## Browser | ||
```html | ||
<script src="tweakpane.min.js"></script> | ||
<script src="tweakpane-plugin-file-import.min.js"></script> | ||
<script src="https://unpkg.com/tweakpane@3.0.5/dist/tweakpane.js"></script> | ||
<script src="./tweakpane-plugin-file-import.min.js"></script> | ||
<script> | ||
const pane = new Tweakpane.Pane(); | ||
pane.registerPlugin(TweakpaneTemplatePlugin); | ||
pane.registerPlugin(FileInputPlugin); | ||
</script> | ||
@@ -26,2 +33,10 @@ ``` | ||
Alternatively, you can install with `npm`: | ||
```sh | ||
npm i tweakpane-plugin-file-import | ||
``` | ||
And import it like so. | ||
```js | ||
@@ -37,2 +52,4 @@ import {Pane} from 'tweakpane'; | ||
Simply initialize the params with an empty string and pass the optional parameters. | ||
```js | ||
@@ -55,1 +72,50 @@ const params = { | ||
### Optional parameters | ||
| property | type | description | | ||
|-----------|--------|--------------------------------| | ||
| lineCount | int | Number of lines for the height of the container. Similar to [FPS graph ](https://github.com/tweakpane/plugin-essentials#fps-graph) | | ||
| filetypes | array | Array of valid file extensions. | | ||
## Contributing | ||
If you want to contribute to this package, you are free to open a pull request. | ||
### Quickstart | ||
Install dependencies: | ||
```sh | ||
npm install | ||
``` | ||
To build the source codes and watch changes, run: | ||
```sh | ||
npm watch | ||
``` | ||
After this, simply open `test/browser.html` to see the results. | ||
### File structure | ||
This project follows the same structure as any other [Tweakpane third-party plugin](https://github.com/tweakpane/plugin-template). | ||
``` | ||
|- src | ||
| |- controller ...... Controller for the custom view | ||
| |- sass ............ Plugin CSS | ||
| `- view ............ Custom view | ||
| |- index.ts ........ Entrypoint | ||
| |- plugin.ts ....... Plugin | ||
|- dist ............... Compiled files | ||
`- test | ||
`- browser.html .... Plugin usage in an HTML file | ||
``` | ||
[tweakpane]: https://github.com/cocopon/tweakpane/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46015
117