-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support
compileExcludes
for transform
- Loading branch information
Showing
16 changed files
with
405 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@ice/pkg': minor | ||
--- | ||
|
||
feat: support `compileExcludes` options for transform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@ice/pkg-tests-fixtures-transform-excludes", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"@ice/pkg": "workspace:*" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/pkg/tests/fixtures/transform-excludes/src/index.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
console.log(path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const title = 'index' |
1 change: 1 addition & 0 deletions
1
packages/pkg/tests/fixtures/transform-excludes/src/nested/n1.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.foo { color: red; } |
3 changes: 3 additions & 0 deletions
3
packages/pkg/tests/fixtures/transform-excludes/src/nested/n1.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
console.log(path); |
1 change: 1 addition & 0 deletions
1
packages/pkg/tests/fixtures/transform-excludes/src/nested/n1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const path = 'nested/n1' |
1 change: 1 addition & 0 deletions
1
packages/pkg/tests/fixtures/transform-excludes/src/nested/n2.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const path = 'nested/n2' |
305 changes: 305 additions & 0 deletions
305
packages/pkg/tests/projects/__snapshots__/transform-excludes.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,305 @@ | ||
// Vitest Snapshot v1 | ||
|
||
exports[`Run config compile-excludes > cjs structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.js", | ||
}, | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
{ | ||
"name": "n2.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "cjs", | ||
} | ||
`; | ||
|
||
exports[`Run config compile-excludes > dist structure 1`] = `null`; | ||
|
||
exports[`Run config compile-excludes > es2017 structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.js", | ||
}, | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
{ | ||
"name": "n2.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "es2017", | ||
} | ||
`; | ||
|
||
exports[`Run config compile-excludes > esm structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.js", | ||
}, | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
{ | ||
"name": "n2.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "esm", | ||
} | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/index.js 1`] = ` | ||
"\\"use strict\\"; | ||
Object.defineProperty(exports, \\"__esModule\\", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, \\"title\\", { | ||
enumerable: true, | ||
get: function() { | ||
return title; | ||
} | ||
}); | ||
var title = \\"index\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/index.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/nested/n1.js 1`] = ` | ||
"\\"use strict\\"; | ||
Object.defineProperty(exports, \\"__esModule\\", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, \\"path\\", { | ||
enumerable: true, | ||
get: function() { | ||
return path; | ||
} | ||
}); | ||
var path = \\"nested/n1\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/nested/n1.less 1`] = ` | ||
".foo { color: red; } | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/nested/n1.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content cjs/nested/n2.js 1`] = ` | ||
"\\"use strict\\"; | ||
Object.defineProperty(exports, \\"__esModule\\", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, \\"path\\", { | ||
enumerable: true, | ||
get: function() { | ||
return path; | ||
} | ||
}); | ||
var path = \\"nested/n2\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/index.js 1`] = ` | ||
"export const title = 'index'; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/index.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/nested/n1.js 1`] = ` | ||
"export const path = 'nested/n1'; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/nested/n1.less 1`] = ` | ||
".foo { color: red; } | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/nested/n1.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content es2017/nested/n2.js 1`] = ` | ||
"export const path = 'nested/n2'; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/index.js 1`] = ` | ||
"export var title = \\"index\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/index.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/nested/n1.js 1`] = ` | ||
"export var path = \\"nested/n1\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/nested/n1.less 1`] = ` | ||
".foo { color: red; } | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/nested/n1.min.js 1`] = ` | ||
"'use strict'; | ||
const path = require('path'); | ||
console.log(path); | ||
" | ||
`; | ||
|
||
exports[`Run config compile-excludes > file content esm/nested/n2.js 1`] = ` | ||
"export var path = \\"nested/n2\\"; | ||
" | ||
`; | ||
|
||
exports[`Run config excludes > cjs structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "cjs", | ||
} | ||
`; | ||
|
||
exports[`Run config excludes > dist structure 1`] = `null`; | ||
|
||
exports[`Run config excludes > es2017 structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "es2017", | ||
} | ||
`; | ||
|
||
exports[`Run config excludes > esm structure 1`] = ` | ||
{ | ||
"files": [ | ||
{ | ||
"name": "index.js", | ||
}, | ||
{ | ||
"name": "index.min.js", | ||
}, | ||
{ | ||
"files": [ | ||
{ | ||
"name": "n1.less", | ||
}, | ||
{ | ||
"name": "n1.min.js", | ||
}, | ||
], | ||
"name": "nested", | ||
}, | ||
], | ||
"name": "esm", | ||
} | ||
`; |
Oops, something went wrong.