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
chore: add empty project templates
Martin Adámek03d876e97247
diff --git a/packages/templates/manifest.json b/packages/templates/manifest.jsonindex cfac04b32..716cef49c 100644--- a/packages/templates/manifest.json+++ b/packages/templates/manifest.json@@ -25,6 +25,31 @@"README.md"]},+ {+ "name": "empty-ts",+ "description": "Empty project [TypeScript]",+ "files": [+ "src/main.ts",+ ".dockerignore",+ ".gitignore",+ "Dockerfile",+ "package.json",+ "README.md",+ "tsconfig.json"+ ]+ },+ {+ "name": "empty-js",+ "description": "Empty project [JavaScript]",+ "files": [+ "src/main.js",+ ".dockerignore",+ ".gitignore",+ "Dockerfile",+ "package.json",+ "README.md"+ ]+ },{"name": "cheerio-ts","description": "CheerioCrawler template project [TypeScript]",diff --git a/packages/templates/templates/cheerio-js/.dockerignore b/packages/templates/templates/cheerio-js/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/cheerio-js/.dockerignore+++ b/packages/templates/templates/cheerio-js/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/cheerio-js/.gitignore b/packages/templates/templates/cheerio-js/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/cheerio-js/.gitignore+++ b/packages/templates/templates/cheerio-js/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/cheerio-js/README.md b/packages/templates/templates/cheerio-js/README.mdindex c72f66fe6..b888e6acb 100644--- a/packages/templates/templates/cheerio-js/README.md+++ b/packages/templates/templates/cheerio-js/README.md@@ -7,21 +7,3 @@ If you're looking for examples or want to learn more visit:- [Tutorial](https://crawlee.dev/docs/guides/cheerio-crawler-guide)- [Documentation](https://crawlee.dev/api/cheerio-crawler/class/CheerioCrawler)- [Examples](https://crawlee.dev/docs/examples/cheerio-crawler)--## Writing a README--See our tutorial on [writing READMEs for your actors](https://help.apify.com/en/articles/2912548-how-to-write-great-readme-for-your-actors) if you need more inspiration.--### Table of contents--If your README requires a table of contents, use the template below and make sure to keep the `<!-- toc start -->` and `<!-- toc end -->` markers.--<!-- toc start -->-- Introduction-- Use Cases- - Case 1- - Case 2-- Input-- Output-- Miscellaneous- <!-- toc end -->diff --git a/packages/templates/templates/cheerio-ts/.dockerignore b/packages/templates/templates/cheerio-ts/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/cheerio-ts/.dockerignore+++ b/packages/templates/templates/cheerio-ts/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/cheerio-ts/.gitignore b/packages/templates/templates/cheerio-ts/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/cheerio-ts/.gitignore+++ b/packages/templates/templates/cheerio-ts/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/cheerio-ts/README.md b/packages/templates/templates/cheerio-ts/README.mdindex 576034706..585998e21 100644--- a/packages/templates/templates/cheerio-ts/README.md+++ b/packages/templates/templates/cheerio-ts/README.md@@ -7,21 +7,3 @@ If you're looking for examples or want to learn more visit:- [Tutorial](https://crawlee.dev/docs/guides/cheerio-crawler-guide)- [Documentation](https://crawlee.dev/api/cheerio-crawler/class/CheerioCrawler)- [Examples](https://crawlee.dev/docs/examples/cheerio-crawler)--## Writing a README--See our tutorial on [writing READMEs for your actors](https://help.apify.com/en/articles/2912548-how-to-write-great-readme-for-your-actors) if you need more inspiration.--### Table of contents--If your README requires a table of contents, use the template below and make sure to keep the `<!-- toc start -->` and `<!-- toc end -->` markers.--<!-- toc start -->-- Introduction-- Use Cases- - Case 1- - Case 2-- Input-- Output-- Miscellaneous- <!-- toc end -->diff --git a/packages/templates/templates/empty-js/.dockerignore b/packages/templates/templates/empty-js/.dockerignorenew file mode 100644index 000000000..271066828--- /dev/null+++ b/packages/templates/templates/empty-js/.dockerignore@@ -0,0 +1,8 @@+# configurations+.idea++# crawlee storage folder+storage++# installed files+node_modulesdiff --git a/packages/templates/templates/empty-js/.gitignore b/packages/templates/templates/empty-js/.gitignorenew file mode 100644index 000000000..e0996e66f--- /dev/null+++ b/packages/templates/templates/empty-js/.gitignore@@ -0,0 +1,6 @@+# This file tells Git which files shouldn't be added to source control++.idea+dist+node_modules+storagediff --git a/packages/templates/templates/empty-js/Dockerfile b/packages/templates/templates/empty-js/Dockerfilenew file mode 100644index 000000000..4c8d11fc3--- /dev/null+++ b/packages/templates/templates/empty-js/Dockerfile@@ -0,0 +1,29 @@+# Specify the base Docker image. You can read more about+# the available images at https://crawlee.dev/docs/guides/docker-images+# You can also use any other image from Docker Hub.+FROM apify/actor-node:20++# Copy just package.json and package-lock.json+# to speed up the build using Docker layer cache.+COPY package*.json ./++# Install NPM packages, skip optional and development dependencies to+# keep the image small. Avoid logging too much and print the dependency+# tree for debugging+RUN npm --quiet set progress=false \+ && npm install --omit=dev --omit=optional \+ && echo "Installed NPM packages:" \+ && (npm list --omit=dev --all || true) \+ && echo "Node.js version:" \+ && node --version \+ && echo "NPM version:" \+ && npm --version++# Next, copy the remaining files and directories with the source code.+# Since we do this after NPM install, quick build will be really fast+# for most source file changes.+COPY . ./+++# Run the image.+CMD npm start --silentdiff --git a/packages/templates/templates/empty-js/README.md b/packages/templates/templates/empty-js/README.mdnew file mode 100644index 000000000..c4b93d152--- /dev/null+++ b/packages/templates/templates/empty-js/README.md@@ -0,0 +1,8 @@+# Crawlee + JavaScript empty project++This template is a production ready boilerplate for developing with Crawlee. Use this to bootstrap your projects using the most up-to-date code.++If you're looking for examples or want to learn more visit:++- [Quick Start](https://crawlee.dev/docs/quick-start)+- [Examples](https://crawlee.dev/docs/examples)diff --git a/packages/templates/templates/empty-js/package.json b/packages/templates/templates/empty-js/package.jsonnew file mode 100644index 000000000..51fb96156--- /dev/null+++ b/packages/templates/templates/empty-js/package.json@@ -0,0 +1,15 @@+{+ "name": "crawlee-cheerio-js",+ "version": "0.0.1",+ "type": "module",+ "description": "This is an example of a Crawlee project.",+ "dependencies": {+ "crawlee": "^3.0.0"+ },+ "scripts": {+ "start": "node src/main.js",+ "test": "echo \"Error: oops, the actor has no tests yet, sad!\" && exit 1"+ },+ "author": "It's not you it's me",+ "license": "ISC"+}diff --git a/packages/templates/templates/empty-js/src/main.js b/packages/templates/templates/empty-js/src/main.jsnew file mode 100644index 000000000..693eaca97--- /dev/null+++ b/packages/templates/templates/empty-js/src/main.js@@ -0,0 +1 @@+// Let's scrape something...diff --git a/packages/templates/templates/empty-ts/.dockerignore b/packages/templates/templates/empty-ts/.dockerignorenew file mode 100644index 000000000..271066828--- /dev/null+++ b/packages/templates/templates/empty-ts/.dockerignore@@ -0,0 +1,8 @@+# configurations+.idea++# crawlee storage folder+storage++# installed files+node_modulesdiff --git a/packages/templates/templates/empty-ts/.gitignore b/packages/templates/templates/empty-ts/.gitignorenew file mode 100644index 000000000..e0996e66f--- /dev/null+++ b/packages/templates/templates/empty-ts/.gitignore@@ -0,0 +1,6 @@+# This file tells Git which files shouldn't be added to source control++.idea+dist+node_modules+storagediff --git a/packages/templates/templates/empty-ts/Dockerfile b/packages/templates/templates/empty-ts/Dockerfilenew file mode 100644index 000000000..995a3d815--- /dev/null+++ b/packages/templates/templates/empty-ts/Dockerfile@@ -0,0 +1,50 @@+# Specify the base Docker image. You can read more about+# the available images at https://crawlee.dev/docs/guides/docker-images+# You can also use any other image from Docker Hub.+FROM apify/actor-node:20 AS builder++# Copy just package.json and package-lock.json+# to speed up the build using Docker layer cache.+COPY package*.json ./++# Install all dependencies. Don't audit to speed up the installation.+RUN npm install --include=dev --audit=false++# Next, copy the source files using the user set+# in the base image.+COPY . ./++# Install all dependencies and build the project.+# Don't audit to speed up the installation.+RUN npm run build++# Create final image+FROM apify/actor-node:20++# Copy only built JS files from builder image+COPY --from=builder /usr/src/app/dist ./dist++# Copy just package.json and package-lock.json+# to speed up the build using Docker layer cache.+COPY package*.json ./++# Install NPM packages, skip optional and development dependencies to+# keep the image small. Avoid logging too much and print the dependency+# tree for debugging+RUN npm --quiet set progress=false \+ && npm install --omit=dev --omit=optional \+ && echo "Installed NPM packages:" \+ && (npm list --omit=dev --all || true) \+ && echo "Node.js version:" \+ && node --version \+ && echo "NPM version:" \+ && npm --version++# Next, copy the remaining files and directories with the source code.+# Since we do this after NPM install, quick build will be really fast+# for most source file changes.+COPY . ./+++# Run the image.+CMD npm run start:prod --silentdiff --git a/packages/templates/templates/empty-ts/README.md b/packages/templates/templates/empty-ts/README.mdnew file mode 100644index 000000000..2257e5aaa--- /dev/null+++ b/packages/templates/templates/empty-ts/README.md@@ -0,0 +1,8 @@+# Crawlee + TypeScript empty project++This template is a production ready boilerplate for developing with Crawlee. Use this to bootstrap your projects using the most up-to-date code.++If you're looking for examples or want to learn more visit:++- [Quick Start](https://crawlee.dev/docs/quick-start)+- [Examples](https://crawlee.dev/docs/examples)diff --git a/packages/templates/templates/empty-ts/package.json b/packages/templates/templates/empty-ts/package.jsonnew file mode 100644index 000000000..09a9b7fe5--- /dev/null+++ b/packages/templates/templates/empty-ts/package.json@@ -0,0 +1,24 @@+{+ "name": "crawlee-cheerio-ts",+ "version": "0.0.1",+ "type": "module",+ "description": "This is an example of a Crawlee project.",+ "dependencies": {+ "crawlee": "^3.0.0"+ },+ "devDependencies": {+ "@apify/tsconfig": "^0.1.0",+ "tsx": "^4.4.0",+ "typescript": "~5.4.0",+ "@types/node": "^20.0.0"+ },+ "scripts": {+ "start": "npm run start:dev",+ "start:prod": "node dist/main.js",+ "start:dev": "tsx src/main.ts",+ "build": "tsc",+ "test": "echo \"Error: oops, the actor has no tests yet, sad!\" && exit 1"+ },+ "author": "It's not you it's me",+ "license": "ISC"+}diff --git a/packages/templates/templates/empty-ts/src/main.ts b/packages/templates/templates/empty-ts/src/main.tsnew file mode 100644index 000000000..693eaca97--- /dev/null+++ b/packages/templates/templates/empty-ts/src/main.ts@@ -0,0 +1 @@+// Let's scrape something...diff --git a/packages/templates/templates/empty-ts/tsconfig.json b/packages/templates/templates/empty-ts/tsconfig.jsonnew file mode 100644index 000000000..cc141ac62--- /dev/null+++ b/packages/templates/templates/empty-ts/tsconfig.json@@ -0,0 +1,12 @@+{+ "extends": "@apify/tsconfig",+ "compilerOptions": {+ "module": "NodeNext",+ "moduleResolution": "NodeNext",+ "target": "ES2022",+ "outDir": "dist",+ "noUnusedLocals": false,+ "lib": ["DOM"]+ },+ "include": ["./src/**/*"]+}diff --git a/packages/templates/templates/getting-started-js/.dockerignore b/packages/templates/templates/getting-started-js/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/getting-started-js/.dockerignore+++ b/packages/templates/templates/getting-started-js/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/getting-started-js/.gitignore b/packages/templates/templates/getting-started-js/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/getting-started-js/.gitignore+++ b/packages/templates/templates/getting-started-js/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/getting-started-ts/.dockerignore b/packages/templates/templates/getting-started-ts/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/getting-started-ts/.dockerignore+++ b/packages/templates/templates/getting-started-ts/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/getting-started-ts/.gitignore b/packages/templates/templates/getting-started-ts/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/getting-started-ts/.gitignore+++ b/packages/templates/templates/getting-started-ts/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/playwright-js/.dockerignore b/packages/templates/templates/playwright-js/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/playwright-js/.dockerignore+++ b/packages/templates/templates/playwright-js/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/playwright-js/.gitignore b/packages/templates/templates/playwright-js/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/playwright-js/.gitignore+++ b/packages/templates/templates/playwright-js/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/playwright-ts/.dockerignore b/packages/templates/templates/playwright-ts/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/playwright-ts/.dockerignore+++ b/packages/templates/templates/playwright-ts/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/playwright-ts/.gitignore b/packages/templates/templates/playwright-ts/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/playwright-ts/.gitignore+++ b/packages/templates/templates/playwright-ts/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/puppeteer-js/.dockerignore b/packages/templates/templates/puppeteer-js/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/puppeteer-js/.dockerignore+++ b/packages/templates/templates/puppeteer-js/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/puppeteer-js/.gitignore b/packages/templates/templates/puppeteer-js/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/puppeteer-js/.gitignore+++ b/packages/templates/templates/puppeteer-js/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestoragediff --git a/packages/templates/templates/puppeteer-ts/.dockerignore b/packages/templates/templates/puppeteer-ts/.dockerignoreindex ceb85b1ce..271066828 100644--- a/packages/templates/templates/puppeteer-ts/.dockerignore+++ b/packages/templates/templates/puppeteer-ts/.dockerignore@@ -1,9 +1,7 @@# configurations.idea-# crawlee and apify storage folders-apify_storage-crawlee_storage+# crawlee storage folderstorage# installed filesdiff --git a/packages/templates/templates/puppeteer-ts/.gitignore b/packages/templates/templates/puppeteer-ts/.gitignoreindex 02a7e1020..e0996e66f 100644--- a/packages/templates/templates/puppeteer-ts/.gitignore+++ b/packages/templates/templates/puppeteer-ts/.gitignore@@ -3,6 +3,4 @@.ideadistnode_modules-apify_storage-crawlee_storagestorage