šŸ›  New framework7-cli feedback needed

ok auto reply :sweat_smile: :

with this options install could be done :
ā€“unsafe-perm=true --allow-root

2 Likes

I had the same problem in Linux with the node package of my distro. My solution was to uninstall and use it ā€œportableā€ with the official node web package. Surely this works with the package of my distro, thanks for the contribution.

Hey guys, it is out of beta, so use official CLI docs at https://framework7.io/cli/

1 Like

The new website is great!, I like it.

in case youā€™re interested in knowing, If I do not clean the cache, the site looks bad.

image

with private browsing it looks perfect, I did not clear the cache if you want to do something about it and want some testing

1 Like

Thanks, yeah, I know, already invalidated caches on CDNs but canā€™t affect userā€™s browser cache, so will be an issue for a while

Hi, I try stable one but I need the same option to install it.

Issue can be with your initial node/npm system installation, probably you originally installed with wrong rights

Please help me, I have this error when iā€™m installing framework-cli

=======================================================

C:\Windows\System32>npm install -g framework7-cli
C:\Users\ASY\AppData\Roaming\npm\framework7 -> C:\Users\ASY\AppData\Roaming\npm\node_modules\framework7-cli\index.js

[email protected] install C:\Users\ASY\AppData\Roaming\npm\node_modules\framework7-cli\node_modules\sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.0/libvips-8.7.0-win32-x64.tar.gz
C:\Users\ASY\AppData\Roaming\npm\node_modules\framework7-cli\node_modules\sharp\install\libvips.js:78
throw err;
^

Error: getaddrinfo ENOTFOUND github.com github.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:58:26)

C:\Users\ASY\AppData\Roaming\npm\node_modules\framework7-cli\node_modules\sharp>if not defined npm_config_node_gyp (node ā€œC:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\ā€¦\node_modules\node-gyp\bin\node-gyp.jsā€ rebuild ) else (node ā€œC:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.jsā€ rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Canā€™t find Python executable ā€œC:\Users\ASY\AppData\Local\Programs\Python\Python37ā€, you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:509:16)
gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:282:31
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:159:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command ā€œC:\Program Files\nodejs\node.exeā€ ā€œC:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.jsā€ ā€œrebuildā€
gyp ERR! cwd C:\Users\ASY\AppData\Roaming\npm\node_modules\framework7-cli\node_modules\sharp
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ASY\AppData\Roaming\npm-cache_logs\2019-02-09T05_19_07_668Z-debug.log

=======================================================

I have only done a little modification to the css/app.css and js/app.js on a newly installed V4, but when I run ā€œbuild-prodā€ I got the errors below. I added an image folder, size is 292 kb, is this considered big? BTW, I installed PWA Cordova, split view, webpack, css.

Hi,
Congratulation on release of v4.

In most of my projects I used caiobiodere/cordova-template-framework7-vue-webpack
cordova run browser ā€“ --lr
cordova run android ā€“ --lr
were my two favorite commands. How to achieve it using framework7-cli

Thanks in advance.

Regards

It is not the error, just a warning, just ignore it

1 Like

Just A Suggestion

In all honesty, I really think the official framework7 templates can now be dropped in favour of framework7-cli. I really think that is the best practiceā€¦ This will enforce usage of the CLI and reduce on the number of questions and challenges that come with just starting from the templates. Myself, when I used the CLI, It sort of helped me set a better project up than when I had just used the template. Plus, I donā€™t have to keep cdā€™ing into the cordova folder every now and again. Things like building an app then copying the contents to cordova www folder are dealt with for you already.

P.S.

I noticed that using

framework7 cordova plugin add ..... [--variable, --save, etc], such flags are not recognised by the CLI. I have to cd into the cordova folder myself and do it from there. Other than that, It is the best!

1 Like

I was thinking about that too. But I also think there is some room for improvement to make it more flexible (e.g. generate PWA assets, exclude fonts, exclude bundler, generate development-files (not virtual, but an uncompressed non-minified version), include external .js (library)-files, etcā€¦).

While in UI, performance and detail, F7 is the next best thing beside sliced bread on the planet, tooling is unfortunately behind (especially if compared to ionic).

2 Likes

Hey guys!

@Max try to bypass arguments with double dash operator, e.g.:

framework7 cordova plugin add -- --variable FOO=bar

@tiptronic i absolutely donā€™t mind about improve CLI, can you elaborate the points you have mentioned? What do you mean exactly mean and how do you see them to work?

After large 4.2.0 release with Aurora, i am going to get my hands back to CLI and add all necessary features. Even further i am thinking about to pack it into Electron app in addition to CLI interface, to make it more user friendly and to resolve all the issues that most have with installing it from npm

2 Likes

The UI option will be such a cool addition! While I am comfortable with CLI myself, I cant wait to use the UI counterpart. Thanks @nolimits4web.

Installing problems with npm is not due to Framework7. I like the current UI installation very much and packing in Electron makes it easier for sure, however I am comfortable with CLI myself. Thanks @nolimits4web

Hi @nolimits4web,
Iā€™m currently on travel, but will give some feedback in the next couple of days

1 Like

Hi @nolimits4web

as promised hereā€™s a short summary of things which came to mind when playing with f7cli:

General:

  • option to include/exclude fonts.
  • option to embed (other) fonts
  • option to pre-select ā€˜dark-themeā€™
  • option to create a minimal PWA (no fonts, no extensions, just core -> as small as possible)
  • option to not-create compiler - ā€˜.mapā€™ files to save space
    If you create a simple web-app (single-view, no bundler), we need a script to compile a production folder with minimal contents.
    Right now this is a manual process, by removing everything not needed (otherwise the www-folder has close to 7MB!)
    Note: For PWA I mostly use system-fonts and SVG icons, so the redundant fonts are not needed anyway.

Same thing, if you create a simple webapp (or PWA) with bundler. Fonts, map-files, etcā€¦ add approx. 3MB to the overall file-size.
Just as a side-note: I played a little (amongst others) with Googleā€™s PWACompat, and was able to get a nicely working PWA in < 100kB. (ok didnā€™t look as nice as with F7, but anyway ;))

PWA:

  • option to embed external resources (e.g. somefolder/*.png) to the PWA manifest (for dynamically used assets).
  • right now, all assets from ā€˜./assets/ā€™ go into ā€˜./images/ā€™ of the compiled product. Canā€™t we just keep the folder-name ā€˜assetsā€™ or ā€˜imagesā€™, so the dev-folder reflects the structure?
  • option to create splash-screen from an ā€˜Universal.pngā€™

Optimize caching/use pre-build framework:

  • Right now the situation is like this:
  • running npm build-prod takes ages
    it would be really great, if we could specify a certain build, so re-creating a build is getting faster (right now this is a manual process, but would be very comfortable to have this on project creation)

Colors:

  • the body color in a build pwa is always: background:#fff. It would be nice to allow for a fixed body-color on project-creation.

Build:

  • also allow debug-build
    additionally to npm run build-prod it would be great to have a npm run build-dev. This would be helpful to quickly move (or send out) compiled projects for testing.

Cordova:

  • add scripts to create iOS and Android separately (for Cordova projects)
    npm run build-iOS
    npm run build-Android
    npm run build-browser

  • option to pre-define settings and plugins to be installed

  • option to allow for ā€˜templatesā€™; that means, I can re-create a project with pre-configured settings and plugins -> this would also be nice for other projects as well.
    That way we could add our favorite project setup as a ā€˜templateā€™ to choose from. (this would also be a nice addition to call from the cli: framework7 create -fromTemplate 'mytemplate')

Bundler:

  • Right now it is mandatory to use a bundler for anything else than ā€˜simple web-appā€™ just using F7-core.
    It would be benefical to allow creation of any project (e.g. F7Vue) without the need of using a bundler. This would speed up things e.g. for creating a quick test or prototype.
    -> I am aware of the fact that you loose lots of options (e.g. single-file-components)), but for quite some projects this would be perfectly ok. Currently this is a manual process (and not a big deal), but it would be nice to have this option.

Aliases:

This is just something you could mention in your ā€˜readmeā€™:
Just for convenience, I added a couple of aliasses to my ā€˜~./bash_profileā€™
e.g.:

alias f7="framework7"

which makes calling the framework7-cli much more concise:
instead:
framewok7 create --ui
just:
f7 create --ui

or (even) instead:
framework7 create --ui
just:
f7ui

(if you spin that idea further - e.g. when using templates - you could quick setup a project with f7 -t 'mytemplate')

If you need more input, just drop me a note (or leave a reply here).

andy

Awesome! Thanks for such a detailed feedback :+1: Will get to work on CLI after 4.2 release

1 Like