Hi, Thanks for a great framework. I have a simple question. How or is it possible to get the framework7 version number from javascript?
We have external code that runs with v5 and v7, and it would be nice to have this info
you can extract f7-version (or any other deps) from package.json
import info from '/path/to/package.json';
[info].forEach(i => {
console.log('name =>',i.name);
console.log('version =>',i.version);
Object.entries(i.dependencies).forEach(([k, v]) =>
console.log(k,'=>',v)
);
Object.entries(i.devDependencies).forEach(([k, v]) =>
console.log(k,'=>',v)
);
});
There is no info about F7 on package.json
here is my (reduce) package.json:
{
"name": "my-app",
"version": "1.0.0",
"dependencies": {
"dom7": "^4.0.4",
"framework7": "^7.0.8",
"skeleton-elements": "^4.0.1",
"swiper": "^8.4.4"
},
"devDependencies": {
"cross-env": "^7.0.3",
"postcss-preset-env": "^7.8.2",
"rollup-plugin-framework7": "^1.2.1",
"vite": "^3.1.7"
}
}
import info from '/path/to/package.json';
console.log('f7Version =>',info.dependencies.framework7);
//output => 'f7Version => ^7.0.8'