Skip to content

Commit

Permalink
chore: Organize project (#1849)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Jun 24, 2021
1 parent 4cd4337 commit ff440d4
Show file tree
Hide file tree
Showing 29 changed files with 34 additions and 167 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
tool: "cargo"
# Where the output from the benchmark tool is stored
output-file-path: output.txt
external-data-json-path: ./raw-data/$GITHUB_SHA/benchmark-data.json
external-data-json-path: ./raw-data/$${{ github.sha }}/benchmark-data.json
# Workflow will fail when an alert happens
fail-on-alert: true
# GitHub API token to make a commit comment
Expand All @@ -67,7 +67,8 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
branch: gh-pages
folder: raw-data
clean: false
single-commit: false
git-config-email: github-bot@swc.rs
repository-name: swc-project/raw-data
commit-message: "Update"
single-commit: true
32 changes: 16 additions & 16 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,37 +82,37 @@ jobs:
- name: (swc) three.js
run: |
export PATH="$PATH:$HOME/npm/bin"
mkdir -p integration-tests/three-js
mkdir -p tests/integration/three-js
npm i -g qunit failonlyreporter
# Download three.js
git clone --depth 1 https://github.com/mrdoob/three.js.git -b r117 integration-tests/three-js/repo
git clone --depth 1 https://github.com/mrdoob/three.js.git -b r117 tests/integration/three-js/repo
swc --sync integration-tests/three-js/repo/ -d integration-tests/three-js/build/
# swc integration-tests/three-js/repo/src/ -d integration-tests/three-js/repo/build/
# swc integration-tests/three-js/repo/test/unit/**/*.js -d integration-tests/three-js/repo/test/unit/build/
swc --sync tests/integration/three-js/repo/ -d tests/integration/three-js/build/
# swc tests/integration/three-js/repo/src/ -d tests/integration/three-js/repo/build/
# swc tests/integration/three-js/repo/test/unit/**/*.js -d tests/integration/three-js/repo/test/unit/build/
(cd integration-tests/three-js/build/test && qunit -r failonlyreporter unit/three.source.unit.js)
(cd tests/integration/three-js/build/test && qunit -r failonlyreporter unit/three.source.unit.js)
# terser: contains with statement in test
# Rome.js: I forgot the cause, but it didn't work.
# jQuery: browser only (window.document is required)
- name: (swc) redux
run: |
export PATH="$PATH:$HOME/npm/bin"
mkdir -p integration-tests/redux
mkdir -p tests/integration/redux
npm i -g qunit failonlyreporter
# Download
git clone --depth 1 https://github.com/reduxjs/redux.git -b v4.1.0 integration-tests/redux/repo
swc --sync integration-tests/redux/repo/src/ -d integration-tests/redux/repo/lib/
echo "module.exports=require('./index')" > integration-tests/redux/repo/lib/redux.js
swc --sync integration-tests/redux/repo/src/ -d integration-tests/redux/repo/test/
swc --sync integration-tests/redux/repo/test/ -d integration-tests/redux/repo/test/
(cd integration-tests/redux/repo && npm i)
(cd integration-tests/redux/repo && npx jest '.*.js' --modulePathIgnorePatterns 'typescript')
git clone --depth 1 https://github.com/reduxjs/redux.git -b v4.1.0 tests/integration/redux/repo
swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/lib/
echo "module.exports=require('./index')" > tests/integration/redux/repo/lib/redux.js
swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/test/
swc --sync tests/integration/redux/repo/test/ -d tests/integration/redux/repo/test/
(cd tests/integration/redux/repo && npm i)
(cd tests/integration/redux/repo && npx jest '.*.js' --modulePathIgnorePatterns 'typescript')
- name: (spack) example react app
run: |
export PATH="$PATH:$HOME/npm/bin"
(cd spack/integration-tests/react && npm i && npx spack)
(cd spack/tests/integration/react && npm i && npx spack)
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ wasm/
**/benches/
**/target/
*.svg
integration-tests/

# napi is cool
*.rs
Expand Down
78 changes: 0 additions & 78 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cargo-features = ["strip"]

[workspace]
members = ["ecmascript", "ecmascript/jsdoc", "native", "wasm"]
members = ["ecmascript", "ecmascript/jsdoc", "node/binding", "wasm"]

[package]
authors = ["강동윤 <kdy1997.dev@gmail.com>"]
Expand Down
18 changes: 9 additions & 9 deletions native/Cargo.toml → node/binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ napi-derive = {version = "1"}
path-clean = "0.1"
serde = {version = "1", features = ["derive"]}
serde_json = "1"
spack = {path = "../spack"}
swc = {path = "../"}
swc_atoms = {version = "0.2.4", path = "../atoms"}
swc_babel_compat = {path = "../babel/compat"}
swc_bundler = {path = "../bundler"}
swc_common = {path = "../common", features = ["tty-emitter", "sourcemap"]}
swc_ecma_ast = {path = "../ecmascript/ast"}
swc_ecma_parser = {path = "../ecmascript/parser"}
swc_node_base = {path = "../node/base"}
spack = {path = "../../spack"}
swc = {path = "../../"}
swc_atoms = {version = "0.2.4", path = "../../atoms"}
swc_babel_compat = {path = "../../babel/compat"}
swc_bundler = {path = "../../bundler"}
swc_common = {path = "../../common", features = ["tty-emitter", "sourcemap"]}
swc_ecma_ast = {path = "../../ecmascript/ast"}
swc_ecma_parser = {path = "../../ecmascript/parser"}
swc_node_base = {path = "../base"}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc/core",
"version": "1.2.61",
"version": "1.2.62",
"description": "Super-fast alternative for babel",
"homepage": "https://swc.rs",
"main": "./index.js",
Expand Down
19 changes: 0 additions & 19 deletions scripts/coverage.sh

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/cron/update-coverage.sh

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/prepare-integration.sh

This file was deleted.

3 changes: 1 addition & 2 deletions spack/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ wasm/
**/tests/
**/benches/
**/target/
*.svg
integration-tests/
*.svg
3 changes: 2 additions & 1 deletion spack/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use test::Bencher;
fn three_js(b: &mut Bencher) {
let dir = PathBuf::new()
.join("..")
.join("integration-tests")
.join("tests")
.join("integration")
.join("three-js")
.join("repo");
run_bench(b, &dir.join("src").join("Three.js"));
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions tests/projects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,6 @@ fn par_project(dir: &str) {
.expect("");
}

#[test]
#[ignore]
fn angular_core() {
par_project("integration-tests/angular/packages/core/src");
}

//#[test]
//fn rxjs() {
// par_project("integration-tests/rxjs/repo/src");
//}
//
//#[test]
//fn webpack() {
// par_project("integration-tests/webpack/repo/lib");
//}

/// should respect modules config in .swcrc
#[test]
fn issue_225() {
Expand Down
2 changes: 1 addition & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Apache-2.0/MIT"
name = "wasm"
publish = false
repository = "https://github.com/swc-project/swc.git"
version = "1.2.61"
version = "1.2.62"

[lib]
crate-type = ["cdylib"]
Expand Down

0 comments on commit ff440d4

Please sign in to comment.