Switch from bower to psc-package
This commit is contained in:
parent
939cd834d7
commit
8771780158
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
/out
|
||||
/node_modules
|
||||
/.pulp-cache/
|
||||
/.psc*
|
||||
/.purs*
|
||||
|
27
Makefile
27
Makefile
@ -6,26 +6,27 @@ MAKEFLAGS += --warn-undefined-variables
|
||||
|
||||
# Executables used in this makefile
|
||||
PULP := pulp
|
||||
BOWER := bower
|
||||
NODE := node
|
||||
YARN := yarn
|
||||
|
||||
# Options to pass to pulp when building
|
||||
BUILD_OPTIONS := -- --stash --censor-lib --strict
|
||||
|
||||
# Package manifest files
|
||||
BOWERJSON := bower.json
|
||||
PACKAGEJSON := package.json
|
||||
PSCPACKAGEJSON = psc-package.json
|
||||
|
||||
# Various input directories
|
||||
SRCPATH := ./src
|
||||
TESTPATH := ./test
|
||||
OUTPUT := ./out
|
||||
DOCS := ./docs
|
||||
EXAMPLESPATH := $(DOCS)/Examples
|
||||
EXAMPLEPATH := $(EXAMPLESPATH)/$(EXAMPLE)
|
||||
|
||||
# Various output directories
|
||||
OUTPUT := ./out
|
||||
MODULES := ./node_modules
|
||||
BUILD := $(OUTPUT)/build
|
||||
COMPONENTS := $(OUTPUT)/components
|
||||
OUTPUT_DOCS := $(OUTPUT)/docs
|
||||
OUTPUT_EXAMPLE := $(OUTPUT)/examples/$(EXAMPLE)
|
||||
|
||||
@ -37,12 +38,12 @@ SOURCES := $(SRCPATH)/**/*
|
||||
TESTSOURCES := $(TESTPATH)/**/*
|
||||
EXAMPLESOURCES := $(EXAMPLESPATH)/**/*
|
||||
|
||||
# Install bower components
|
||||
$(COMPONENTS): $(BOWERJSON)
|
||||
$(BOWER) install
|
||||
# Install node modules
|
||||
$(MODULES): $(PACKAGEJSON)
|
||||
$(YARN) --cache-folder $(MODULES) install
|
||||
|
||||
# Build the source files
|
||||
$(BUILD): $(COMPONENTS) $(SOURCES)
|
||||
$(BUILD): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
||||
$(PULP) build \
|
||||
--src-path $(SRCPATH) \
|
||||
--build-path $(BUILD) \
|
||||
@ -56,7 +57,7 @@ $(OUTPUT_EXAMPLE):
|
||||
mkdir -p $(OUTPUT_EXAMPLE)
|
||||
|
||||
# Build the example specified by the environment variable EXAMPLE
|
||||
$(EXAMPLE_INDEX): $(OUTPUT_EXAMPLE) $(BUILD) $(EXAMPLEPATH)/Main.purs
|
||||
$(EXAMPLE_INDEX): $(OUTPUT_EXAMPLE) $(BUILD) $(EXAMPLEPATH)/Main.purs $(MODULES)
|
||||
$(PULP) build \
|
||||
--src-path $(EXAMPLEPATH) \
|
||||
--include $(SRCPATH) \
|
||||
@ -81,7 +82,7 @@ example: $(BUILD) $(EXAMPLE_INDEX)
|
||||
endif
|
||||
|
||||
# Run the test suite
|
||||
test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES)
|
||||
test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
||||
$(PULP) test \
|
||||
--src-path $(SRCPATH) \
|
||||
--test-path $(TESTPATH) \
|
||||
@ -90,7 +91,7 @@ test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES)
|
||||
$(BUILD_OPTIONS)
|
||||
|
||||
# Launch a repl with all modules loaded
|
||||
repl: $(COMPONENTS) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES)
|
||||
repl: $(PSCPACKAGEJSON) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
||||
$(PULP) repl \
|
||||
--include $(EXAMPLESPATH) \
|
||||
--src-path $(SRCPATH) \
|
||||
@ -98,7 +99,7 @@ repl: $(COMPONENTS) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES)
|
||||
|
||||
# Remove all make output from the source tree
|
||||
clean:
|
||||
rm -rf $(OUTPUT)
|
||||
rm -rf $(OUTPUT) $(MODULES)
|
||||
|
||||
# Print out a description of all the supported tasks
|
||||
help:
|
||||
@ -114,7 +115,7 @@ help:
|
||||
$(info - make help Print this help)
|
||||
|
||||
# Build the documentation
|
||||
$(OUTPUT_DOCS): $(COMPONENTS) $(SOURCES)
|
||||
$(OUTPUT_DOCS): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
||||
$(PULP) docs \
|
||||
--src-path $(SRCPATH)
|
||||
rm -rf $(OUTPUT_DOCS)
|
||||
|
@ -29,7 +29,7 @@ check our [contributing guide](./Contributing.md).
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
bower install --save purescript-httpure
|
||||
psc-package install httpure
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
8
package.json
Normal file
8
package.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"bower": "^1.8.8",
|
||||
"pulp": "^12.3.1",
|
||||
"purescript-psa": "^0.7.3"
|
||||
}
|
||||
}
|
18
psc-package.json
Normal file
18
psc-package.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "purescript-httpure",
|
||||
"set": "psc-0.12.2",
|
||||
"source": "https://github.com/purescript/package-sets.git",
|
||||
"depends": [
|
||||
"aff",
|
||||
"foldable-traversable",
|
||||
"node-child-process",
|
||||
"node-fs",
|
||||
"node-fs-aff",
|
||||
"node-http",
|
||||
"prelude",
|
||||
"psci-support",
|
||||
"spec",
|
||||
"strings",
|
||||
"unsafe-coerce"
|
||||
]
|
||||
}
|
22
shell.nix
Normal file
22
shell.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
purescript ? "0.12.2",
|
||||
nixjs-version ? "0.0.7",
|
||||
nixjs ? fetchTarball "https://github.com/cprussin/nixjs/archive/${nixjs-version}.tar.gz",
|
||||
nixpkgs ? <nixpkgs>
|
||||
}:
|
||||
|
||||
let
|
||||
nixjs-overlay = import nixjs { inherit purescript; };
|
||||
pkgs = import nixpkgs { overlays = [ nixjs-overlay ]; };
|
||||
in
|
||||
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.git
|
||||
pkgs.nodejs
|
||||
pkgs.yarn
|
||||
pkgs.purescript
|
||||
pkgs.psc-package
|
||||
];
|
||||
shellHook = "export PATH=$PATH:$PWD/node_modules/.bin";
|
||||
}
|
Loading…
Reference in New Issue
Block a user