add simple readme, edit package.json, change license

This commit is contained in:
DieMyst 2019-04-10 11:24:13 +03:00
parent 0ce4bd8fd9
commit 39ad430d20
3 changed files with 21 additions and 1 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
Script to initialize Fluence project on AssemblyScript.
Run `npx fluencelabs/fl-init` in new project directory.

View File

@ -8,6 +8,23 @@ npx asinit .
rm index.js
rm assembly/index.ts
echo | node <<EOL
const fs = require('fs');
let rawdata = fs.readFileSync('package.json');
let packageJson = JSON.parse(rawdata);
delete packageJson.scripts;
let scripts = {
flbuild: "asc assembly/index.ts -b build/optimized.wasm -t build/optimized.wat --sourceMap --validate --optimize --use abort=''"
};
packageJson.scripts = scripts;
let data = JSON.stringify(packageJson, null, 4);
fs.writeFileSync('package.json', data);
EOL
cat >assembly/index.ts <<EOL
// you can use other allocators like 'buddy' or 'tlsf', but only this can be fully reset
import "allocator/arena";

View File

@ -10,7 +10,7 @@
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/fluencelabs/as-init/issues"
},