Open timwienk opened 10 years ago
big :+1:
I would like to help out here.
I made this (449a29bdab67b6252ce72bc221e8b707cea60e82) which redirects old hash URLs to the builder and populates the checkboxes. From there is just to press the button.
Works also for eventually new hash urls like core/builder/hash
This does not have a database implemented and imported, just a test dummy here would need to be upgraded.
Made a live demo here which redirects from a old-style link core/hash
(the first on @timwienk example) and is download-able.
If its usefull the commit could be used maybe.
That's a good start.
I think we can just route /core/:hash
, instead of a regex, though. As long as it's as last route.
For the hashes we need to be able to both load and save them. So it may be a good idea to put that in a separate module. I put an untested example on top of your commit (https://github.com/timwienk/mootools-website/commit/8463fa0d), feel free to pull that onto yours if you want to use it.
I don't expect that to work like that (for one the sqlite3
and md5
packages will need to be added from npm), but how this would work:
var builderHash = require('middleware/builderHash')({
core: '/srv/mootools/core/database/packager.sqlite',
more: '/srv/mootools/more/database/packager.sqlite'
});
builderHash.load('core', 'e8f3003df2d0919c1091b11854a53e9b', function(data){
if (data){
console.log(data.hash, data.packages);
} else {
console.log('Hash not found.');
}
});
builderHash.save('core', ['Core/Class'], function(data){
if (data){
console.log(data.hash, data.packages);
} else {
console.log('Hash not saved.');
}
});
The paths should probably be set in some kind of configuration.
Nice! Will continue on it tonight. (if any other wants to back this would be cool)
It might be worth checking if #171 can be resolved together with this issue, since the component selection code needs to be touched anyway.
There is no graphical interface in the builder to enter hashes yet.
If the feature is re-added, it would be preferable if this database can be re-used. The desired way of working would be to enter the hash to select the components in the builder, then be able to click "download".
To illustrate, the builder "header" from the old website:
Hashes are not exported in the build when Download minified source code is checked. Unfortunately I didn't notice earlier, and now that I need an additional module, I have to guess what modules I chose before :neutral_face:
@lorenzos sorry for you, thanks for reporting. We just pushed a fix for that https://github.com/mootools/website/commit/6b954488e3a6b21ca655488a40288fbdc381c89c
Great 😉 Thank you
In the previous version of the website, one could use a generated hash to quickly (re-)select the parts/components/packages they want in their build of Core or More. Additionally, the hash was added to the built files. This functionality is not present in the new builder.
It worked through an sqlite3 database with a "hashes" table containing three columns:
The package-string is a semicolon separated list of components. In case anyone is interested:
2010-10-02 12:29:50 UTC
.2014-11-03 21:12:00 UTC
.If the feature is re-added, it would be preferable if this database can be re-used. The desired way of working would be to enter the hash to select the components in the builder, then be able to click "download".
Additionally, paths like
http://mootools.net/more/<hash>
used to select the right components automatically, that should probably work again as well (and/or redirect tohttp://mootools.net/more/builder/<hash>
).Example rows below (columns separated by pipes):