Open filippsen opened 6 years ago
In cases where the browser downloads the file automatically, doing it multiple times creates copies of the same file in the destination directory. While it is possible to sort by date when reading the files at the OS level, a simple improvement would be to suffix the file name with the current date and time. For those with browsers configured to ask where to save the file before downloading, it would also serve as a suggestion.
The following examples shows a naive one-liner changing backend.js
:
downloadProject = (item, keepState) => {
const dateISOString = (new Date).toISOString().replace(/-/g,"").replace(/:/g,"").slice(0,15);
const exportName = 'superblocks_project_' + item.getName() + '_' + dateISOString + '.zip';
. . .
Summary
When clicking the Download DApp button, a version tag, date or time stamp could be suffixed to the resulting file name to differentiate every new download, as a simple versioning system.
Idea
Auto-count version based on every new click to "Download DApp". Like a Release.
Motivation
This addition would result in better organized file names.
From:
superblocks_dapp_<name>
To:superblocks_dapp_<name>_<version>