Skip to content

Commit

Permalink
chore: migrate from rspack main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
LingyuCoder committed Sep 23, 2024
0 parents commit 7a73444
Show file tree
Hide file tree
Showing 206 changed files with 36,669 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "schedule:monthly", "group:allNonMajor"],
"rangeStrategy": "bump",
"packageRules": [{ "depTypeList": ["peerDependencies"], "enabled": false }]
}
79 changes: 79 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

name: Release Full

on:
workflow_dispatch:
inputs:
version:
type: choice
description: "Release Version Type"
required: true
default: "patch"
options:
- major
- premajor
- minor
- preminor
- patch
- prepatch
- prerelease

tag:
type: choice
description: "Release Npm Tag"
required: true
default: "latest"
options:
- canary
- nightly
- latest
- beta
- alpha

dry_run:
type: boolean
description: "DryRun release"
required: true
default: false

permissions:
# To publish packages with provenance
id-token: write

jobs:
release:
name: Release
permissions:
contents: write
# To publish packages with provenance
id-token: write
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install Dependencies
run: pnpm install

- name: Run Test
run: pnpm run test

- name: Try release to npm
run: pnpm run release
env:
DRY_RUN: ${{ inputs.dry_run }}
TAG: ${{ inputs.tag }}
VERSION: ${{ inputs.version }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}


36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

# Controls when the action will run.
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [main]
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Pnpm
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install Dependencies
run: pnpm install

- name: Run Test
run: pnpm run test
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Local
.DS_Store
*.local
*.log*

# Dist
node_modules
dist/
test-results

# Test
test/js/

# IDE
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
.idea
*.tsbuildinfo


4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry=https://registry.npmjs.org/

# The package of the same name conflicts with node:buffer and it will affect our ci results. https://www.npmjs.com/package/buffer
hoist-pattern[]=!buffer
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"rust-lang.rust-analyzer",
"fabiospampinato.vscode-debug-launcher"
]
}
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"search.useIgnoreFiles": true,
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @rspack/dev-server
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2022-present Bytedance, Inc. and its affiliates.


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://assets.rspack.dev/rspack/rspack-banner-plain-dark.png">
<img alt="Rspack Banner" src="https://assets.rspack.dev/rspack/rspack-banner-plain-light.png">
</picture>

# @rspack/dev-server

Development server for rspack.

## Documentation

See [https://rspack.dev](https://rspack.dev) for details.

## License

Rspack is [MIT licensed](https://github.com/web-infra-dev/rspack/blob/main/LICENSE).
Loading

0 comments on commit 7a73444

Please sign in to comment.