mirror of
https://github.com/tweag/asterius.git
synced 2024-09-11 08:55:32 +03:00
Get rid of npm-utils
(#688)
This commit is contained in:
parent
2ef412add3
commit
604c47f510
@ -9,7 +9,6 @@ stack update
|
||||
stack build --test --no-run-tests \
|
||||
asterius \
|
||||
ghc-toolkit \
|
||||
npm-utils \
|
||||
wasm-toolkit
|
||||
|
||||
. .envrc
|
||||
|
3
.github/workflows/setup-deps.sh
vendored
3
.github/workflows/setup-deps.sh
vendored
@ -2,12 +2,15 @@
|
||||
|
||||
set -eu
|
||||
|
||||
npm install -g parcel-bundler@1.12.4
|
||||
|
||||
sudo apt install -y \
|
||||
alex \
|
||||
c2hs \
|
||||
cpphs \
|
||||
happy \
|
||||
libnuma-dev
|
||||
|
||||
curl -L https://github.com/WebAssembly/binaryen/archive/version_93.tar.gz | tar xz -C /tmp
|
||||
cd /tmp/binaryen-version_93
|
||||
mkdir build
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,7 +4,6 @@ wabt/wabt/bin
|
||||
asterius.cabal
|
||||
ghc-toolkit.cabal
|
||||
binaryen.cabal
|
||||
npm-utils.cabal
|
||||
wabt.cabal
|
||||
wasm-toolkit.cabal
|
||||
dist/
|
||||
|
@ -66,7 +66,6 @@ dependencies:
|
||||
- inline-js-core
|
||||
- libiserv
|
||||
- mtl
|
||||
- npm-utils
|
||||
- process
|
||||
- template-haskell
|
||||
- transformers
|
||||
|
@ -51,7 +51,6 @@ import Data.String
|
||||
import Foreign
|
||||
import Language.WebAssembly.WireFormat
|
||||
import qualified Language.WebAssembly.WireFormat as Wasm
|
||||
import NPM.Parcel
|
||||
import System.Console.GetOpt
|
||||
import System.Directory
|
||||
import System.Environment.Blank
|
||||
@ -412,9 +411,8 @@ ahcDistMain logger task (final_m, report) = do
|
||||
logger $ "[INFO] Writing JavaScript bundled script to " <> show out_js
|
||||
withCurrentDirectory (outputDirectory task) $
|
||||
callProcess
|
||||
"node"
|
||||
[ parcel,
|
||||
"build",
|
||||
"parcel"
|
||||
[ "build",
|
||||
"--out-dir",
|
||||
".",
|
||||
"--out-file",
|
||||
|
@ -37,6 +37,7 @@ WORKDIR /root
|
||||
RUN \
|
||||
(curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash) && \
|
||||
bash -c ". ~/.nvm/nvm.sh && nvm install 14.4.0" && \
|
||||
npm install -g parcel-bundler@1.12.4 && \
|
||||
mkdir -p ~/.local/bin && \
|
||||
curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.1/stack-2.3.1-linux-x86_64-bin -o ~/.local/bin/stack && \
|
||||
chmod +x ~/.local/bin/stack && \
|
||||
@ -45,7 +46,6 @@ RUN \
|
||||
|
||||
COPY asterius /root/.asterius/asterius
|
||||
COPY ghc-toolkit /root/.asterius/ghc-toolkit
|
||||
COPY npm-utils /root/.asterius/npm-utils
|
||||
COPY wasm-toolkit /root/.asterius/wasm-toolkit
|
||||
COPY stack.yaml /root/.asterius/stack.yaml
|
||||
|
||||
|
@ -50,7 +50,8 @@ RUN \
|
||||
chmod +x ~/.local/bin/stack && \
|
||||
curl -L https://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0-x86_64-unknown-linux.tar.xz | tar xJ -C ~/.local/bin 'cabal' && \
|
||||
npm install -g \
|
||||
0x@4.9.1 && \
|
||||
0x@4.9.1 \
|
||||
parcel-bundler@1.12.4 && \
|
||||
pip3 install \
|
||||
recommonmark \
|
||||
sphinx && \
|
||||
@ -58,7 +59,6 @@ RUN \
|
||||
|
||||
COPY asterius /tmp/asterius/asterius
|
||||
COPY ghc-toolkit /tmp/asterius/ghc-toolkit
|
||||
COPY npm-utils /tmp/asterius/npm-utils
|
||||
COPY wasm-toolkit /tmp/asterius/wasm-toolkit
|
||||
COPY stack.yaml /tmp/asterius/stack.yaml
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
# CHANGELOG for `npm-utils`
|
@ -1,13 +0,0 @@
|
||||
Copyright (c) 2018 EURL Tweag
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Tweag I/O nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@ -1 +0,0 @@
|
||||
# `npm-utils`
|
@ -1,24 +0,0 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# OPTIONS_GHC -Wall #-}
|
||||
|
||||
import Distribution.Simple
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
import Distribution.Types.GenericPackageDescription
|
||||
import System.Directory
|
||||
import System.Process
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
defaultMainWithHooks
|
||||
simpleUserHooks
|
||||
{ confHook = \t@(g_pkg_descr, _) c -> do
|
||||
lbi <- confHook simpleUserHooks t c
|
||||
let pkg_descr = packageDescription g_pkg_descr
|
||||
npm_utils_installdirs =
|
||||
absoluteInstallDirs pkg_descr lbi NoCopyDest
|
||||
npm_utils_datadir = datadir npm_utils_installdirs
|
||||
createDirectoryIfMissing True npm_utils_datadir
|
||||
withCurrentDirectory npm_utils_datadir $
|
||||
callCommand "npm install parcel-bundler@1.12.4"
|
||||
pure lbi
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
name: npm-utils
|
||||
version: 0.0.1
|
||||
category: Compiler
|
||||
stability: alpha
|
||||
maintainer: Shao Cheng <cheng.shao@tweag.io>
|
||||
copyright: (c) 2018 Tweag I/O
|
||||
license: BSD3
|
||||
github: tweag/asterius
|
||||
|
||||
extra-source-files:
|
||||
- CHANGELOG.md
|
||||
- LICENSE
|
||||
- README.md
|
||||
|
||||
custom-setup:
|
||||
dependencies:
|
||||
- base
|
||||
- Cabal
|
||||
- directory
|
||||
- process
|
||||
|
||||
ghc-options: -Wall
|
||||
|
||||
dependencies:
|
||||
- base
|
||||
- filepath
|
||||
|
||||
library:
|
||||
source-dirs: src
|
||||
other-modules:
|
||||
- Paths_npm_utils
|
@ -1,14 +0,0 @@
|
||||
module NPM.Parcel
|
||||
( parcel,
|
||||
)
|
||||
where
|
||||
|
||||
import qualified Paths_npm_utils
|
||||
import System.FilePath
|
||||
import System.IO.Unsafe
|
||||
|
||||
{-# NOINLINE parcel #-}
|
||||
parcel :: FilePath
|
||||
parcel = unsafePerformIO $ do
|
||||
datadir <- Paths_npm_utils.getDataDir
|
||||
pure $ datadir </> "node_modules" </> ".bin" </> "parcel"
|
@ -15,7 +15,6 @@ extra-deps:
|
||||
packages:
|
||||
- asterius
|
||||
- ghc-toolkit
|
||||
- npm-utils
|
||||
- wasm-toolkit
|
||||
|
||||
|
||||
|
@ -7,7 +7,6 @@ extra-deps:
|
||||
packages:
|
||||
- asterius
|
||||
- ghc-toolkit
|
||||
- npm-utils
|
||||
- wasm-toolkit
|
||||
|
||||
|
||||
|
@ -6,6 +6,5 @@ stack ghci \
|
||||
asterius:lib \
|
||||
asterius:ahc-ld \
|
||||
ghc-toolkit:lib \
|
||||
npm-utils:lib \
|
||||
wasm-toolkit:lib \
|
||||
--ghci-options="-Wall -Wno-overflowed-literals -fno-code -j +RTS -N -A64m -n2m -RTS"
|
||||
|
Loading…
Reference in New Issue
Block a user