@gjsify/cli 0.0.1 → 0.0.3
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/lib/actions/build.d.ts +110 -6
- package/lib/actions/build.js +98 -21
- package/lib/commands/build.d.ts +2 -16
- package/lib/commands/build.js +90 -57
- package/lib/commands/index.d.ts +1 -0
- package/lib/commands/index.js +1 -0
- package/lib/config.d.ts +14 -0
- package/lib/config.js +63 -0
- package/lib/constants.d.ts +1 -0
- package/lib/constants.js +1 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +12 -6
- package/lib/types/cli-build-options.d.ts +45 -0
- package/lib/types/cli-build-options.js +1 -0
- package/lib/types/command.d.ts +9 -0
- package/lib/types/command.js +1 -0
- package/lib/types/config-data-library.d.ts +3 -0
- package/lib/types/config-data-library.js +1 -0
- package/lib/types/config-data-typescript.d.ts +5 -0
- package/lib/types/config-data-typescript.js +1 -0
- package/lib/types/config-data.d.ts +11 -0
- package/lib/types/config-data.js +1 -0
- package/lib/types/cosmiconfig-result.d.ts +5 -0
- package/lib/types/cosmiconfig-result.js +1 -0
- package/lib/types/index.d.ts +6 -1
- package/lib/types/index.js +6 -2
- package/package.json +31 -75
- package/src/actions/build.ts +121 -0
- package/src/actions/index.ts +1 -0
- package/src/commands/build.ts +95 -0
- package/src/commands/index.ts +1 -0
- package/src/config.ts +80 -0
- package/src/constants.ts +1 -0
- package/src/index.ts +14 -0
- package/src/lodash.d.ts +46 -0
- package/src/types/cli-build-options.ts +46 -0
- package/src/types/command.ts +10 -0
- package/src/types/config-data-library.ts +5 -0
- package/src/types/config-data-typescript.ts +6 -0
- package/src/types/config-data.ts +12 -0
- package/src/types/cosmiconfig-result.ts +5 -0
- package/src/types/index.ts +6 -0
- package/tsconfig.json +13 -0
- package/LICENSE +0 -21
- package/README.md +0 -78
- package/bin/run +0 -5
- package/bin/run.cmd +0 -3
- package/lib/actions/init.d.ts +0 -0
- package/lib/actions/init.js +0 -6
- package/lib/defaults.d.ts +0 -6
- package/lib/defaults.js +0 -8
- package/lib/types/build-options.d.ts +0 -9
- package/lib/types/build-options.js +0 -2
- package/lib/webpack.config.default.d.ts +0 -47
- package/lib/webpack.config.default.js +0 -71
- package/oclif.manifest.json +0 -1
package/README.md
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
@gjsify/cli
|
|
2
|
-
===========
|
|
3
|
-
|
|
4
|
-
Command line tool for gjsify
|
|
5
|
-
|
|
6
|
-
[](https://oclif.io)
|
|
7
|
-
[](https://npmjs.org/package/@gjsify/cli)
|
|
8
|
-
[](https://npmjs.org/package/@gjsify/cli)
|
|
9
|
-
[](https://github.com/gjsify/cli/blob/master/package.json)
|
|
10
|
-
|
|
11
|
-
<!-- toc -->
|
|
12
|
-
* [Usage](#usage)
|
|
13
|
-
* [Commands](#commands)
|
|
14
|
-
* [CommonJS compatibility](#commonjs-compatibility)
|
|
15
|
-
<!-- tocstop -->
|
|
16
|
-
# Usage
|
|
17
|
-
<!-- usage -->
|
|
18
|
-
```sh-session
|
|
19
|
-
$ npm install -g @gjsify/cli
|
|
20
|
-
$ gjsify COMMAND
|
|
21
|
-
running command...
|
|
22
|
-
$ gjsify (-v|--version|version)
|
|
23
|
-
@gjsify/cli/0.0.1 linux-x64 node-v12.14.1
|
|
24
|
-
$ gjsify --help [COMMAND]
|
|
25
|
-
USAGE
|
|
26
|
-
$ gjsify COMMAND
|
|
27
|
-
...
|
|
28
|
-
```
|
|
29
|
-
<!-- usagestop -->
|
|
30
|
-
# Commands
|
|
31
|
-
<!-- commands -->
|
|
32
|
-
* [`gjsify build [FILE]`](#gjsify-build-file)
|
|
33
|
-
* [`gjsify help [COMMAND]`](#gjsify-help-command)
|
|
34
|
-
|
|
35
|
-
## `gjsify build [FILE]`
|
|
36
|
-
|
|
37
|
-
describe the command here
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
USAGE
|
|
41
|
-
$ gjsify build [FILE]
|
|
42
|
-
|
|
43
|
-
OPTIONS
|
|
44
|
-
-b, --beautify Beautify build output
|
|
45
|
-
-h, --help show CLI help
|
|
46
|
-
-m, --minimize Minimize build output
|
|
47
|
-
-o, --outputFilename=outputFilename [default: index.js] File name of the output bundle
|
|
48
|
-
-p, --outputPath=outputPath [default: ./dist] Output destination path
|
|
49
|
-
|
|
50
|
-
EXAMPLE
|
|
51
|
-
$ gjsify build ./src/hello.ts
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
_See code: [src/commands/build.ts](https://github.com/gjsify/cli/blob/v0.0.1/src/commands/build.ts)_
|
|
55
|
-
|
|
56
|
-
## `gjsify help [COMMAND]`
|
|
57
|
-
|
|
58
|
-
display help for gjsify
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
USAGE
|
|
62
|
-
$ gjsify help [COMMAND]
|
|
63
|
-
|
|
64
|
-
ARGUMENTS
|
|
65
|
-
COMMAND command to show help for
|
|
66
|
-
|
|
67
|
-
OPTIONS
|
|
68
|
-
--all see all commands in CLI
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.3/src/commands/help.ts)_
|
|
72
|
-
<!-- commandsstop -->
|
|
73
|
-
|
|
74
|
-
# CommonJS compatibility
|
|
75
|
-
|
|
76
|
-
Many [npm](https://www.npmjs.com/) modules that don't do IO will just work after being browserified. Others take more work.
|
|
77
|
-
|
|
78
|
-
When you require() any of these modules, you will get a gjs-specific shim:
|
package/bin/run
DELETED
package/bin/run.cmd
DELETED
package/lib/actions/init.d.ts
DELETED
|
File without changes
|
package/lib/actions/init.js
DELETED
package/lib/defaults.d.ts
DELETED
package/lib/defaults.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import webpack from 'webpack';
|
|
2
|
-
export declare const webpackConfigDefault: {
|
|
3
|
-
entry: string[];
|
|
4
|
-
output: {
|
|
5
|
-
path: string;
|
|
6
|
-
filename: string;
|
|
7
|
-
};
|
|
8
|
-
module: {
|
|
9
|
-
rules: {
|
|
10
|
-
test: RegExp;
|
|
11
|
-
loader: string;
|
|
12
|
-
exclude: RegExp;
|
|
13
|
-
}[];
|
|
14
|
-
};
|
|
15
|
-
plugins: webpack.ProvidePlugin[];
|
|
16
|
-
optimization: {
|
|
17
|
-
minimize: boolean;
|
|
18
|
-
minimizer: any[];
|
|
19
|
-
};
|
|
20
|
-
resolve: {
|
|
21
|
-
extensions: string[];
|
|
22
|
-
alias: {
|
|
23
|
-
console: string;
|
|
24
|
-
constants: string;
|
|
25
|
-
crypto: string;
|
|
26
|
-
domain: string;
|
|
27
|
-
fs: string;
|
|
28
|
-
os: string;
|
|
29
|
-
path: string;
|
|
30
|
-
process: string;
|
|
31
|
-
querystring: string;
|
|
32
|
-
stream: string;
|
|
33
|
-
tty: string;
|
|
34
|
-
zlib: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export declare const minimizerConfigDefault: {
|
|
39
|
-
sourceMap: boolean;
|
|
40
|
-
extractComments: boolean;
|
|
41
|
-
terserOptions: {
|
|
42
|
-
mangle: boolean;
|
|
43
|
-
output: {
|
|
44
|
-
beautify: boolean;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const webpack_1 = tslib_1.__importDefault(require("webpack"));
|
|
5
|
-
const defaults_1 = require("./defaults");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
exports.webpackConfigDefault = {
|
|
8
|
-
entry: new Array(),
|
|
9
|
-
output: {
|
|
10
|
-
path: path_1.resolve(__dirname, defaults_1.flags.outputPath),
|
|
11
|
-
filename: defaults_1.flags.outputFilename,
|
|
12
|
-
},
|
|
13
|
-
module: {
|
|
14
|
-
rules: [
|
|
15
|
-
{
|
|
16
|
-
test: /\.tsx?$/,
|
|
17
|
-
loader: 'ts-loader',
|
|
18
|
-
exclude: /node_modules/,
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
plugins: [
|
|
23
|
-
new webpack_1.default.ProvidePlugin({
|
|
24
|
-
console: '@gjsify/console',
|
|
25
|
-
process: '@gjsify/process',
|
|
26
|
-
Buffer: ['buffer', 'Buffer'],
|
|
27
|
-
}),
|
|
28
|
-
],
|
|
29
|
-
optimization: {
|
|
30
|
-
minimize: defaults_1.flags.minimize,
|
|
31
|
-
minimizer: new Array(),
|
|
32
|
-
},
|
|
33
|
-
resolve: {
|
|
34
|
-
extensions: ['.tsx', '.ts', '.js'],
|
|
35
|
-
alias: {
|
|
36
|
-
// assert: https://github.com/browserify/commonjs-assert
|
|
37
|
-
// buffer: https://www.npmjs.com/package/buffer
|
|
38
|
-
console: '@gjsify/console',
|
|
39
|
-
constants: 'constants-browserify',
|
|
40
|
-
crypto: 'crypto-browserify',
|
|
41
|
-
domain: 'domain-browser',
|
|
42
|
-
// events: https://github.com/Gozala/events
|
|
43
|
-
fs: '@gjsify/fs',
|
|
44
|
-
// TODO http
|
|
45
|
-
// TODO https
|
|
46
|
-
os: '@gjsify/os',
|
|
47
|
-
path: '@gjsify/path',
|
|
48
|
-
process: '@gjsify/process',
|
|
49
|
-
// punycode: https://github.com/bestiejs/punycode.js
|
|
50
|
-
querystring: 'querystring-es3',
|
|
51
|
-
stream: 'stream-browserify',
|
|
52
|
-
// string_decoder: https://github.com/nodejs/string_decoder
|
|
53
|
-
// TODO timers: https://andyholmes.github.io/articles/asynchronous-programming-in-gjs.html https://www.npmjs.com/package/timers-browserify
|
|
54
|
-
tty: 'tty-browserify',
|
|
55
|
-
// url: https://github.com/defunctzombie/node-url
|
|
56
|
-
// util: https://github.com/browserify/node-util
|
|
57
|
-
// TODO vm: https://github.com/browserify/vm-browserify
|
|
58
|
-
zlib: 'browserify-zlib',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
exports.minimizerConfigDefault = {
|
|
63
|
-
sourceMap: false,
|
|
64
|
-
extractComments: true,
|
|
65
|
-
terserOptions: {
|
|
66
|
-
mangle: true,
|
|
67
|
-
output: {
|
|
68
|
-
beautify: defaults_1.flags.beautify,
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
};
|
package/oclif.manifest.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"0.0.1","commands":{"build":{"id":"build","description":"describe the command here","pluginName":"@gjsify/cli","pluginType":"core","aliases":[],"examples":["$ gjsify build ./src/hello.ts"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"outputFilename":{"name":"outputFilename","type":"option","char":"o","description":"File name of the output bundle","required":false,"default":"index.js"},"outputPath":{"name":"outputPath","type":"option","char":"p","description":"Output destination path","required":false,"default":"./dist"},"beautify":{"name":"beautify","type":"boolean","char":"b","description":"Beautify build output","required":false,"allowNo":false},"minimize":{"name":"minimize","type":"boolean","char":"m","description":"Minimize build output","required":false,"allowNo":false}},"args":[{"name":"file"}]}}}
|