mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-25 01:09:09 -04:00
Maintain redundant copies of Astronomy Engine source in demo folders.
Windows does not support relative links in Git by default. This broke the first-time experience for Windows users. From now on I will maintain copies of the astronomy.js and astronomy.py in the demo folders, so that the demos will work on Windows immediately after cloning the repo.
This commit is contained in:
7173
demo/browser/astronomy.js
Normal file
7173
demo/browser/astronomy.js
Normal file
File diff suppressed because it is too large
Load Diff
1
demo/browser/astronomy.min.js
vendored
1
demo/browser/astronomy.min.js
vendored
@@ -1 +0,0 @@
|
||||
../../source/js/astronomy.min.js
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>Solar System Barycenter</title>
|
||||
<link rel="stylesheet" href="barycenter.css">
|
||||
<script src="astronomy.min.js"></script>
|
||||
<script src="astronomy.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const ReservedPixelsBottom = 70;
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</p>
|
||||
</body>
|
||||
|
||||
<script src="../../source/js/astronomy.js"></script>
|
||||
<script src="astronomy.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var QuarterName = ['New Moon', 'First Quarter', 'Full Moon', 'Third Quarter'];
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
</body>
|
||||
|
||||
<script src="../../source/js/astronomy.js"></script>
|
||||
<script src="astronomy.js"></script>
|
||||
<script>
|
||||
function OnToggleAutoTime() {
|
||||
const checkbox = document.getElementById('AutoTimeCheckBox');
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
</body>
|
||||
|
||||
<script src="../../source/js/astronomy.js"></script>
|
||||
<script src="astronomy.js"></script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
const StorageKey = 'AstroDemo.Options';
|
||||
|
||||
7173
demo/nodejs/astronomy.js
Normal file
7173
demo/nodejs/astronomy.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@
|
||||
node culminate latitude longitude [date]
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js');
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function ParseNumber(text, name) {
|
||||
const x = Number(text);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js');
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
const NUM_SAMPLES = 4;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
node lunar_eclipse [date]
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js');
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function Pad(s, w) {
|
||||
s = s.toFixed(0);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
node moonphase [date]
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js'); // adjust path as needed for your system
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function Pad(s, w) {
|
||||
s = s.toFixed(0);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
for example the ISO 8601 UTC format "yyyy-mm-ddThh:mm:ssZ".
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js'); // adjust path as needed for your system
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function Format(x) {
|
||||
return x.toFixed(2).padStart(8);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
node riseset latitude longitude [date]
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js'); // adjust path as needed for your system
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function DisplayEvent(name, evt) {
|
||||
let text = evt ? evt.date.toISOString() : '';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
node riseset latitude longitude [date]
|
||||
*/
|
||||
|
||||
const Astronomy = require('../../source/js/astronomy.js'); // adjust path as needed for your system
|
||||
const Astronomy = require('astronomy.js');
|
||||
|
||||
function DisplayEvent(name, evt) {
|
||||
let text = evt ? evt.date.toISOString() : '';
|
||||
|
||||
7980
demo/python/astronomy.py
Normal file
7980
demo/python/astronomy.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -64,4 +64,9 @@ echo "Generating Python documentation."
|
||||
python3 ../pydown/pydown.py ../pydown/py_prefix.md ../source/python/astronomy.py ../source/python/README.md || Fail "Error generating Markdown from Python source."
|
||||
./check_internal_links.py $(realpath ../source/python/README.md) || exit 1
|
||||
|
||||
echo "Making redundant copies of source in demo folders."
|
||||
cp -v ../source/js/astronomy.js ../demo/browser/ || exit $?
|
||||
cp -v ../source/js/astronomy.js ../demo/nodejs/ || exit $?
|
||||
cp -v ../source/python/astronomy.py ../demo/python/ || exit $?
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -148,4 +148,15 @@ echo.Generating Python documentation.
|
||||
..\pydown\pydown.py ..\pydown\py_prefix.md ..\source\python\astronomy.py ..\source\python\README.md
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
echo.Making redundant copies of source in demo folders.
|
||||
|
||||
copy ..\source\js\astronomy.js ..\demo\browser\
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
copy ..\source\js\astronomy.js ..\demo\nodejs\
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
copy ..\source\python\astronomy.py ..\demo\python\
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user