In-place JS environment
Summary: This change restructures the package to try to remove the JS build step from the inner loop. Instead, we have a single `src` directory that we babel transform when using, then apply the same transform inline during prepublish. At the end, we will be publishing a source directory with Babel transformed TS, JS, and TS declarations. We do a little spring cleaning when doing this. Fixing up some of the folder/file conventions, and removing the non-export-map fallbacks. We cannot remove the need for a native build. Reviewed By: yungsters Differential Revision: D45682153 fbshipit-source-id: ea2dd75c2dd6e3529b1ef6cf6ac6a64a270049a4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0a6a581936
commit
aa812d0e48
@@ -7,23 +7,23 @@
|
||||
"type": "git",
|
||||
"url": "git@github.com:facebook/yoga.git"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"main": "./src/index.js",
|
||||
"types": "./src/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"browser": "./dist/entrypoint/wasm-async.js",
|
||||
"node": "./dist/entrypoint/wasm-async.js",
|
||||
"default": "./dist/entrypoint/asmjs-async.js"
|
||||
"browser": "./src/entrypoint/wasm-async.js",
|
||||
"node": "./src/entrypoint/wasm-async.js",
|
||||
"default": "./src/entrypoint/asmjs-async.js"
|
||||
},
|
||||
"./sync": {
|
||||
"browser": "./dist/entrypoint/asmjs-sync.js",
|
||||
"node": "./dist/entrypoint/wasm-sync.js",
|
||||
"default": "./dist/entrypoint/asmjs-sync.js"
|
||||
"browser": "./src/entrypoint/asmjs-sync.js",
|
||||
"node": "./src/entrypoint/wasm-sync.js",
|
||||
"default": "./src/entrypoint/asmjs-sync.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/**",
|
||||
"src_js/**"
|
||||
"src/**"
|
||||
],
|
||||
"scripts": {
|
||||
"benchmark": "just benchmark",
|
||||
@@ -31,6 +31,7 @@
|
||||
"clean": "just clean",
|
||||
"lint": "just lint",
|
||||
"lint:fix": "just lint --fix",
|
||||
"prepublish": "just prepublish",
|
||||
"test": "just test",
|
||||
"test:asmjs-async": "just test:asmjs-async",
|
||||
"test:asmjs-sync": "just test:asmjs-sync",
|
||||
|
Reference in New Issue
Block a user