Skip to content

Commit aa8eb52

Browse files
authored
Merge pull request #1 from imagekit-developer/dev
2 parents 61e6846 + 1081953 commit aa8eb52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+13711
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
pack:
9+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: ⬇️ Check out code
14+
uses: actions/checkout@v4
15+
16+
- name: 🟢 Enable Corepack
17+
run: corepack enable
18+
19+
- name: 🟢 Set up Node 20
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20.x
23+
cache: yarn
24+
25+
- name: 📦 Install deps, build, pack
26+
run: |
27+
yarn install --frozen-lockfile
28+
yarn package
29+
env:
30+
CI: true
31+
32+
- name: 📤 Upload package artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: imagekit-editor-package
36+
path: builds/imagekit-editor-*.tgz

.github/workflows/node-publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- name: ⬇️ Check out code
15+
uses: actions/checkout@v4
16+
17+
- name: 🟢 Enable Corepack
18+
run: corepack enable
19+
20+
- name: 🟢 Set up Node 20
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20.x
24+
cache: yarn
25+
registry-url: 'https://registry.npmjs.org'
26+
27+
- name: Build and Publish
28+
run: |
29+
yarn install --frozen-lockfile
30+
31+
yarn build
32+
33+
# print the NPM user name for validation
34+
npm whoami
35+
36+
VERSION=$(node -p "require('./package.json').version" )
37+
38+
# Only publish stable versions to the latest tag
39+
if [[ "$VERSION" =~ ^[^-]+$ ]]; then
40+
NPM_TAG="latest"
41+
else
42+
NPM_TAG="beta"
43+
fi
44+
45+
echo "Publishing $VERSION with $NPM_TAG tag."
46+
47+
yarn workspace @imagekit/editor npm publish --tag "$NPM_TAG" --provenance --access public
48+
49+
env:
50+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
51+
CI: true

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.DS_*
2+
*.log
3+
logs
4+
**/*.backup.*
5+
**/*.back.*
6+
7+
node_modules
8+
bower_components
9+
10+
*.sublime*
11+
12+
psd
13+
thumb
14+
sketch
15+
16+
packages/imagekit-editor/dist/*
17+
packages/imagekit-editor/*.tgz
18+
.turbo
19+
.yarn
20+
builds

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.13.0

.vscode/settings.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"editor.tabSize": 2,
3+
"typescript.preferences.importModuleSpecifier": "relative",
4+
"editor.formatOnSave": true,
5+
"editor.formatOnSaveMode": "file",
6+
"editor.codeActionsOnSave": {
7+
"source.organizeImports.biome": "explicit",
8+
"source.fixAll.biome": "explicit"
9+
},
10+
"typescript.tsdk": "node_modules/typescript/lib",
11+
"editor.defaultFormatter": "biomejs.biome",
12+
"[json]": {
13+
"editor.defaultFormatter": "biomejs.biome"
14+
},
15+
"[typescript]": {
16+
"editor.defaultFormatter": "biomejs.biome"
17+
},
18+
"[typescriptreact]": {
19+
"editor.defaultFormatter": "biomejs.biome"
20+
}
21+
}

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

0 commit comments

Comments
 (0)