Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Update publish script
Ondra Urbane50f60097ed6
diff --git a/package.json b/package.jsonindex 385a51b8c..a64432fbd 100644--- a/package.json+++ b/package.json@@ -43,7 +43,7 @@"build-readme": "node ./tools/build_readme.js","test": "npm run build && nyc --reporter=html --reporter=text mocha --timeout 60000 --require @babel/register --recursive --exit","prepare": "npm run build",- "prepublishOnly": "(test $RUNNING_FROM_SCRIPT || (echo \"You must use publish.sh instead of 'npm publish' directly!\"; exit 1)) && npm test && npm run lint",+ "prepublishOnly": "(test $TRAVIS || (echo \"Publishing is reserved to the Travis CI!\"; exit 1))","clean": "rm -rf build","lint": "npm run build && ./node_modules/.bin/eslint ./src ./test","lint:fix": "./node_modules/.bin/eslint ./src ./test --ext .js,.jsx --fix",diff --git a/publish.sh b/publish.shdeleted file mode 100755index 16bd41331..000000000--- a/publish.sh+++ /dev/null@@ -1,53 +0,0 @@-#!/bin/bash--set -e--RED='\033[0;31m'-NC='\033[0m' # No Color--# Do this BEFORE checking there are no git changes!-echo "Generating documentation ..."-npm run build-docs-npm run build-readme--PACKAGE_NAME=`node -pe "require('./package.json').name"`-PACKAGE_VERSION=`node -pe "require('./package.json').version"`-BRANCH=`git status | grep 'On branch' | cut -d ' ' -f 3`-BRANCH_UP_TO_DATE=`git status | grep 'nothing to commit' | tr -s \n ' '`;-GIT_TAG="v${PACKAGE_VERSION}"--if [ -z "${BRANCH_UP_TO_DATE}" ]; then- printf "${RED}You have uncommitted changes!${NC}\n"- exit 1-fi--echo "Pushing to git ..."-git push--# Master gets published as LATEST - the package already needs to be published as BETA.-if [ "${BRANCH}" = "master" ]; then- EXISTING_NPM_VERSION=$(npm view ${PACKAGE_NAME} versions --json | grep ${PACKAGE_VERSION} | tee) # Using tee to swallow non-zero exit code- if [ -z "${EXISTING_NPM_VERSION}" ]; then- printf "${RED}Version ${PACKAGE_VERSION} was not yet published on NPM. Note that you can only publish to NPM from non-master branch!${NC}\n"- exit 1- else- echo "Tagging version ${PACKAGE_VERSION} with tag \"latest\" ..."- RUNNING_FROM_SCRIPT=1 npm dist-tag add ${PACKAGE_NAME}@${PACKAGE_VERSION} latest- fi-- # TODO: We should call this automatically, and force user to have the necessary env vars set!- echo "IMPORTANT: Now publish the new documentation by running website/publish_docs.sh !!!"--# Any other branch gets published as BETA and we don't allow to override tag of existing version.-else- echo "Publishing version ${PACKAGE_VERSION} with tag \"beta\" ..."- RUNNING_FROM_SCRIPT=1 npm publish --tag beta-- echo "Tagging git commit with ${GIT_TAG} ..."- git tag ${GIT_TAG}- git push origin ${GIT_TAG}- echo "Git tag: ${GIT_TAG} created."-fi---echo "Done."