@live-codes/browser-compilers 0.1.0
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/.editorconfig +17 -0
- package/.eslintignore +9 -0
- package/.eslintrc.js +198 -0
- package/.github/workflows/CI.yml +29 -0
- package/.prettierignore +3 -0
- package/.stylelintrc.json +11 -0
- package/CHANGELOG.md +0 -0
- package/LICENSE +21 -0
- package/README.md +10 -0
- package/package.json +90 -0
- package/scripts/vendors.js +308 -0
- package/tsconfig.eslint.json +12 -0
- package/tsconfig.json +49 -0
- package/vendor-licenses.md +71 -0
- package/vendor_modules/imports/autoprefixer.ts +3 -0
- package/vendor_modules/imports/babel-preset-solid.js +2 -0
- package/vendor_modules/imports/less.js +5 -0
- package/vendor_modules/imports/mdx.ts +2 -0
- package/vendor_modules/imports/monaco-editor.ts +1 -0
- package/vendor_modules/imports/postcss-preset-env.ts +3 -0
- package/vendor_modules/imports/postcss.ts +3 -0
- package/vendor_modules/imports/react-native-web.js +32 -0
- package/vendor_modules/imports/typescript.js +1 -0
- package/vendor_modules/imports/wast-refmt.ts +3 -0
- package/vendor_modules/src/asciidoctor.css/asciidoctor.css +407 -0
- package/vendor_modules/src/asciidoctor.css/readme.md +1 -0
- package/vendor_modules/src/clientside-haml-js/haml.js +22 -0
- package/vendor_modules/src/clientside-haml-js/readme.md +4 -0
- package/vendor_modules/src/coffeescript/coffeescript.js +8 -0
- package/vendor_modules/src/coffeescript/readme.md +1 -0
- package/vendor_modules/src/jszip/jszip.js +17 -0
- package/vendor_modules/src/jszip/readme.md +1 -0
- package/vendor_modules/src/livescript/livescript-min.js +1646 -0
- package/vendor_modules/src/livescript/prelude-browser-min.js +18 -0
- package/vendor_modules/src/livescript/readme.md +3 -0
- package/vendor_modules/src/perlito/perlito5.js +30663 -0
- package/vendor_modules/src/perlito/readme.md +1 -0
- package/vendor_modules/src/pug/pug.min.js +104 -0
- package/vendor_modules/src/stylus/stylus.min.js +6 -0
- package/vendor_modules/src/svelte/compiler.js +31611 -0
- package/vendor_modules/src/svelte/readme.md +1 -0
- package/vendor_modules/src/tailwindcss/tailwindcss.js +203 -0
- package/vendor_modules/src/typescript/typescriptServices.js +156785 -0
- package/vendor_modules/types/assemblyscript.d.ts +2304 -0
- package/vendor_modules/types/solid-js.d.ts +4304 -0
- package/vendor_modules/types/stencil-core.d.ts +6040 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_size = 2
|
|
7
|
+
indent_style = space
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
max_line_length = 80
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
|
|
12
|
+
[*.ts]
|
|
13
|
+
quote_type = single
|
|
14
|
+
|
|
15
|
+
[*.md]
|
|
16
|
+
max_line_length = 0
|
|
17
|
+
trim_trailing_whitespace = false
|
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
node: true,
|
|
5
|
+
},
|
|
6
|
+
parser: '@typescript-eslint/parser',
|
|
7
|
+
parserOptions: {
|
|
8
|
+
project: ['./tsconfig.eslint.json'],
|
|
9
|
+
},
|
|
10
|
+
plugins: ['@typescript-eslint', 'jest', 'jsdoc'],
|
|
11
|
+
extends: [
|
|
12
|
+
'plugin:jest/recommended',
|
|
13
|
+
'plugin:import/errors',
|
|
14
|
+
'plugin:import/warnings',
|
|
15
|
+
'plugin:import/typescript',
|
|
16
|
+
'prettier',
|
|
17
|
+
'prettier/@typescript-eslint',
|
|
18
|
+
],
|
|
19
|
+
rules: {
|
|
20
|
+
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
21
|
+
'@typescript-eslint/array-type': [
|
|
22
|
+
'error',
|
|
23
|
+
{
|
|
24
|
+
default: 'array-simple',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
'@typescript-eslint/ban-types': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
types: {
|
|
31
|
+
Object: {
|
|
32
|
+
message: 'Avoid using the `Object` type. Did you mean `object`?',
|
|
33
|
+
},
|
|
34
|
+
Function: {
|
|
35
|
+
message:
|
|
36
|
+
'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.',
|
|
37
|
+
},
|
|
38
|
+
Boolean: {
|
|
39
|
+
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
|
|
40
|
+
},
|
|
41
|
+
Number: {
|
|
42
|
+
message: 'Avoid using the `Number` type. Did you mean `number`?',
|
|
43
|
+
},
|
|
44
|
+
String: {
|
|
45
|
+
message: 'Avoid using the `String` type. Did you mean `string`?',
|
|
46
|
+
},
|
|
47
|
+
Symbol: {
|
|
48
|
+
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
54
|
+
'@typescript-eslint/consistent-type-definitions': 'error',
|
|
55
|
+
'@typescript-eslint/dot-notation': 'error',
|
|
56
|
+
'@typescript-eslint/explicit-member-accessibility': [
|
|
57
|
+
'error',
|
|
58
|
+
{
|
|
59
|
+
accessibility: 'explicit',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
'@typescript-eslint/indent': 'off',
|
|
63
|
+
'@typescript-eslint/member-delimiter-style': [
|
|
64
|
+
'off',
|
|
65
|
+
{
|
|
66
|
+
multiline: {
|
|
67
|
+
delimiter: 'none',
|
|
68
|
+
requireLast: true,
|
|
69
|
+
},
|
|
70
|
+
singleline: {
|
|
71
|
+
delimiter: 'semi',
|
|
72
|
+
requireLast: false,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
'@typescript-eslint/member-ordering': 'error',
|
|
77
|
+
'@typescript-eslint/no-empty-function': 'error',
|
|
78
|
+
'@typescript-eslint/no-empty-interface': 'error',
|
|
79
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
80
|
+
'@typescript-eslint/no-misused-new': 'error',
|
|
81
|
+
'@typescript-eslint/no-namespace': 'error',
|
|
82
|
+
'@typescript-eslint/no-parameter-properties': 'off',
|
|
83
|
+
'@typescript-eslint/no-this-alias': 'error',
|
|
84
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
85
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
86
|
+
'@typescript-eslint/no-var-requires': 'error',
|
|
87
|
+
'@typescript-eslint/prefer-for-of': 'error',
|
|
88
|
+
'@typescript-eslint/prefer-function-type': 'error',
|
|
89
|
+
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
|
90
|
+
'@typescript-eslint/quotes': 'off',
|
|
91
|
+
'@typescript-eslint/semi': ['off', null],
|
|
92
|
+
'@typescript-eslint/triple-slash-reference': [
|
|
93
|
+
'error',
|
|
94
|
+
{
|
|
95
|
+
path: 'always',
|
|
96
|
+
types: 'prefer-import',
|
|
97
|
+
lib: 'always',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
'@typescript-eslint/type-annotation-spacing': 'off',
|
|
101
|
+
'@typescript-eslint/unified-signatures': 'error',
|
|
102
|
+
'arrow-body-style': 'error',
|
|
103
|
+
'arrow-parens': ['off', 'always'],
|
|
104
|
+
'brace-style': ['off', 'off'],
|
|
105
|
+
camelcase: 'error',
|
|
106
|
+
'comma-dangle': 'off',
|
|
107
|
+
complexity: 'off',
|
|
108
|
+
'constructor-super': 'error',
|
|
109
|
+
curly: ['error', 'multi-line'],
|
|
110
|
+
'eol-last': 'off',
|
|
111
|
+
eqeqeq: ['error', 'smart'],
|
|
112
|
+
'guard-for-in': 'error',
|
|
113
|
+
'id-blacklist': [
|
|
114
|
+
'error',
|
|
115
|
+
'any',
|
|
116
|
+
'Number',
|
|
117
|
+
'number',
|
|
118
|
+
'String',
|
|
119
|
+
'string',
|
|
120
|
+
'Boolean',
|
|
121
|
+
'boolean',
|
|
122
|
+
'Undefined',
|
|
123
|
+
'undefined',
|
|
124
|
+
],
|
|
125
|
+
'id-match': 'error',
|
|
126
|
+
'import/no-extraneous-dependencies': [
|
|
127
|
+
'error',
|
|
128
|
+
{
|
|
129
|
+
devDependencies: false,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
'import/no-internal-modules': 'error',
|
|
133
|
+
'import/order': 'error',
|
|
134
|
+
'import/named': 'off',
|
|
135
|
+
'jsdoc/check-alignment': 'error',
|
|
136
|
+
'jsdoc/check-indentation': 'error',
|
|
137
|
+
'jsdoc/newline-after-description': 'error',
|
|
138
|
+
'linebreak-style': 'off',
|
|
139
|
+
'max-classes-per-file': ['error', 1],
|
|
140
|
+
'max-len': 'off',
|
|
141
|
+
'new-parens': 'off',
|
|
142
|
+
'newline-per-chained-call': 'off',
|
|
143
|
+
'no-bitwise': 'error',
|
|
144
|
+
'no-caller': 'error',
|
|
145
|
+
'no-cond-assign': 'error',
|
|
146
|
+
'no-console': 'error',
|
|
147
|
+
'no-debugger': 'error',
|
|
148
|
+
'no-duplicate-case': 'error',
|
|
149
|
+
'no-duplicate-imports': 'error',
|
|
150
|
+
'no-empty': 'error',
|
|
151
|
+
'no-eval': 'error',
|
|
152
|
+
'no-extra-bind': 'error',
|
|
153
|
+
'no-extra-semi': 'off',
|
|
154
|
+
'no-fallthrough': 'off',
|
|
155
|
+
'no-invalid-this': 'off',
|
|
156
|
+
'no-irregular-whitespace': 'off',
|
|
157
|
+
'no-multiple-empty-lines': 'off',
|
|
158
|
+
'no-new-func': 'error',
|
|
159
|
+
'no-new-wrappers': 'error',
|
|
160
|
+
'no-redeclare': 'error',
|
|
161
|
+
'no-restricted-imports': ['error', { patterns: ['**/_modules'] }],
|
|
162
|
+
'no-return-await': 'error',
|
|
163
|
+
'no-sequences': 'error',
|
|
164
|
+
'no-shadow': [
|
|
165
|
+
'off',
|
|
166
|
+
{
|
|
167
|
+
hoist: 'all',
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
'no-sparse-arrays': 'error',
|
|
171
|
+
'no-template-curly-in-string': 'error',
|
|
172
|
+
'no-throw-literal': 'error',
|
|
173
|
+
'no-trailing-spaces': 'off',
|
|
174
|
+
'no-undef-init': 'error',
|
|
175
|
+
'no-underscore-dangle': 'error',
|
|
176
|
+
'no-unsafe-finally': 'error',
|
|
177
|
+
'no-unused-labels': 'error',
|
|
178
|
+
'no-var': 'error',
|
|
179
|
+
'object-shorthand': 'error',
|
|
180
|
+
'one-var': ['error', 'never'],
|
|
181
|
+
'prefer-arrow/prefer-arrow-functions': 'off',
|
|
182
|
+
'prefer-const': 'error',
|
|
183
|
+
'prefer-object-spread': 'error',
|
|
184
|
+
'quote-props': 'off',
|
|
185
|
+
radix: 'error',
|
|
186
|
+
'space-before-function-paren': 'off',
|
|
187
|
+
'space-in-parens': ['off', 'never'],
|
|
188
|
+
'spaced-comment': [
|
|
189
|
+
'error',
|
|
190
|
+
'always',
|
|
191
|
+
{
|
|
192
|
+
markers: ['/'],
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
'use-isnan': 'error',
|
|
196
|
+
'valid-typeof': 'off',
|
|
197
|
+
},
|
|
198
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
|
|
9
|
+
strategy:
|
|
10
|
+
matrix:
|
|
11
|
+
node-version: [14.x]
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
NODE_OPTIONS: '--max_old_space_size=4096'
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v2
|
|
19
|
+
|
|
20
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
21
|
+
uses: actions/setup-node@v1
|
|
22
|
+
with:
|
|
23
|
+
node-version: ${{ matrix.node-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: npm ci
|
|
27
|
+
|
|
28
|
+
- name: Build
|
|
29
|
+
run: npm run build
|
package/.prettierignore
ADDED
package/CHANGELOG.md
ADDED
|
File without changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Hatem Hosny
|
|
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,10 @@
|
|
|
1
|
+
# Browser Compilers
|
|
2
|
+
|
|
3
|
+
Compilers that run in the browser.
|
|
4
|
+
|
|
5
|
+
For use in [LiveCodes](https://github.com/live-codes/livecodes).
|
|
6
|
+
|
|
7
|
+
## License
|
|
8
|
+
|
|
9
|
+
The code for building and bundling the packages is licensed under [MIT License](./LICENSE).
|
|
10
|
+
Third party licenses are [listed here](./vendor-licenses.md).
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@live-codes/browser-compilers",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Compilers that run in the browser",
|
|
5
|
+
"author": "Hatem Hosny",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [],
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/live-codes/browser-compilers"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"start": "live-server dist --cors",
|
|
13
|
+
"build": "run-s clean build:vendors copy:types",
|
|
14
|
+
"build:vendors": "node ./scripts/vendors.js",
|
|
15
|
+
"copy:types": "recursive-copy vendor_modules/types dist/types",
|
|
16
|
+
"gh-pages": "gh-pages -m \"[ci skip] Updates\" -d dist",
|
|
17
|
+
"fix": "run-s fix:*",
|
|
18
|
+
"fix:prettier": "prettier src --ignore-path .eslintignore --write",
|
|
19
|
+
"fix:eslint": "eslint --fix --ext js,jsx,ts,tsx .",
|
|
20
|
+
"lint:prettier": "prettier src --ignore-path .eslintignore --list-different",
|
|
21
|
+
"lint:eslint": "eslint --ext js,jsx,ts,tsx . ",
|
|
22
|
+
"release": "standard-version",
|
|
23
|
+
"prepare-release": "run-s reset build test cov release",
|
|
24
|
+
"reset": "git clean -dfx && git reset --hard && npm i",
|
|
25
|
+
"clean": "recursive-delete dist",
|
|
26
|
+
"prepush": "run-s fix build"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@babel/standalone": "7.13.15",
|
|
30
|
+
"@esbuild-plugins/node-globals-polyfill": "0.1.0",
|
|
31
|
+
"@esbuild-plugins/node-modules-polyfill": "0.1.1",
|
|
32
|
+
"@mdx-js/mdx": "1.6.22",
|
|
33
|
+
"@prettier/plugin-pug": "1.13.2",
|
|
34
|
+
"@webassemblyjs/wast-refmt": "1.11.1",
|
|
35
|
+
"asciidoctor": "2.2.1",
|
|
36
|
+
"babel-preset-solid": "1.0.0",
|
|
37
|
+
"es-module-shims": "0.10.5",
|
|
38
|
+
"github-markdown-css": "4.0.0",
|
|
39
|
+
"less": "4.0.0",
|
|
40
|
+
"marked": "2.0.3",
|
|
41
|
+
"monaco-editor": "0.27.0",
|
|
42
|
+
"normalize.css": "8.0.1",
|
|
43
|
+
"postcss": "8.2.15",
|
|
44
|
+
"postcss-preset-env": "6.7.0",
|
|
45
|
+
"prettier": "2.2.1",
|
|
46
|
+
"react": "17.0.2",
|
|
47
|
+
"react-dom": "17.0.2",
|
|
48
|
+
"react-native-web": "0.17.1",
|
|
49
|
+
"reset-css": "5.0.1",
|
|
50
|
+
"sass.js": "0.11.1",
|
|
51
|
+
"tailwindcss-browser-plugin": "0.2.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/live-server": "1.2.0",
|
|
55
|
+
"@types/node": "14.0.4",
|
|
56
|
+
"@types/prettier": "2.1.6",
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "4.8.2",
|
|
58
|
+
"@typescript-eslint/parser": "4.8.2",
|
|
59
|
+
"autoprefixer": "10.1.0",
|
|
60
|
+
"cz-conventional-changelog": "3.2.0",
|
|
61
|
+
"esbuild": "0.11.12",
|
|
62
|
+
"esbuild-plugin-replace": "1.0.6",
|
|
63
|
+
"eslint": "7.32.0",
|
|
64
|
+
"eslint-config-prettier": "6.11.0",
|
|
65
|
+
"eslint-plugin-import": "2.20.2",
|
|
66
|
+
"eslint-plugin-jest": "23.13.1",
|
|
67
|
+
"eslint-plugin-jsdoc": "25.4.2",
|
|
68
|
+
"eslint-plugin-prefer-arrow": "1.2.1",
|
|
69
|
+
"gh-pages": "2.2.0",
|
|
70
|
+
"live-server": "1.2.1",
|
|
71
|
+
"mkdirp": "1.0.4",
|
|
72
|
+
"npm-run-all": "4.1.5",
|
|
73
|
+
"parcel-bundler": "1.12.4",
|
|
74
|
+
"postcss-cli": "8.3.1",
|
|
75
|
+
"recursive-fs": "2.1.0",
|
|
76
|
+
"standard-version": "9.3.0",
|
|
77
|
+
"typescript": "4.4.3"
|
|
78
|
+
},
|
|
79
|
+
"config": {
|
|
80
|
+
"commitizen": {
|
|
81
|
+
"path": "cz-conventional-changelog"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"prettier": {
|
|
85
|
+
"semi": true,
|
|
86
|
+
"singleQuote": true,
|
|
87
|
+
"trailingComma": "all",
|
|
88
|
+
"printWidth": 100
|
|
89
|
+
}
|
|
90
|
+
}
|