I have a development project up and running using additional code and files:
myownfunc.js (simple function, not a js module)
and some files and folders:
./src/locales/
./src/assets2/
Everyghing works with % npm start // development mode on macOS within a browser
But when I try to make a deploment with % npm run build
in ./www/ there is not my own JS file and not my own folders and files.
or npm run build-cordova-ios
or npm run cordova-electron
They do run and compile but sure because of my missing files it is not running.
How can I add own files and folders so that it get’s deployed?
I can also run
npm run build-cordova-ios
but the same, my own files in ./src will not get there, so the iOS development files are incomplete.
I have own fonts added like so (seems to get copied to ./www ):
./src/css/my-new-font.ttf
and refered in my-app.css as @font-face {
font-family: ‘My Font’;
src: url(‘my-new-font.ttf’);
}
But any other folders like
./src/assets2/
do not get copied into ./www etc. and also does not get copied to iOS deployment folder
./cordova/platforms/ios/
I did fire up web inspector (Safari) and there it shows:
TypeError: undefined is not an object (evaluating 'n.$el.append')
So not only resource files are missing but JavaScript has CRASHED.
How can I DISABLE this F*cking bundler thing for an existing project at least for the debubbing developent phase ?! I want to see plain text JavaScript.
This vite.config.js thing is someting nobody understands.
@deejay how can I check that? The official documentaiton is very small.
And how can I propperly install V6? I prefere locally, within the project directory, so that it does not get mixed up with other projects.
How can I install using NXP (new this is integrated with npm but how to call nxp within npm?)
No where is a full installation instruction set.
% framework7 create --ui All good, you have latest framework7-cli version. Framework7 project already set up in current directory
% framework7 create --ui
:heavy_check_mark: All good, you have latest framework7-cli version.
:heavy_multiplication_x: Framework7 project already set up in current directory
Ok, but then it’s broken. I did a new project with vite and FONTS are missing, it places it in the wrong directory, etc. is this normal? Without vite package thing also.
(As if I remember right this is BROKEN since version 3? Why these things don’t get fixed?)
./src/fonts/node_modules/framework7-icons/fonts/*.ttf etc.
./src/fonts/node_modules/material-icons/iconfon/*
Can I DISALBE vite compression temporarly within vite settings just for debuggin my app? How?
The question also was HOW can I add my own assets files like local json files and .js with this vite thing? It does not get deployied with
npm run build
./www/
or
npm run build-cordova-ios
So then files are missing and sure will and can not work then.
Thank you very much for your information I will get into that.
Missing fonts problem
I found out that this does not work does not get executed? I can call it manually but then it does not copy the fonts. (As far as I can tell this never worked since 3.x don’t know why. I also needed to copy them manually back then.)
this is exactly (one of) the reason why we are using npm/bundler/etc,
so you don’t need to mess up with ‘those things’ and focus on your part in the project
Fonts not copyied to the right place - Solution found / FIX / macOS
It’s getting executed but it does NOT copy the files (fonts). I can run it manually but nothing happens. So, it’s broken… don’t know why. (macOS. Windows not tested.)
I have to do it (copy files) manally to put them in ./src/fonts folder. (The npm, bundler, things does not work here. Maybe on Windows but not on macOS)
How to debug=?
So the problem is with cpy. cpy on a macOS DOES NOT copy the files within the given target directory instead it will take the source directory structure with it. Which is wrong in this case.
and it will place the required font files in the right place.
Support: I think this needs to be fixed.
% cpy --help
--flat Flatten directory structure.
All copied files will be put in the same directory.
(I also had to install cpy and cpy-cli manually don’t know why, globally, with -g so that the Terminal command line can find it. Don’t know if it’s neede but…)
After that, I think the install process should work out-of-the-box also for macOS.