Remove confirmation prompt from postinstall

This commit is contained in:
Calvin Montgomery 2018-01-07 15:42:08 -08:00
parent e350eb731b
commit c07cf7c13a
5 changed files with 27 additions and 1816 deletions

15
NEWS.md
View File

@ -1,3 +1,18 @@
2018-01-07
==========
**Build changes:** When the `babel` dependency was first added to transpile ES6
code to ES5, an interactive prompt was added to the `postinstall` script before
transpilation, in case the user had made local modifications to the files in
`lib` which previously would have been detected as a git conflict when pulling.
It has now been sufficiently long that this is no longer needed, so I've removed
it. As always, users wishing to make local modifications (or forks) should edit
the code in `src/` and run `npm run build-server` to regenerate `lib/`.
This commit also removes the bundled `www/js/player.js` file in favor of having
`postinstall` generate it from the sources in `player/`.
2017-12-24
==========

4
build-player.js → bin/build-player.js Normal file → Executable file
View File

@ -1,4 +1,6 @@
var coffee = require('coffee-script');
#!/usr/bin/env node
var coffee = require('coffeescript');
var fs = require('fs');
var path = require('path');

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery",
"name": "CyTube",
"description": "Online media synchronizer and chat",
"version": "3.51.18",
"version": "3.52.0",
"repository": {
"url": "http://github.com/calzoneman/sync"
},
@ -46,7 +46,7 @@
"yamljs": "^0.2.8"
},
"scripts": {
"build-player": "$npm_node_execpath build-player.js",
"build-player": "./bin/build-player.js",
"build-server": "babel -D --source-maps --loose es6.destructuring,es6.forOf --out-dir lib/ src/",
"flow": "flow",
"postinstall": "./postinstall.sh",
@ -63,7 +63,7 @@
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-env": "^1.5.2",
"coffee-script": "^1.9.2",
"coffeescript": "^1.9.2",
"flow-bin": "^0.43.0",
"mocha": "^3.2.0",
"sinon": "^2.3.2"

View File

@ -1,19 +1,9 @@
#!/bin/sh
if test "$BUILD_OVERRIDE" = "Y"; then
echo "Running $npm_package_scripts_build_server"
$npm_package_scripts_build_server
exit $?
fi
set -e
echo "In order to run the server, the source files in src/ must be transpiled to lib/. This will overwrite any changes you have made to the files in lib/."
echo -n "Do you want to build now? [y/N]? "
read answer
echo
if test "$answer" = "y" || test "$answer" = "Y"; then
echo "Running $npm_package_scripts_build_server"
echo "Building from src/ to lib/"
$npm_package_scripts_build_server
else
echo "Skipping build step. You can build at a later time by running \`npm run build-server\`."
fi
echo "Building from player/ to www/js/player.js"
$npm_package_scripts_build_player
echo "Done"

File diff suppressed because it is too large Load Diff