piral-cli-xbuild 0.15.0-alpha.3548

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 - 2022 smapiot
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ [![Piral Logo](https://github.com/smapiot/piral/raw/main/docs/assets/logo.png)](https://piral.io)
2
+
3
+ # [Piral CLI xBuild](https://piral.io) · [![GitHub License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smapiot/piral/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/piral-cli-xbuild.svg?style=flat)](https://www.npmjs.com/package/piral-cli-xbuild) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://jestjs.io) [![Gitter Chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/piral-io/community)
4
+
5
+ This plugin enables using npm scripts for building and debugging Piral instances & pilets.
6
+
7
+ ## Installation
8
+
9
+ Use your favorite NPM client for the installation:
10
+
11
+ ```sh
12
+ npm i piral-cli-xbuild --save-dev
13
+ ```
14
+
15
+ **Note**: The plugin has to be installed to tell the `piral-cli` to use `xbuild` as the default bundler.
16
+
17
+ ## Using
18
+
19
+ Standard commands such as `piral build` or `pilet debug` will now work against shell scripts defined via special sections in the *package.json*.
20
+
21
+ (tbd)
22
+
23
+ ## License
24
+
25
+ Piral is released using the MIT license. For more information see the [license file](./LICENSE).
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "piral-cli-xbuild",
3
+ "version": "0.15.0-alpha.3548",
4
+ "description": "Provides debug and build capabilities for pilets and Piral instances using npm scripts.",
5
+ "keywords": [
6
+ "piral-cli",
7
+ "piral",
8
+ "plugin",
9
+ "npm",
10
+ "scripts",
11
+ "build",
12
+ "debug"
13
+ ],
14
+ "author": "smapiot",
15
+ "homepage": "https://piral.io",
16
+ "license": "MIT",
17
+ "main": "lib/index.js",
18
+ "typings": "lib/index.d.ts",
19
+ "engines": {
20
+ "node": ">=10.0"
21
+ },
22
+ "files": [
23
+ "lib",
24
+ "src"
25
+ ],
26
+ "funding": {
27
+ "type": "github",
28
+ "url": "https://github.com/sponsors/smapiot"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/smapiot/piral.git"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/smapiot/piral/issues"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc",
39
+ "test": "echo \"Error: run tests from root\" && exit 1"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^13.9.0",
43
+ "@types/yargs": "^15.0.4",
44
+ "piral-cli": "0.15.0-alpha.3548",
45
+ "typescript": "^4.0.2"
46
+ },
47
+ "gitHead": "2edf7bbcee6a7e931348198d14139c7f958877e7"
48
+ }
package/src/actions.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { resolve } from 'path';
2
+ import type {
3
+ DebugPiletBundlerDefinition,
4
+ DebugPiralBundlerDefinition,
5
+ BuildPiletBundlerDefinition,
6
+ BuildPiralBundlerDefinition,
7
+ WatchPiralBundlerDefinition,
8
+ } from 'piral-cli';
9
+
10
+ export const debugPiral: DebugPiralBundlerDefinition = {
11
+ path: resolve(__dirname, 'xbuild', 'piral.js'),
12
+ };
13
+
14
+ export const watchPiral: WatchPiralBundlerDefinition = {
15
+ path: resolve(__dirname, 'xbuild', 'piral.js'),
16
+ };
17
+
18
+ export const buildPiral: BuildPiralBundlerDefinition = {
19
+ path: resolve(__dirname, 'xbuild', 'piral.js'),
20
+ };
21
+
22
+ export const debugPilet: DebugPiletBundlerDefinition = {
23
+ path: resolve(__dirname, 'xbuild', 'pilet.js'),
24
+ };
25
+
26
+ export const buildPilet: BuildPiletBundlerDefinition = {
27
+ path: resolve(__dirname, 'xbuild', 'pilet.js'),
28
+ };
package/src/index.ts ADDED
@@ -0,0 +1,8 @@
1
+ import * as actions from './actions';
2
+ import type { CliPlugin } from 'piral-cli';
3
+
4
+ const plugin: CliPlugin = (cli) => {
5
+ cli.withBundler('xbuild', actions);
6
+ };
7
+
8
+ module.exports = plugin;