一覧へ戻る
Vanilla-IceCream/rollup-plugin-asc(新しいタブで開きます)
主要言語: JavaScript
Compile AssemblyScript with Rollup.
- star 数
- 0
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 0
- 最終更新
- 2022/02/16
主要言語: JavaScript
Compile AssemblyScript with Rollup.
Compile AssemblyScript with Rollup.
This plugin requires an LTS Node version (v8.0.0+) and Rollup v1.20.0+.
Using npm:
$ npm i rollup-plugin-asc -D
Using yarn:
$ yarn add rollup-plugin-asc -D
Create a rollup.config.js configuration file and import the plugin:
import path from 'path'; import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import asc from 'rollup-plugin-asc'; const file = '<FILE_NAME>.ts'; export default { input: path.join(__dirname, 'src', file), output: { file: path.join(__dirname, 'dist', file.substring(file.lastIndexOf('.'), 0) + '.js'), format: 'cjs', exports: 'auto', }, external: ['fs', 'path', '@assemblyscript/loader', '@assemblyscript/loader/umd'], plugins: [ resolve(), commonjs(), asc({ output: path.join(__dirname, 'dist') }), ], };
Then call rollup either via the CLI or the API.
Type: string
Default: ''
Example: output: path.join(__dirname, 'dist'),
Type: string[]
Default: []
Example: args: ['--measure'],
The arguments that is passed straight to the AssemblyScript compiler library.
Type: boolean
Default: false
Example: textFile: true,
Type: boolean
Default: false
Example: tsdFile: true,
See the example folder.