File tree Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Expand file tree Collapse file tree 3 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ echo 'extends: ["@stoplight/spectral-documentation"]' > .spectral.yaml
2525_ If you're using VS Code or Stoplight Studio then the NPM modules will not be available. Instead you can use the CDN hosted version:_
2626
2727```
28- echo 'extends: ["https://unpkg.com/@stoplight/spectral-documentation@1.0.0 /dist/ruleset.js "]' > .spectral.yaml
28+ echo 'extends: ["https://unpkg.com/@stoplight/spectral-documentation/dist/ruleset.mjs "]' > .spectral.yaml
2929```
3030
3131_ ** Note:** You need to use the full URL with CDN hosted rulesets because Spectral [ cannot follow redirects through extends] ( https://github.com/stoplightio/spectral/issues/2266 ) ._
Original file line number Diff line number Diff line change 4848 "ts-jest" : " ^28.0" ,
4949 "tsup" : " ^6.2.3" ,
5050 "typescript" : " ^4.8.4"
51- },
52- "tsup" : {
53- "entry" : [
54- " src/ruleset.ts"
55- ],
56- "clean" : true ,
57- "dts" : true ,
58- "format" : [
59- " cjs" ,
60- " esm"
61- ],
62- "sourcemap" : true ,
63- "noExternal" : [
64- " @stoplight/types"
65- ],
66- "external" : [
67- " @stoplight/spectral-core"
68- ],
69- "footer" : {
70- "js" : " module.exports = module.exports.default;"
71- }
7251 }
7352}
Original file line number Diff line number Diff line change 1+ import type { Options } from 'tsup' ;
2+
3+ export default < Options > {
4+ entry : [ "src/ruleset.ts" ] ,
5+ clean : true ,
6+ dts : true ,
7+ target : "es2018" ,
8+ format : [ "cjs" , "esm" ] ,
9+ sourcemap : true ,
10+ noExternal : [ "@stoplight/types" ] ,
11+ external : [ "@stoplight/spectral-core" ] ,
12+ footer ( { format } ) {
13+ if ( format === "cjs" ) {
14+ return {
15+ js : "module.exports = module.exports.default;" ,
16+ } ;
17+ }
18+
19+ return { } ;
20+ } ,
21+ } ;
You can’t perform that action at this time.
0 commit comments