rollup

Rollup: bundling/embedding wasm code from an external module

流过昼夜 提交于 2020-07-22 16:59:06
问题 Using rollup, I'm trying to bundle a typescript library that imports and calls an npm module that contains a wasm file. Only the resulting bundle contains no trace of the wasm file contents. How can I force it to bundle the webassembly too ? Here's the key files from what I've tried: // typescript/src/index.ts import * as libEd from "ed25519-raw"; export const seed_from_phrase = libEd.seed_from_phrase; export const gen_keypair = libEd.gen_keypair; My package.json is { "name": "ed25519",

Rollup: bundling/embedding wasm code from an external module

妖精的绣舞 提交于 2020-07-22 16:58:44
问题 Using rollup, I'm trying to bundle a typescript library that imports and calls an npm module that contains a wasm file. Only the resulting bundle contains no trace of the wasm file contents. How can I force it to bundle the webassembly too ? Here's the key files from what I've tried: // typescript/src/index.ts import * as libEd from "ed25519-raw"; export const seed_from_phrase = libEd.seed_from_phrase; export const gen_keypair = libEd.gen_keypair; My package.json is { "name": "ed25519",

Generate typescript definition files using rollup

坚强是说给别人听的谎言 提交于 2020-05-15 07:47:19
问题 I am trying rollup js to build my typescript project but I don't know how to generate the definition files and how to include them automatically in the dist files. Would anyone know how to do it ? Here is my rollup.config.js import typescript from "rollup-plugin-typescript"; import handlebars from "rollup-plugin-handlebars"; import babel from 'rollup-plugin-babel'; export default { entry: 'src/generator.ts', format: 'cjs', plugins: [ typescript(), handlebars(), babel() ], dest: 'dist/bundle

Error resolving module specifier: react while doing dynamic import from API

时光怂恿深爱的人放手 提交于 2020-04-18 06:09:10
问题 I am trying to dynamically import react component library from API. The js file is fetched succesfully. The babel transpilation has happened successfully too. If I dynamically import the Dummy.js file from localhost like import Dummy from './components/js/Dummy.js' , it works. However API import fails with below error. The same error occurs with react lazy too. I basically want to dynamically load the lib and publish events to it. I am newbie to react and front-end development. Please excuse

Get continuous timestamps of given interval in kibana rollup jobs

孤街浪徒 提交于 2020-02-06 10:01:07
问题 I have created a rollup job in Kibana as follows: { "id": "test-job", "index_pattern": "test-index", "rollup_index": "test-rollup", "cron": "0 * * * * ?", "groups": { "date_histogram": { "interval": "1s", "field": "@timestamp", "time_zone": "Asia/Colombo" }, "terms": { "fields": [ "transaction" ] } }, "metrics": [ { "field": "@timestamp", "metrics": [ "value_count" ] } ], "timeout": "20s", "page_size": 1000 } Result is as I expected though it doesn't include time stamps which don't include

Questions about Postgres track_commit_timestamp (pg_xact_commit_timestamp)

拈花ヽ惹草 提交于 2020-01-30 08:57:27
问题 I'm working on a design for a concurrency-safe incremental aggregate rollup system,and track_commit_timestamp (pg_xact_commit_timestamp) sounds perfect. But I've found very little commentary on it generally, and couldn't figure out how it works in detail from the source code. Hopefully, someone knows the answers to one or more of my questions: Is it possible for the commit timestamp feature to produce times out of order? What I'm after is a way to identify records that have been changed since

Angular AoT and Rollup - Error: Runtime compiler is not loaded

拥有回忆 提交于 2020-01-24 14:05:55
问题 I have a been building a dashboard application using Angular for the last 6 months in that time I have had a really nice development workflow using JiT compilation and gulp browser sync to get instant updates when I make changes. Which has worked great. I have come to the point where I am happy to deploy a production version, however, I have run into issues with AoT and rollup. I have followed the angular.io guide but got the following ERROR Error: Uncaught (in promise): Error: Runtime

Oracle SQL - Generate aggregate rows for certain rows using select

断了今生、忘了曾经 提交于 2020-01-15 09:17:08
问题 I have a table like below. |FILE| ID |PARENTID|SHOWCHILD|CAT1|CAT2|CAT3|TOTAL| |F1 | A1 | P1 | N | 3 | 2 | 6 | 11 | |F2 | A2 | P2 | N | 4 | 7 | 3 | 14 | |F3 | A3 | P1 | N | 3 | 1 | 1 | 5 | |F4 | LG1| | Y | 6 | 3 | 7 | 16 | |F5 | LG2| | Y | 4 | 7 | 3 | 14 | Now, Is it possible if I want to find the total (ie) aggregate of cat1, cat2, cat3 & total only for rows which has showChild as 'Y' and add that to the resultset. |Tot| Res | Res | N | 10 | 10 | 10 | 30 | Expected final output: |FILE| ID

How to do Group By Rollup in R? (Like SQL)

爱⌒轻易说出口 提交于 2020-01-10 04:17:06
问题 I have a dataset and I want to perform something like Group By Rollup like we have in SQL for aggregate values. Below is a reproducible example. I know aggregate works really well as explained here but not a satisfactory fit for my case. year<- c('2016','2016','2016','2016','2017','2017','2017','2017') month<- c('1','1','1','1','2','2','2','2') region<- c('east','west','east','west','east','west','east','west') sales<- c(100,200,300,400,200,400,600,800) df<- data.frame(year,month,region,sales

Alias names to with rollup in SQL queries?

為{幸葍}努か 提交于 2020-01-09 11:05:28
问题 I am using with rollup in my sql query. I am not getting alias name for rollup. My SQL is SELECT [Column1], sum([Column2]) FROM Tablea GROUP BY [Column2] WITH ROLLUP Which returns s 8 t 8 j 8 null 24 How can I replace the NULL in the total row? 回答1: You can use the GROUPING function in a CASE expression. SELECT CASE WHEN GROUPING([Column1]) = 1 THEN 'Total' ELSE [Column1] END [Column1], sum([Column2]) FROM Tablea GROUP BY [Column1] WITH ROLLUP SQL Fiddle 回答2: select isnull([column1],'rollup')