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
|
/out
|
||||||
|
/node_modules
|
||||||
/.pulp-cache/
|
/.pulp-cache/
|
||||||
/.psc*
|
/.psc*
|
||||||
/.purs*
|
/.purs*
|
||||||
|
27
Makefile
27
Makefile
@ -6,26 +6,27 @@ MAKEFLAGS += --warn-undefined-variables
|
|||||||
|
|
||||||
# Executables used in this makefile
|
# Executables used in this makefile
|
||||||
PULP := pulp
|
PULP := pulp
|
||||||
BOWER := bower
|
|
||||||
NODE := node
|
NODE := node
|
||||||
|
YARN := yarn
|
||||||
|
|
||||||
# Options to pass to pulp when building
|
# Options to pass to pulp when building
|
||||||
BUILD_OPTIONS := -- --stash --censor-lib --strict
|
BUILD_OPTIONS := -- --stash --censor-lib --strict
|
||||||
|
|
||||||
# Package manifest files
|
# Package manifest files
|
||||||
BOWERJSON := bower.json
|
PACKAGEJSON := package.json
|
||||||
|
PSCPACKAGEJSON = psc-package.json
|
||||||
|
|
||||||
# Various input directories
|
# Various input directories
|
||||||
SRCPATH := ./src
|
SRCPATH := ./src
|
||||||
TESTPATH := ./test
|
TESTPATH := ./test
|
||||||
OUTPUT := ./out
|
|
||||||
DOCS := ./docs
|
DOCS := ./docs
|
||||||
EXAMPLESPATH := $(DOCS)/Examples
|
EXAMPLESPATH := $(DOCS)/Examples
|
||||||
EXAMPLEPATH := $(EXAMPLESPATH)/$(EXAMPLE)
|
EXAMPLEPATH := $(EXAMPLESPATH)/$(EXAMPLE)
|
||||||
|
|
||||||
# Various output directories
|
# Various output directories
|
||||||
|
OUTPUT := ./out
|
||||||
|
MODULES := ./node_modules
|
||||||
BUILD := $(OUTPUT)/build
|
BUILD := $(OUTPUT)/build
|
||||||
COMPONENTS := $(OUTPUT)/components
|
|
||||||
OUTPUT_DOCS := $(OUTPUT)/docs
|
OUTPUT_DOCS := $(OUTPUT)/docs
|
||||||
OUTPUT_EXAMPLE := $(OUTPUT)/examples/$(EXAMPLE)
|
OUTPUT_EXAMPLE := $(OUTPUT)/examples/$(EXAMPLE)
|
||||||
|
|
||||||
@ -37,12 +38,12 @@ SOURCES := $(SRCPATH)/**/*
|
|||||||
TESTSOURCES := $(TESTPATH)/**/*
|
TESTSOURCES := $(TESTPATH)/**/*
|
||||||
EXAMPLESOURCES := $(EXAMPLESPATH)/**/*
|
EXAMPLESOURCES := $(EXAMPLESPATH)/**/*
|
||||||
|
|
||||||
# Install bower components
|
# Install node modules
|
||||||
$(COMPONENTS): $(BOWERJSON)
|
$(MODULES): $(PACKAGEJSON)
|
||||||
$(BOWER) install
|
$(YARN) --cache-folder $(MODULES) install
|
||||||
|
|
||||||
# Build the source files
|
# Build the source files
|
||||||
$(BUILD): $(COMPONENTS) $(SOURCES)
|
$(BUILD): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
||||||
$(PULP) build \
|
$(PULP) build \
|
||||||
--src-path $(SRCPATH) \
|
--src-path $(SRCPATH) \
|
||||||
--build-path $(BUILD) \
|
--build-path $(BUILD) \
|
||||||
@ -56,7 +57,7 @@ $(OUTPUT_EXAMPLE):
|
|||||||
mkdir -p $(OUTPUT_EXAMPLE)
|
mkdir -p $(OUTPUT_EXAMPLE)
|
||||||
|
|
||||||
# Build the example specified by the environment variable 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 \
|
$(PULP) build \
|
||||||
--src-path $(EXAMPLEPATH) \
|
--src-path $(EXAMPLEPATH) \
|
||||||
--include $(SRCPATH) \
|
--include $(SRCPATH) \
|
||||||
@ -81,7 +82,7 @@ example: $(BUILD) $(EXAMPLE_INDEX)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Run the test suite
|
# Run the test suite
|
||||||
test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES)
|
test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
||||||
$(PULP) test \
|
$(PULP) test \
|
||||||
--src-path $(SRCPATH) \
|
--src-path $(SRCPATH) \
|
||||||
--test-path $(TESTPATH) \
|
--test-path $(TESTPATH) \
|
||||||
@ -90,7 +91,7 @@ test: $(BUILD) $(TESTSOURCES) $(EXAMPLESOURCES)
|
|||||||
$(BUILD_OPTIONS)
|
$(BUILD_OPTIONS)
|
||||||
|
|
||||||
# Launch a repl with all modules loaded
|
# Launch a repl with all modules loaded
|
||||||
repl: $(COMPONENTS) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES)
|
repl: $(PSCPACKAGEJSON) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES) $(MODULES)
|
||||||
$(PULP) repl \
|
$(PULP) repl \
|
||||||
--include $(EXAMPLESPATH) \
|
--include $(EXAMPLESPATH) \
|
||||||
--src-path $(SRCPATH) \
|
--src-path $(SRCPATH) \
|
||||||
@ -98,7 +99,7 @@ repl: $(COMPONENTS) $(SOURCES) $(TESTSOURCES) $(EXAMPLESOURCES)
|
|||||||
|
|
||||||
# Remove all make output from the source tree
|
# Remove all make output from the source tree
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(OUTPUT)
|
rm -rf $(OUTPUT) $(MODULES)
|
||||||
|
|
||||||
# Print out a description of all the supported tasks
|
# Print out a description of all the supported tasks
|
||||||
help:
|
help:
|
||||||
@ -114,7 +115,7 @@ help:
|
|||||||
$(info - make help Print this help)
|
$(info - make help Print this help)
|
||||||
|
|
||||||
# Build the documentation
|
# Build the documentation
|
||||||
$(OUTPUT_DOCS): $(COMPONENTS) $(SOURCES)
|
$(OUTPUT_DOCS): $(PSCPACKAGEJSON) $(SOURCES) $(MODULES)
|
||||||
$(PULP) docs \
|
$(PULP) docs \
|
||||||
--src-path $(SRCPATH)
|
--src-path $(SRCPATH)
|
||||||
rm -rf $(OUTPUT_DOCS)
|
rm -rf $(OUTPUT_DOCS)
|
||||||
|
@ -29,7 +29,7 @@ check our [contributing guide](./Contributing.md).
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bower install --save purescript-httpure
|
psc-package install httpure
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quick Start
|
## 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