0.1.28 • Published 6 months ago

@3-/coffee_plus v0.1.28

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
6 months ago

@3-/coffee_plus

test/main.coffee :

#!/usr/bin/env coffee
import TEST from './code.js'
import CoffeeScript from "coffeescript"
import hack from '@3-/coffee_plus'
hack CoffeeScript

for [kind, code] from Object.entries(TEST)
  #if kind != 'export'
  #  continue
  console.log """## #{kind}

#{code}`

#{CoffeeScript.compile(code, bare:true)}```"""

output :

## label

y = 0

:$ x=y*2

:$ if y>2 then x+=y else x-=y

:$ if x > y x = y/2 else x = y+9 x += 1

:$ func = => 1

:$ func = -> 1 2

do => :out for i in 1,2,3 for j in 4,5,6 console.log i,j if i > 1 break out return

var func, x, y;

y = 0;

$ : x = y * 2;

$ : y > 2 ? x += y : x -= y;

$ : { if (x > y) { x = y / 2; } else { x = y + 9; } x += 1; }

$ : (func = () => { return 1; });

$ : (func = function() { 1; return 2; });

(() => { var i, j, k, l, len, len1, ref, ref1; out : { ref = 1, 2, 3; for (k = 0, len = ref.length; k < len; k++) { i = refk; ref1 = 4, 5, 6; for (l = 0, len1 = ref1.length; l < len1; l++) { j = ref1l; console.log(i, j); if (i > 1) { break out; } } } } })();

## var

do =>

  • a,b

(() => { var a, b; })();

## import

fs1 path0

console.log 1

fs/promises fs/promises:fs fs2 fs: bun:sqlite:sqlite path1 test.css path3 > join dirname1 path4:@ > join3 path9:Path9 > join2 path5.js:@ > join1 base-x:BaseX base-y

xxx

base-z # xxx path5:p5 > join:J1 dirname2 fs3 path5:p6 > join:J dirname LIB_INDEX str2li node:util node:util > promiseify xx > bb$ x1 ./git > ROOT HOME STATIC ./lib/byTag.js:@ > byElem

import fs1 from 'fs1';

import path0 from 'path0';

console.log(1);

import promises from 'fs/promises';

import fs from 'fs/promises';

import fs2 from 'fs2';

import 'fs';

import sqlite from 'bun:sqlite';

import path1 from 'path1';

import 'test.css';

import { join, dirname1 } from 'path3';

import path4 from 'path4';

import { join3 } from 'path4';

import Path9 from 'path9';

import { join2 } from 'path9';

import path5 from 'path5.js';

import { join1 } from 'path5.js';

import BaseX from 'base-x';

import BaseY from 'base-y';

import BaseZ from 'base-z';

import p5 from 'path5';

import { join as J1, dirname2 } from 'path5';

import fs3 from 'fs3';

import p6 from 'path5';

import { join as J, dirname, LIB_INDEX } from 'path5';

import str2li from 'str2li';

import util from 'node:util';

import { promiseify } from 'node';

import { bb$, x1 } from 'xx';

import { ROOT, HOME, STATIC } from './git';

import byTag from './lib/byTag.js';

import { byElem } from './lib/byTag.js';

## export

< x < x = 1

< b=(a,b=1)=> a+b

< => a+b

< { C:1 } < {}

< xxx = -> 1+2

< class Test @(a,b,c)-> < class Test2 @-> < 1

export var x;

export var x = 1;

export const b = (a, b = 1) => { return a + b; };

export default () => { return a + b; };

export default { C: 1 };

export default {};

export var xxx = function() { return 1 + 2; };

export var Test = class Test { constructor(a, b, c) {}

};

export var Test2 = class Test2 { constructor() {}

};

export default 1;

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

0.1.10

1 year ago

0.1.11

1 year ago

0.1.12

1 year ago

0.1.13

1 year ago

0.1.14

1 year ago

0.1.15

1 year ago

0.1.27

6 months ago

0.1.28

6 months ago

0.1.20

11 months ago

0.1.21

11 months ago

0.1.22

11 months ago

0.1.23

11 months ago

0.1.24

10 months ago

0.1.25

10 months ago

0.1.26

10 months ago

0.1.16

11 months ago

0.1.17

11 months ago

0.1.7

1 year ago

0.1.18

11 months ago

0.1.19

11 months ago

0.1.9

1 year ago

0.1.4

1 year ago

0.1.6

1 year ago

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago