mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 06:21:29 +00:00
Slight restructure
This commit is contained in:
@ -34,10 +34,10 @@ $> cd next
|
|||||||
$> npm install
|
$> npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
Author your module in AssemblyScript ([definitions](./assembly.d.ts), [base config](./assembly.json)) or portable AssemblyScript ([definitions](./portable.d.ts), [base config](./portable.json)) and run:
|
Author your module in AssemblyScript ([definitions](./std/assembly.d.ts), [base config](./std/assembly.json)) or portable AssemblyScript ([definitions](./std/portable.d.ts), [base config](./std/portable.json)) and run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$> node bin\asc yourModule.ts
|
$> node bin/asc yourModule.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
Using the CLI
|
Using the CLI
|
||||||
|
13
package.json
13
package.json
@ -48,20 +48,17 @@
|
|||||||
"test": "npm run test:config --scripts-prepend-node-path && npm run test:parser --scripts-prepend-node-path && npm run test:compiler --scripts-prepend-node-path"
|
"test": "npm run test:config --scripts-prepend-node-path && npm run test:parser --scripts-prepend-node-path && npm run test:compiler --scripts-prepend-node-path"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"assembly.d.ts",
|
"bin/",
|
||||||
"bin/asc.js",
|
"dist/",
|
||||||
"bin/asc.json",
|
|
||||||
"dist/assemblyscript.js",
|
|
||||||
"dist/assemblyscript.js.map",
|
|
||||||
"index.d.ts",
|
"index.d.ts",
|
||||||
"index.js",
|
"index.js",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"NOTICE",
|
"NOTICE",
|
||||||
"package.json",
|
"package.json",
|
||||||
"package-lock.json",
|
"package-lock.json",
|
||||||
"portable-assembly.d.ts",
|
|
||||||
"portable-assembly.js",
|
|
||||||
"README.md",
|
"README.md",
|
||||||
"src"
|
"src/",
|
||||||
|
"std/",
|
||||||
|
"tsconfig-base.json"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require("../../portable");
|
require("../../std/portable");
|
||||||
|
|
||||||
// Copy Binaryen exports to global scope
|
// Copy Binaryen exports to global scope
|
||||||
var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self;
|
var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../portable.json",
|
"extends": "../std/portable.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out",
|
"outDir": "../out",
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
|
2
assembly.d.ts → std/assembly.d.ts
vendored
2
assembly.d.ts → std/assembly.d.ts
vendored
@ -106,8 +106,6 @@ declare function struct(): any;
|
|||||||
|
|
||||||
// Standard library (not yet implemented)
|
// Standard library (not yet implemented)
|
||||||
|
|
||||||
/// <reference path="./std/heap.d.ts" />
|
|
||||||
|
|
||||||
interface Array<T> {}
|
interface Array<T> {}
|
||||||
interface Boolean {}
|
interface Boolean {}
|
||||||
interface Function {}
|
interface Function {}
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig-base.json",
|
"extends": "../tsconfig-base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
"noLib": true,
|
"noLib": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"rootDirs": [
|
"rootDirs": [
|
||||||
"./std/assembly",
|
"./assembly"
|
||||||
"./node_modules"
|
],
|
||||||
]
|
"allowJs": false
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./assembly.d.ts"
|
"./assembly.d.ts"
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../assembly.json",
|
"extends": "../assembly.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"diagnostics": true
|
"diagnostics": true
|
||||||
},
|
},
|
||||||
|
0
portable.d.ts → std/portable.d.ts
vendored
0
portable.d.ts → std/portable.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "./tsconfig-base.json",
|
"extends": "../tsconfig-base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
@ -8,15 +8,14 @@
|
|||||||
"noLib": true,
|
"noLib": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"rootDirs": [
|
"rootDirs": [
|
||||||
"./std/portable",
|
"./portable"
|
||||||
"./node_modules"
|
|
||||||
],
|
],
|
||||||
"allowJs": true
|
"allowJs": true
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./portable.d.ts",
|
"./portable.d.ts",
|
||||||
"./portable.js",
|
"./portable.js",
|
||||||
"./std/portable/heap.d.ts",
|
"./portable/heap.d.ts",
|
||||||
"./std/portable/heap.js"
|
"./portable/heap.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../portable.json",
|
"extends": "../portable.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"diagnostics": true
|
"diagnostics": true
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user