Updates for release v0.07-beta

gh-pages
Hauke D 7 years ago
parent 284ebda8bb
commit 6d4e8409ae

@ -33,7 +33,7 @@ js('document')->getElementById('my_button')
</script> </script>
``` ```
- [**Download `webperl_prebuilt_v0.05-beta.zip`**](https://github.com/haukex/webperl/releases/download/v0.05-beta/webperl_prebuilt_v0.05-beta.zip) - [**Download `webperl_prebuilt_v0.07-beta.zip`**](https://github.com/haukex/webperl/releases/download/v0.07-beta/webperl_prebuilt_v0.07-beta.zip)
- [**Get the sources on GitHub**](https://github.com/haukex/webperl) - [**Get the sources on GitHub**](https://github.com/haukex/webperl)
For a web application written with WebPerl, see the For a web application written with WebPerl, see the
@ -49,9 +49,9 @@ Quick Start
- In a shell: - In a shell:
$ wget https://github.com/haukex/webperl/releases/download/v0.05-beta/webperl_prebuilt_v0.05-beta.zip $ wget https://github.com/haukex/webperl/releases/download/v0.07-beta/webperl_prebuilt_v0.07-beta.zip
$ unzip webperl_prebuilt_v0.05-beta.zip $ unzip webperl_prebuilt_v0.07-beta.zip
$ cd webperl_prebuilt_v0.05-beta $ cd webperl_prebuilt_v0.07-beta
$ plackup webperl.psgi $ plackup webperl.psgi
HTTP::Server::PSGI: Accepting connections at http://0:5000/ HTTP::Server::PSGI: Accepting connections at http://0:5000/

@ -54,15 +54,16 @@ Release Checklist
- Update `Changes.md` with all changes since last release - Update `Changes.md` with all changes since last release
As an example, to list changes between `v0.03-beta` and `v0.05-beta`, excluding the regex tester: As an example, to list changes since a specific version, excluding the regex tester:
$ git log --stat v0.03-beta..v0.05-beta -- . ':!web/regex_demo.html' ':!web/regex_tester.html' ':!.gitignore' $ git log --stat v0.05-beta.. -- . ':!web/regex_tester.html' ':!.gitignore'
- Also make sure that the documentation in `using.md` etc. mentions when features were added/deprecated - Also make sure that the documentation in `using.md` etc. mentions when features were added/deprecated
- Update version numbers everywhere; use `grep` to find them, for example: - Update version numbers everywhere; use `grep` to find them, for example:
$ grep -Er --exclude-dir=work --exclude-dir=.git --exclude-dir=emperl5 --exclude=emperl.* '0\.0[0-9]' * emperl5/ext/WebPerl emperl5/hints/emscripten.sh $ grep -Er --exclude-dir=work --exclude-dir=.git --exclude-dir=emperl5 --exclude=emperl.* '0\.0[0-9]' .
$ ( cd emperl5; grep -Er '0\.0[0-9]' `git diff --numstat --diff-filter=A v5.28.0 HEAD | cut -f3` )
At a minimum there is: At a minimum there is:
- `web/webperl.js` - `Perl.WebPerlVersion` - `web/webperl.js` - `Perl.WebPerlVersion`
@ -74,23 +75,23 @@ Release Checklist
$ perl -wMstrict -MDigest -le 'open my $fh, "<:raw", "web/webperl.js" or die $!; $ perl -wMstrict -MDigest -le 'open my $fh, "<:raw", "web/webperl.js" or die $!;
print Digest->new("SHA-256")->addfile($fh)->b64digest' print Digest->new("SHA-256")->addfile($fh)->b64digest'
- Build and create dist, e.g. `build/build.pl --reconfig --dist=webperl_prebuilt_v0.05-beta` - Build and create dist, e.g. `build/build.pl --reconfig --dist=webperl_prebuilt_v0.07-beta`
- Test all build results, both from file:// and http://localhost - Test all build results, both from `file://...` and `http://localhost`
- Add tags, the `webperl` repo gets an annotated tag such as `v0.05-beta`, - Add tags, the `webperl` repo gets an annotated tag such as `v0.07-beta`,
and the `emperl5` repo gets an unannotated tag such as `webperl_v0.05-beta`, and the `emperl5` repo gets an unannotated tag such as `webperl_v0.07-beta`,
then `git push --tags` then `git push --tags`
- Create a release on GitHub and upload the `webperl_prebuilt_*.zip` as an asset - Create a release on GitHub and upload the `webperl_prebuilt_*.zip` as an asset
- If there was a `pages_for_vX.XX` branch of `gh-pages`, don't forget to merge that
- Uploading to AWS S3: - Uploading to AWS S3:
1. Run `gzip -9` on `emperl.*` and `webperl.js` 1. Run `gzip -9` on `emperl.*` and `webperl.js`
2. Rename them to remove the `.gz` ending 2. Rename them to remove the `.gz` ending
3. Upload them with the appropriate `Content-Type` (see e.g. `web/webperl.psgi`) and a `Content-Encoding` of `gzip` 3. Upload them with the appropriate `Content-Type` (see e.g. `web/webperl.psgi`) and a `Content-Encoding` of `gzip`
- If there was a `pages_for_vX.XX` branch of `gh-pages`, don't forget to merge that
Prior Art Prior Art
--------- ---------

@ -33,6 +33,7 @@ with the following differences:
- URL updated to https://github.com/haukex/webperl/blob/gh-pages/regex.html - URL updated to https://github.com/haukex/webperl/blob/gh-pages/regex.html
--> -->
<meta name="viewport" content="width=600" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css"
integrity="sha256-oSrCnRYXvHG31SBifqP2PM1uje7SJUyX0nTwO2RJV54=" crossorigin="anonymous" /> integrity="sha256-oSrCnRYXvHG31SBifqP2PM1uje7SJUyX0nTwO2RJV54=" crossorigin="anonymous" />
<style> <style>
@ -102,8 +103,8 @@ textarea.samp_ta {
</style> </style>
<!--script src="webperl.js"></script--> <!--script src="webperl.js"></script-->
<script src="https://webperlcdn.zero-g.net/v0.05-beta/webperl.js" <script src="https://webperlcdn.zero-g.net/v0.07-beta/webperl.js"
integrity="sha256-0RqUAQu0lcyxE1cPEuyrchvz0YkDITr41FYfTL4Prtk" crossorigin="anonymous"></script> integrity="sha256-jL8SB7St5ou4+hb0frK0k6VCQXsWQ1wolDrdU7i4juc" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" <script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
@ -156,8 +157,8 @@ if ($RUN_CODE_IN_IFRAME) { # https://www.html5rocks.com/en/tutorials/security/sa
my $iframe_html = <<~'END_IFRAME_HTML'; my $iframe_html = <<~'END_IFRAME_HTML';
<html> <html>
<head> <head>
<script src="https://webperlcdn.zero-g.net/v0.05-beta/webperl.js" <script src="https://webperlcdn.zero-g.net/v0.07-beta/webperl.js"
integrity="sha256-0RqUAQu0lcyxE1cPEuyrchvz0YkDITr41FYfTL4Prtk" crossorigin="anonymous"></scr__ipt> integrity="sha256-jL8SB7St5ou4+hb0frK0k6VCQXsWQ1wolDrdU7i4juc" crossorigin="anonymous"></scr__ipt>
<script> <script>
Perl.noMountIdbfs=true; // we're sandboxed Perl.noMountIdbfs=true; // we're sandboxed
</scr__ipt> </scr__ipt>
@ -279,6 +280,7 @@ $sampcodebtn->click(sub{
$samplecode_ta->hide; $samplecode_ta->hide;
$codecopy->hide; $codecopy->hide;
$sampcodebtn->text('Show Example Perl Code'); $sampcodebtn->text('Show Example Perl Code');
update();
} }
else { sampcode_show() } else { sampcode_show() }
}); });
@ -387,7 +389,7 @@ sub actual_update {
.'print(STDERR Data::Dumper->new([$input],["input"])->Indent(0)->Dump,' .'print(STDERR Data::Dumper->new([$input],["input"])->Indent(0)->Dump,'
.'"\n-- Code --\n",' . pp($code) . ',"----\n")}' . "\n" .'"\n-- Code --\n",' . pp($code) . ',"----\n")}' . "\n"
. $code . "\n" . $code . "\n"
. q{print STDERR "----\n",Data::Dumper->new([\@output],["*output"])->Indent(0)->Dump;}; . q{print STDERR "----\n",Data::Dumper->new([\@output],["*output"])->Indent(0)->Dump,"\n";};
run_code($sample->attr('id'), $code, $text, \&run_code_callback); run_code($sample->attr('id'), $code, $text, \&run_code_callback);
} }

@ -467,6 +467,14 @@ stored in a Perl scalar `$foo` pointing to a JavaScript object `foo`:
- `toperl` is a method that translates the object from a `JSObject` into a - `toperl` is a method that translates the object from a `JSObject` into a
regular Perl data structure (deep copy). Note that JavaScript functions are regular Perl data structure (deep copy). Note that JavaScript functions are
kept wrapped inside anonymous Perl `sub`s. kept wrapped inside anonymous Perl `sub`s.
- `jscode` returns a string of JavaScript code that represents a reference
to the JavaScript object. You should treat the string as an opaque value,
no guarantees are made about its format and whether it may change in future
releases. This is an advanced function that should not normally be needed,
unless you are building strings of JavaScript to run. In that case, you
may need to wrap the value in parentheses for it to evaluate correctly in
JavaScript. Example: `js( "console.log(".$jsobject->jscode.")" )`
(`jscode` was added in WebPerl `v0.07-beta`.)
Method autoloading will of course not work for JavaScript methods that have Method autoloading will of course not work for JavaScript methods that have
the same name as existing Perl methods - these are the above methods, the same name as existing Perl methods - these are the above methods,

Loading…
Cancel
Save