mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
Switch from npm to pnpm for faster package installation (#1559)
This commit is contained in:
5
.changeset/slow-buses-breathe.md
Normal file
5
.changeset/slow-buses-breathe.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tabler/core": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Switch from `npm` to `pnpm` for faster package installation
|
||||||
12
.github/workflows/bundlewatch.yml
vendored
12
.github/workflows/bundlewatch.yml
vendored
@@ -23,7 +23,9 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE }}"
|
node-version: "${{ env.NODE }}"
|
||||||
cache: npm
|
|
||||||
|
- name: Install PNPM
|
||||||
|
run: npm i -g pnpm
|
||||||
|
|
||||||
- name: Set up Bundler
|
- name: Set up Bundler
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
@@ -31,14 +33,14 @@ jobs:
|
|||||||
ruby-version: 2.6
|
ruby-version: 2.6
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
- name: Install npm dependencies
|
- name: Install pnpm dependencies
|
||||||
run: npm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Run build
|
- name: Run build
|
||||||
run: npm run build
|
run: pnpm run build
|
||||||
|
|
||||||
- name: Run bundlewatch
|
- name: Run bundlewatch
|
||||||
run: npm run bundlewatch
|
run: pnpm run bundlewatch
|
||||||
env:
|
env:
|
||||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||||
CI_BRANCH_BASE: dev
|
CI_BRANCH_BASE: dev
|
||||||
|
|||||||
2
.github/workflows/lockfiles.yaml
vendored
2
.github/workflows/lockfiles.yaml
vendored
@@ -22,5 +22,5 @@ jobs:
|
|||||||
uses: xalvarez/prevent-file-change-action@v1
|
uses: xalvarez/prevent-file-change-action@v1
|
||||||
with:
|
with:
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
pattern: Gemfile.lock|package-lock.json
|
pattern: Gemfile.lock|pnpm-lock.json
|
||||||
trustedAuthors: codecalm, dependabot
|
trustedAuthors: codecalm, dependabot
|
||||||
|
|||||||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "${{ env.NODE }}"
|
node-version: "${{ env.NODE }}"
|
||||||
cache: npm
|
cache: pnpm
|
||||||
|
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
@@ -32,8 +32,8 @@ jobs:
|
|||||||
- run: ruby --version
|
- run: ruby --version
|
||||||
- run: node --version
|
- run: node --version
|
||||||
|
|
||||||
- name: Install npm dependencies
|
- name: Install pnpm dependencies
|
||||||
run: npm install
|
run: pnpm install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: pnpm run build
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,3 +30,4 @@ node_modules/
|
|||||||
.yarn
|
.yarn
|
||||||
.next
|
.next
|
||||||
.vercel
|
.vercel
|
||||||
|
package-lock.json
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- init: npm install && npm run build
|
- init: pnpm install && pnpm run build
|
||||||
command: npm run start
|
command: pnpm run start
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM ruby:2.7-alpine
|
FROM ruby:2.7-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache nodejs npm && \
|
RUN apk add --no-cache nodejs pnpm && \
|
||||||
apk add --no-cache --virtual build-dependencies build-base
|
apk add --no-cache --virtual build-dependencies build-base
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -14,7 +14,7 @@ ADD _config.yml /app/
|
|||||||
ADD gulpfile.js /app/
|
ADD gulpfile.js /app/
|
||||||
|
|
||||||
# RUN apk update && apk add --virtual build-dependencies build-base
|
# RUN apk update && apk add --virtual build-dependencies build-base
|
||||||
RUN npm install
|
RUN pnpm install
|
||||||
RUN bundle config --global silence_root_warning 1 && bundler install --verbose
|
RUN bundle config --global silence_root_warning 1 && bundler install --verbose
|
||||||
|
|
||||||
# website
|
# website
|
||||||
@@ -24,4 +24,4 @@ EXPOSE 3000
|
|||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
# run tabler
|
# run tabler
|
||||||
ENTRYPOINT [ "npm", "run", "start-plugins" ]
|
ENTRYPOINT [ "pnpm", "run", "start-plugins" ]
|
||||||
12
README.md
12
README.md
@@ -75,13 +75,13 @@ Support this project by becoming a sponsor. Your logo will show up in this READM
|
|||||||
To use our build system and run our documentation locally, you'll need a copy of Tabler's source files. Follow the steps below:
|
To use our build system and run our documentation locally, you'll need a copy of Tabler's source files. Follow the steps below:
|
||||||
|
|
||||||
1. [Install Node.js](https://nodejs.org/download/), which we use to manage our dependencies.
|
1. [Install Node.js](https://nodejs.org/download/), which we use to manage our dependencies.
|
||||||
2. Navigate to the root `/tabler` directory and run `npm install` to install our local dependencies listed in `package.json`.
|
2. Navigate to the root `/tabler` directory and run `pnpm install` to install our local dependencies listed in `package.json`.
|
||||||
3. [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) - the recommended version is [2.7.6](https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz).
|
3. [Install Ruby](https://www.ruby-lang.org/en/documentation/installation/) - the recommended version is [2.7.6](https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.gz).
|
||||||
4. [Install Bundler](https://bundler.io) with `gem install bundler` and finally run `bundle install`. It will install all Ruby dependencies, such as [Jekyll and plugins](https://jekyllrb.com).
|
4. [Install Bundler](https://bundler.io) with `gem install bundler` and finally run `bundle install`. It will install all Ruby dependencies, such as [Jekyll and plugins](https://jekyllrb.com).
|
||||||
|
|
||||||
**OSX users**:
|
**OSX users**:
|
||||||
|
|
||||||
1. NPM ```npm install```
|
1. NPM ```pnpm install```
|
||||||
2. install Ruby (2.5.* recommended)
|
2. install Ruby (2.5.* recommended)
|
||||||
```brew install ruby @2.5```
|
```brew install ruby @2.5```
|
||||||
3. install bundler
|
3. install bundler
|
||||||
@@ -108,17 +108,17 @@ Once you complete the setup, you'll be able to run the various commands provided
|
|||||||
|
|
||||||
## Build locally
|
## Build locally
|
||||||
|
|
||||||
You need to have `npm` and `bundler` installed.
|
You need to have `pnpm` and `bundler` installed.
|
||||||
|
|
||||||
1. From the root `/tabler` directory, run installation in the command line:
|
1. From the root `/tabler` directory, run installation in the command line:
|
||||||
- `npm install`
|
- `pnpm install`
|
||||||
- `bundler install`
|
- `bundler install`
|
||||||
2. Then execute `npm run start-plugins` to start up the application stack.
|
2. Then execute `pnpm run start-plugins` to start up the application stack.
|
||||||
3. Open [http://localhost:3000](http://localhost:3000) in your browser, and voilà.
|
3. Open [http://localhost:3000](http://localhost:3000) in your browser, and voilà.
|
||||||
4. Any change in the `/src` directory will build the application and refresh the page.
|
4. Any change in the `/src` directory will build the application and refresh the page.
|
||||||
|
|
||||||
**Note**:
|
**Note**:
|
||||||
Run `npm run build` for reforms a one off build application without refresh.
|
Run `pnpm run build` for reforms a one off build application without refresh.
|
||||||
Open [http://localhost:3001](http://localhost:3001) to configure the Web server.
|
Open [http://localhost:3001](http://localhost:3001) to configure the Web server.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|||||||
32653
package-lock.json
generated
32653
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@
|
|||||||
"chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN",
|
"chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN",
|
||||||
"storybook": "start-storybook -p 6006",
|
"storybook": "start-storybook -p 6006",
|
||||||
"changelog": "gulp changelog",
|
"changelog": "gulp changelog",
|
||||||
"icons": "ncu -u @tabler/icons && npm install && gulp svg-icons && git add . && git commit -am \"update icons to v`npm info @tabler/icons version`\" && git push",
|
"icons": "ncu -u @tabler/icons && pnpm install && gulp svg-icons && git add . && git commit -am \"update icons to v`pnpm info @tabler/icons version`\" && git push",
|
||||||
"download-images": "node build/download-images.js",
|
"download-images": "node build/download-images.js",
|
||||||
"optimize-images": "for i in ./src/static/photos/*.jpg; do convert \"$i\" -quality 80% \"${i%.jpg}.jpg\"; done",
|
"optimize-images": "for i in ./src/static/photos/*.jpg; do convert \"$i\" -quality 80% \"${i%.jpg}.jpg\"; done",
|
||||||
"format:check": "prettier --check src/**/*.{js,scss} --cache",
|
"format:check": "prettier --check src/**/*.{js,scss} --cache",
|
||||||
|
|||||||
9726
pnpm-lock.yaml
generated
Normal file
9726
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user