Skip to content

Commit

Permalink
use parcel (#13)
Browse files Browse the repository at this point in the history
* refactor package.json

* use parcel
  • Loading branch information
klntsky committed Jul 25, 2019
1 parent dbcb21d commit 4d7f8ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs-search/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/.psa*
/.spago/
/dist/
/.cache/
4 changes: 2 additions & 2 deletions docs-search/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ script:
- spago test
- spago docs
- npm run build
- node dist/main.js build-index
- ./dist/purescript-docs-search build-index

deploy:
- provider: releases
api_key: $API_KEY
file:
- dist/docs-search-app.js
- dist/main.js
- dist/purescript-docs-search
skip_cleanup: true
on:
tags: true
Expand Down
14 changes: 10 additions & 4 deletions docs-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "test"
},
"bin": {
"purescript-docs-search": "dist/main.js"
"purescript-docs-search": "dist/purescript-docs-search"
},
"files": [
"dist/main.js",
Expand All @@ -17,8 +17,14 @@
"scripts": {
"test": "spago test",
"bundle-app": "spago bundle-app -m Docs.Search.App --to dist/docs-search-app.js",
"bundle-main": "spago bundle-app -m Docs.Search.Main --to dist/main.js && browserify --no-builtins --no-commondir --no-detect-globals --node dist/main.js --outfile dist/main-bundled.js && echo \"#!/usr/bin/env node\" > dist/main.js && cat dist/main-bundled.js >> dist/main.js && rm dist/main-bundled.js",
"build": "npm run bundle-app && npm run bundle-main",
"parcel-app": "parcel build --no-source-maps --target browser --out-file dist/docs-search-app.js dist/docs-search-app.js",
"build-app": "npm run bundle-app && npm run parcel-app",
"bundle-main": "spago bundle-app -m Docs.Search.Main --to dist/main.js",
"parcel-main": "parcel build --no-source-maps --target node --bundle-node-modules --out-file dist/main.js dist/main.js",
"add-shebang": "echo \"#!/usr/bin/env node\" > dist/purescript-docs-search && cat dist/main.js >> dist/purescript-docs-search",
"chmod-main": "chmod +x dist/purescript-docs-search",
"build-main": "npm run bundle-main && npm run parcel-main && npm run add-shebang && rm dist/main.js && npm run chmod-main",
"build": "npm run build-app && npm run build-main",
"clean": "rm -rf dist"
},
"repository": {
Expand All @@ -36,8 +42,8 @@
"homepage": "https://github.com/spacchetti/purescript-docs-search#readme",
"dependencies": {},
"devDependencies": {
"browserify": "^16.3.0",
"glob": "^7.1.4",
"parcel": "^1.12.3",
"spago": "^0.8.5"
}
}

0 comments on commit 4d7f8ef

Please sign in to comment.