Skip to content

Commit fa2d2ba

Browse files
Merge branch 'main' into multiple-files
2 parents 05d497f + 82b70f2 commit fa2d2ba

File tree

14 files changed

+8556
-1926
lines changed

14 files changed

+8556
-1926
lines changed

.DS_Store

-6 KB
Binary file not shown.

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ storage
88

99
# installed files
1010
node_modules
11+
12+
# ignore base image 'main.js'
13+
main.js

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build workflow
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
build:
9+
name: build
10+
runs-on: ubuntu-latest
11+
env:
12+
CI_JOB_NUMBER: 1
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2
16+
with:
17+
cache: npm
18+
node-version: 18
19+
- run: npm i
20+
- run: npm run build
21+
- uses: preactjs/compressed-size-action@v2
22+
with:
23+
pattern: ".dist/**/*.{js,ts,json}"

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
cache: npm
17+
node-version: 18
18+
- run: npm i
19+
- run: npm run build
20+
- run: npm run semantic-release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ storage
99
.DS_Store
1010

1111
!package.json
12+
!package-lock.json
13+
!tsconfig.json
1214

1315
# any output from the crawler
14-
*.json
16+
*.json
17+
pnpm-lock.yaml

.releaserc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/changelog",
8+
"@semantic-release/npm",
9+
"@semantic-release/git",
10+
"@semantic-release/github"
11+
]
12+
}

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ RUN npm --quiet set progress=false \
4545
# for most source file changes.
4646
COPY --chown=myuser . ./
4747

48-
4948
# Run the image. If you know you won't need headful browsers,
5049
# you can remove the XVFB start script for a micro perf gain.
51-
CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent
50+
CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod --silent

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

License

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License
2+
3+
Copyright (c) 2023 BuilderIO
4+
5+
Permission to use, copy, modify, and/or distribute this software for any purpose
6+
with or without fee is hereby granted, provided that the above copyright notice
7+
and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
13+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
14+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
15+
THIS SOFTWARE.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ See [config.ts](src/config.ts) for all available options. Here is a sample of th
6868

6969
```ts
7070
type Config = {
71-
/** URL to start the crawl */
71+
/** URL to start the crawl, if sitemap is provided then it will be used instead and download all pages in the sitemap */
7272
url: string;
7373
/** Pattern to match against for links on a page to subsequently crawl */
7474
match: string;
@@ -78,6 +78,12 @@ type Config = {
7878
maxPagesToCrawl: number;
7979
/** File name for the finished data */
8080
outputFileName: string;
81+
/** Optional resources to exclude
82+
*
83+
* @example
84+
* ['png','jpg','jpeg','gif','svg','css','js','ico','woff','woff2','ttf','eot','otf','mp4','mp3','webm','ogg','wav','flac','aac','zip','tar','gz','rar','7z','exe','dmg','apk','csv','xls','xlsx','doc','docx','pdf','epub','iso','dmg','bin','ppt','pptx','odt','avi','mkv','xml','json','yml','yaml','rss','atom','swf','txt','dart','webp','bmp','tif','psd','ai','indd','eps','ps','zipx','srt','wasm','m4v','m4a','webp','weba','m4b','opus','ogv','ogm','oga','spx','ogx','flv','3gp','3g2','jxr','wdp','jng','hief','avif','apng','avifs','heif','heic','cur','ico','ani','jp2','jpm','jpx','mj2','wmv','wma','aac','tif','tiff','mpg','mpeg','mov','avi','wmv','flv','swf','mkv','m4v','m4p','m4b','m4r','m4a','mp3','wav','wma','ogg','oga','webm','3gp','3g2','flac','spx','amr','mid','midi','mka','dts','ac3','eac3','weba','m3u','m3u8','ts','wpl','pls','vob','ifo','bup','svcd','drc','dsm','dsv','dsa','dss','vivo','ivf','dvd','fli','flc','flic','flic','mng','asf','m2v','asx','ram','ra','rm','rpm','roq','smi','smil','wmf','wmz','wmd','wvx','wmx','movie','wri','ins','isp','acsm','djvu','fb2','xps','oxps','ps','eps','ai','prn','svg','dwg','dxf','ttf','fnt','fon','otf','cab']
85+
*/
86+
resourceExclusions?: string[];
8187
/** Optional maximum file size in megabytes to include in the output file */
8288
maxFileSize?: number().,
8389
/** Optional maximum number tokens to include in the output file */

0 commit comments

Comments
 (0)