Reduce low risk duplication (#79)

* clean up helpers

* shared in it's own top level folder

* workspaces setup

* build fix

* disable workspaces?

* run ci

* rename job-flow to gradcracker

* optional dependencies

* formatting?

* more optional modules

* allow post install runs

* node bump

* remove post install

* add optionals

* add more

* formatting

* comments, but im unsure

* run typescript DIRECTLY

* better build

* camoufox simplification

* lint

* build process doesn't exist

* build fix

* lockfile

* type check everything, build only for client

* rename steps correctly

* import from package!

* fix formatting

* don't fetch twice

* fix concern
This commit is contained in:
Shaheer Sarfaraz
2026-02-02 21:30:14 +00:00
committed by GitHub
parent 179deffe13
commit b94f85b149
165 changed files with 8909 additions and 13638 deletions
+8 -5
View File
@@ -7,8 +7,9 @@ FROM apify/actor-node-playwright-chrome:20-1.50.1 AS builder
# to speed up the build using Docker layer cache.
COPY --chown=myuser package*.json ./
# Install all dependencies. Don't audit to speed up the installation.
RUN npm install --include=dev --audit=false
# Install all dependencies with cache mount for faster rebuilds
RUN --mount=type=cache,target=/root/.npm \
npm install --include=dev --audit=false --progress=false
# Next, copy the source files using the user set
# in the base image.
@@ -33,14 +34,16 @@ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
# 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 \
RUN --mount=type=cache,target=/root/.npm \
npm --quiet set progress=false \
&& npm install --omit=dev --progress=false \
&& echo "Installed NPM packages:" \
&& (npm list --omit=dev --all || true) \
&& echo "Node.js version:" \
&& node --version \
&& echo "NPM version:" \
&& npm --version
&& npm --version \
&& npm run get-binaries
# Next, copy the remaining files and directories with the source code.
# Since we do this after NPM install, quick build will be really fast
File diff suppressed because it is too large Load Diff
+9 -8
View File
@@ -1,29 +1,30 @@
{
"name": "job-flow",
"name": "gradcracker-extractor",
"version": "0.0.1",
"type": "module",
"description": "This is an example of a Crawlee project.",
"dependencies": {
"camoufox-js": "^0.8.0",
"crawlee": "^3.0.0",
"playwright": "*"
"playwright": "*",
"tsx": "^4.4.0"
},
"devDependencies": {
"@apify/tsconfig": "^0.1.0",
"@types/fs-extra": "^11",
"@types/node": "^24.0.0",
"fs-extra": "^11.3.0",
"tsx": "^4.4.0",
"typescript": "~5.9.0"
},
"optionalDependencies": {
"impit-linux-x64-gnu": "^0.1.0"
},
"scripts": {
"start": "npm run start:dev",
"start:prod": "node dist/main.js",
"start": "tsx src/main.ts",
"start:dev": "tsx src/main.ts",
"build": "tsc",
"check:types": "tsc --noEmit",
"test": "echo \"Error: oops, the actor has no tests yet, sad!\" && exit 1",
"get-binaries": "camoufox-js fetch",
"postinstall": "npm run get-binaries"
"get-binaries": "camoufox-js fetch"
},
"author": "It's not you it's me",
"license": "ISC"