@jag-k/rollup-plugin-scriptable
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -5,3 +5,3 @@ { | ||
"license": "SEE LICENSE IN LICENSE", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"author": { | ||
@@ -8,0 +8,0 @@ "email": "jag.konon@gmail.com", |
[npm]: https://img.shields.io/npm/v/@jag-k/rollup-plugin-scriptable | ||
[npm-url]: https://www.npmjs.com/package/@jag-k/rollup-plugin-scriptable | ||
[main-version]: https://img.shields.io/github/package-json/v/jag-k/rollup-plugin-scriptable?label=main%20version | ||
[size]: https://packagephobia.com/badge?p=@jag-k/rollup-plugin-scriptable | ||
[size-url]: https://packagephobia.com/result?p=@jag-k/rollup-plugin-scriptable | ||
[license]: https://img.shields.io/github/license/jag-k/rollup-plugin-scriptable | ||
@@ -61,3 +66,2 @@ | ||
└── HASS Persons.scriptable | ||
``` | ||
@@ -70,6 +74,37 @@ | ||
## Quick Tips | ||
You can use [`rollup-plugin-copy`](https://npmjs.com/package/rollup-plugin-copy) to copy files to iCloud for easy | ||
development and debugging Scriptable scripts. | ||
```js | ||
// rollup.config.js | ||
import scriptableBundle from "@jag-k/rollup-plugin-scriptable"; | ||
import copy from 'rollup-plugin-copy'; | ||
import * as config from "./config.json"; | ||
export default { | ||
input: 'src/main.ts', | ||
output: [ | ||
{ | ||
file: `dist/${config.name}.js`, | ||
format: 'es', | ||
plugins: [scriptableBundle(config)] | ||
}, | ||
], | ||
plugins: process.env.COPY_TO_ICLOUD === 'true' ? [ | ||
copy({ | ||
targets: [ | ||
{ | ||
src: `dist/*.js`, | ||
dest: '~/Library/Mobile Documents/iCloud~dk~simonbs~Scriptable/Documents/' | ||
}, | ||
] | ||
}) | ||
] : [] | ||
}; | ||
``` | ||
## License | ||
[Apache 2.0](LICENSE) |
20687
109