Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: install psc-package via a NPM script #3386

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions autotest/IntegTester/ps/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/.psc*
/.purs*
/.psa*
/psc-package
37 changes: 37 additions & 0 deletions autotest/IntegTester/ps/install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0, (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const https = require("follow-redirects").https;
const tar = require("tar");
const shell = require("shelljs");

https.get(
`https://github.com/purescript/psc-package/releases/download/v0.6.2/linux64.tar.gz`,
(res) => {
return res.pipe(
tar.x().on("finish", () => {
if (shell.test("-f", "./psc-package/psc-package")) {
shell.mv(
"./psc-package/psc-package",
"./psc-package/psc-package.exe"
);
}
})
);
}
);
34 changes: 6 additions & 28 deletions autotest/IntegTester/ps/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions autotest/IntegTester/ps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
"name": "integ-tester",
"private": true,
"scripts": {
"install": "psc-package install",
"install": "node install.js && npm exec psc-package install",
PenghaiZhang marked this conversation as resolved.
Show resolved Hide resolved
"clean": "rm -rf node_modules/ .psc-package/ psc-package",
"build": "pulp build && parcel build --no-autoinstall --out-dir=target/www www/*.html www/*.tsx",
"dev": "pulp build && parcel watch --no-autoinstall --out-dir=../target/scala-2.12/classes/www www/*.html www/*.tsx"
},
"bin": {
"psc-package": "./psc-package/psc-package.exe"
PenghaiZhang marked this conversation as resolved.
Show resolved Hide resolved
},
"engines": {
"npm": "7.19.1"
},
Expand All @@ -25,9 +29,11 @@
"@types/react-dom": "17.0.9",
"mkdirp": "1.0.4",
"parcel-bundler": "1.12.5",
"psc-package": "4.0.1",
"pulp": "15.0.0",
"purescript": "0.12.3",
"typescript": "4.4.2"
"typescript": "4.4.2",
"follow-redirects": "^1.5.9",
"tar": "^4.4.8",
"shelljs": "^0.8.2"
PenghaiZhang marked this conversation as resolved.
Show resolved Hide resolved
}
}