I'm looking to add omnibox suggestions using flexsearch index which may be exported as files. I saw api for downloading a file, but I'd rather not have to host the index (also I dont want the hustle of copying data to non-user reachable environment). Is there some manifest field to require that json be included in extension bundle and api for reading it?
I've tried simply importing json file from within js and that works. I believe what that means is that exported index would be stored in dist/js bundle.
Related
I want to access a consistent script from HTML that always returns the latest built assets of rollup via vite. I see that one can gain awareness of the file name via manifest.json and but I want to generate a JS file like
import "_main-03d3g4.js"
that I can point a script at and that dynamically updates every build. This is similar to how an index file gets an updated script src in rollup-plugin-generate-html-template
guys
A different question than the others that I used to do here.
My application is a website based on Nuxt/Vuejs (frontend framework), expresse/nodejs for a backend and mongoDB for database NoSQL;
I need to add a space where I can input a file xlsx format in the frontend, make some scripts and modification with the content inside it (with python if it possibly) and then make it available to download a new file xlsx with all the modifications made;
So, someone knows how it is the best way to build it? I need to send the file to the backend, right? Or do I need to send to database to?
I have also the option to add some a backend framework
(django/flask), but I do not know if with nodejs I can solve this problem well.
I am a bit new developping ;)
You can do it all with this xlsx library
You can do it entirely on client side.
Or upload the file to server, do whatever you want (with this library, with python, or anything else), and send back the file when you done.
No database is required.
I'm trying to write a universal React.js application using TypeScript and if possible it would like to somehow annotate certain TypeScript files in such a way that a file is understood to be running inside a browser context or Node.js context explicitly. So that any attempt to use browser APIs from within Node.js environment would fail, and vice versa. How can I do that?
Right now the files reside in the same directory and maybe that the problem because I cannot have multiple tsconfig files but if that is the only solution I guess I have to do it that way.
Each project described by a tsconfig.json file has a single set of visible declarations; there's no way to have different declarations visible in different files in the same project. You can put a <reference> directive in a specific file, but the directive will affect the entire project. So to enforce what you want using the regular type checker, you'll need to use multiple tsconfig.json files. There may be other approaches such as using the tslint "ban" rule to ban all APIs from one environment in a specific file, but I doubt they will be practical.
Im trying to make a plugin for require.js that allows me to call an external api, convert the json response and save it to a file.
Problems:
Im not sure if I am writing the plugin correctly
I cant seem to use node filesystem - though i am using r.js
I am hoping to do this on build, so that the file is ready before concat method happens (putting all files into one)
Is this even possible? Should I use a grunt task instead?
Any pointers or examples or tutorials or anything would be really useful.
In the end I used, https://npmjs.org/package/grunt-curl.
Was alot easier, and just modified the file a bit to wrap the response in define();
It allows the files to be downloaded on build and required later in the app
I see a barebone.jsp file created (I guess by the MinifierFilter) as well as for deploying compressed and cached js. I want to separate development and production cases, and as for development, I just don't want Liferay not only to cache produced javascript file, I don't want to have this generated instance at all.
To be more precise, I want all javascript files to be concatenated on the fly. I always want to have an opportunity to edit any statics files at development and to see results as soon as possible.
What is the easiest way to implement it?
include the settings from portal-developer.properties in your portal-ext.properties. This disables minifiers, caching etc. and you can develop without the problems mentioned. You don't want this setting in production though, as all files will be loaded individually.
(Edit: It might be advisable to include my comment from below in the answer):
You find this file in webapps/ROOT/WEB-INF/classes
All the *.fast.load parameters are for the various minifiers (css, js), but typically you want all of the parameters named in there.