@steambrew/ttc 1.4.2 → 2.4.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/index.ts CHANGED
@@ -5,61 +5,56 @@
5
5
  * - typescript transpiler
6
6
  * - rollup configurator
7
7
  */
8
- import { BuildType, ValidateParameters } from "./Parameters"
9
- import { CheckForUpdates } from "./VersionMon"
10
- import { ValidatePlugin } from './Linter'
11
- import { TranspilerPluginComponent, TranspilerProps } from './Compiler'
8
+ import { BuildType, ValidateParameters } from './Parameters';
9
+ import { CheckForUpdates } from './VersionMon';
10
+ import { ValidatePlugin } from './Linter';
11
+ import { TranspilerPluginComponent, TranspilerProps } from './Compiler';
12
12
  import { performance } from 'perf_hooks';
13
- import { Logger } from "./Logger";
13
+ import chalk from 'chalk';
14
14
  // import { Logger } from './Logger'
15
15
 
16
16
  declare global {
17
- var PerfStartTime: number;
17
+ var PerfStartTime: number;
18
18
  }
19
19
 
20
20
  const CheckModuleUpdates = async () => {
21
- return await CheckForUpdates()
22
- }
21
+ return await CheckForUpdates();
22
+ };
23
23
 
24
24
  const StartCompilerModule = () => {
25
+ const parameters = ValidateParameters(process.argv.slice(2));
26
+ const bTersePlugin = parameters.type == BuildType.ProdBuild;
25
27
 
26
- const parameters = ValidateParameters( process.argv.slice(2) );
27
- const bTersePlugin = parameters.type == BuildType.ProdBuild
28
-
29
- Logger.Tree("Transpiler config: ", {
30
- target: parameters.targetPlugin,
31
- build: BuildType[parameters.type],
32
- minify: bTersePlugin
33
- })
28
+ console.log(chalk.greenBright.bold('config'), 'Building target:', parameters.targetPlugin, 'with type:', BuildType[parameters.type], 'minify:', bTersePlugin, '...');
34
29
 
35
- ValidatePlugin(parameters.targetPlugin).then((json: any) => {
30
+ ValidatePlugin(parameters.targetPlugin)
31
+ .then((json: any) => {
32
+ const props: TranspilerProps = {
33
+ bTersePlugin: bTersePlugin,
34
+ strPluginInternalName: json?.name,
35
+ };
36
36
 
37
- const props: TranspilerProps = {
38
- bTersePlugin: bTersePlugin,
39
- strPluginInternalName: json?.name
40
- }
37
+ TranspilerPluginComponent(props);
38
+ })
41
39
 
42
- TranspilerPluginComponent(props)
43
- })
44
-
45
- /**
46
- * plugin is invalid, we close the proccess as it has already been handled
47
- */
48
- .catch(() => {
49
- process.exit()
50
- })
51
- }
40
+ /**
41
+ * plugin is invalid, we close the proccess as it has already been handled
42
+ */
43
+ .catch(() => {
44
+ process.exit();
45
+ });
46
+ };
52
47
 
53
48
  const Initialize = () => {
54
- global.PerfStartTime = performance.now();
49
+ global.PerfStartTime = performance.now();
55
50
 
56
- // Check for --no-update flag
57
- if (process.argv.includes("--no-update")) {
58
- StartCompilerModule()
59
- return
60
- }
51
+ // Check for --no-update flag
52
+ if (process.argv.includes('--no-update')) {
53
+ StartCompilerModule();
54
+ return;
55
+ }
61
56
 
62
- CheckModuleUpdates().then(StartCompilerModule)
63
- }
57
+ CheckModuleUpdates().then(StartCompilerModule);
58
+ };
64
59
 
65
- Initialize();
60
+ Initialize();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steambrew/ttc",
3
- "version": "1.4.2",
3
+ "version": "2.4.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -19,8 +19,11 @@
19
19
  "license": "ISC",
20
20
  "description": "A tiny typescript compiler for Millennium plugins.",
21
21
  "dependencies": {
22
+ "@babel/parser": "^7.27.0",
22
23
  "@babel/preset-env": "^7.26.0",
23
24
  "@babel/preset-react": "^7.25.9",
25
+ "@babel/preset-typescript": "^7.27.0",
26
+ "@babel/traverse": "^7.27.0",
24
27
  "@rollup/plugin-babel": "^6.0.4",
25
28
  "@rollup/plugin-commonjs": "^28.0.1",
26
29
  "@rollup/plugin-json": "^6.1.0",
@@ -28,11 +31,23 @@
28
31
  "@rollup/plugin-replace": "^6.0.1",
29
32
  "@rollup/plugin-terser": "^0.4.4",
30
33
  "@rollup/plugin-typescript": "^12.1.1",
34
+ "@rollup/plugin-url": "^8.0.2",
35
+ "@rollup/pluginutils": "^5.1.4",
31
36
  "chalk": "^5.3.0",
32
37
  "dotenv": "^16.4.7",
33
38
  "fs": "^0.0.1-security",
34
- "rollup": "^4.28.0",
39
+ "glob": "^11.0.2",
40
+ "magic-string": "^0.30.17",
41
+ "rollup": "^4.40.0",
35
42
  "rollup-plugin-inject-process-env": "^1.3.1",
43
+ "rollup-plugin-polyfill-node": "^0.13.0",
44
+ "rollup-plugin-scss": "^4.0.1",
45
+ "sass": "^1.87.0",
36
46
  "tslib": "^2.8.1"
47
+ },
48
+ "devDependencies": {
49
+ "@types/babel__traverse": "^7.20.7",
50
+ "@types/glob": "^8.1.0",
51
+ "@types/node": "^22.15.2"
37
52
  }
38
53
  }
package/rollup.config.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import commonjs from '@rollup/plugin-commonjs';
2
2
  import typescript from '@rollup/plugin-typescript';
3
3
  import json from '@rollup/plugin-json';
4
+ import nodeResolve from '@rollup/plugin-node-resolve';
4
5
 
5
6
  export default {
6
7
  input: 'index.ts',
@@ -8,7 +9,7 @@ export default {
8
9
  output: {
9
10
  file: 'dist/index.js',
10
11
  },
11
- plugins: [commonjs(), typescript(), json()],
12
+ plugins: [commonjs(), typescript(), json(), nodeResolve()],
12
13
  external: [
13
14
  'chalk',
14
15
  'path',
@@ -27,5 +28,9 @@ export default {
27
28
  'rollup-plugin-inject-process-env',
28
29
  'dotenv',
29
30
  'perf_hooks',
31
+ '@rollup/pluginutils',
32
+ 'magic-string',
33
+ 'rollup-plugin-scss',
34
+ 'sass',
30
35
  ],
31
36
  };