Skip to content

Commit

Permalink
Use node_modules/.cache/... as cacheRoot (#329)
Browse files Browse the repository at this point in the history
- instead of outputting these to app root and requiring users to
  gitignore these directories, just output to node_modules/.cache/
  - rollup-plugin-typescript2 is the default cache directory, so this
    initially appended _${opts.format} to it
    - upon code review, changed it to tsdx/${opts.format}/
    - babel-loader similarly uses node_modules/.cache/babel-loader
      as its default cache directory and does not allow users to
      change it
      - parcel uses node_modules/.cache/parcel too
      - fuse-box uses node_modules/.fusebox
  • Loading branch information
agilgur5 authored and jaredpalmer committed Dec 3, 2019
1 parent 3261dea commit 55c0d47
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
*.log
.DS_Store
node_modules
.rts2_cache_cjs
.rts2_cache_esm
.rts2_cache_umd
.rts2_cache_system
dist
tester
tester-react
Expand Down
2 changes: 1 addition & 1 deletion src/createRollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function createRollupConfig(opts: TsdxOptions) {
},
typescript({
typescript: require('typescript'),
cacheRoot: `./.rts2_cache_${opts.format}`,
cacheRoot: `./node_modules/.cache/tsdx/${opts.format}/`,
tsconfig: opts.tsconfig,
tsconfigDefaults: {
compilerOptions: {
Expand Down
4 changes: 0 additions & 4 deletions templates/basic/gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
*.log
.DS_Store
node_modules
.rts2_cache_cjs
.rts2_cache_esm
.rts2_cache_umd
.rts2_cache_system
dist
4 changes: 0 additions & 4 deletions templates/react/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@
.DS_Store
node_modules
.cache
.rts2_cache_cjs
.rts2_cache_esm
.rts2_cache_umd
.rts2_cache_system
dist

0 comments on commit 55c0d47

Please sign in to comment.