mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 09:24:24 +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
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
|
||||
- name: Install PNPM
|
||||
run: npm i -g pnpm
|
||||
|
||||
- name: Set up Bundler
|
||||
uses: ruby/setup-ruby@v1
|
||||
@@ -31,14 +33,14 @@ jobs:
|
||||
ruby-version: 2.6
|
||||
bundler-cache: true
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
- name: Install pnpm dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Run bundlewatch
|
||||
run: npm run bundlewatch
|
||||
run: pnpm run bundlewatch
|
||||
env:
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
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
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
pattern: Gemfile.lock|package-lock.json
|
||||
pattern: Gemfile.lock|pnpm-lock.json
|
||||
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
|
||||
with:
|
||||
node-version: "${{ env.NODE }}"
|
||||
cache: npm
|
||||
cache: pnpm
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
@@ -32,8 +32,8 @@ jobs:
|
||||
- run: ruby --version
|
||||
- run: node --version
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
- name: Install pnpm dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,3 +30,4 @@ node_modules/
|
||||
.yarn
|
||||
.next
|
||||
.vercel
|
||||
package-lock.json
|
||||
@@ -1,3 +1,3 @@
|
||||
tasks:
|
||||
- init: npm install && npm run build
|
||||
command: npm run start
|
||||
- init: pnpm install && pnpm run build
|
||||
command: pnpm run start
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
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
|
||||
|
||||
WORKDIR /app
|
||||
@@ -14,7 +14,7 @@ ADD _config.yml /app/
|
||||
ADD gulpfile.js /app/
|
||||
|
||||
# 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
|
||||
|
||||
# website
|
||||
@@ -24,4 +24,4 @@ EXPOSE 3000
|
||||
EXPOSE 3001
|
||||
|
||||
# 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:
|
||||
|
||||
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).
|
||||
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**:
|
||||
|
||||
1. NPM ```npm install```
|
||||
1. NPM ```pnpm install```
|
||||
2. install Ruby (2.5.* recommended)
|
||||
```brew install ruby @2.5```
|
||||
3. install bundler
|
||||
@@ -108,17 +108,17 @@ Once you complete the setup, you'll be able to run the various commands provided
|
||||
|
||||
## 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:
|
||||
- `npm install`
|
||||
- `pnpm 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à.
|
||||
4. Any change in the `/src` directory will build the application and refresh the page.
|
||||
|
||||
**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.
|
||||
|
||||
## 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",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"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",
|
||||
"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",
|
||||
|
||||
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