-
Notifications
You must be signed in to change notification settings - Fork 916
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSA - move config back into templates, out of app-scripts-* packages (#…
…1137) * update templates to stop using app-scripts for snowpack, babel, tsc config * Update package.json
- Loading branch information
1 parent
df59d47
commit 54fadca
Showing
36 changed files
with
245 additions
and
131 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
14 changes: 14 additions & 0 deletions
14
create-snowpack-app/app-template-lit-element-typescript/snowpack.config.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,14 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: [ | ||
'@snowpack/plugin-babel', | ||
'@snowpack/plugin-dotenv', | ||
[ | ||
'@snowpack/plugin-run-script', | ||
{ cmd: 'tsc --noEmit', watch: '$1 --watch' }, | ||
], | ||
], | ||
}; |
4 changes: 0 additions & 4 deletions
4
create-snowpack-app/app-template-lit-element-typescript/snowpack.config.json
This file was deleted.
Oops, something went wrong.
35 changes: 20 additions & 15 deletions
35
create-snowpack-app/app-template-lit-element-typescript/tsconfig.json
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 |
---|---|---|
@@ -1,20 +1,25 @@ | ||
{ | ||
"extends": "@snowpack/app-scripts-lit-element/tsconfig.base.json", | ||
"include": ["src", "types"], | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
// LitElement makes use of experimental decorator syntax. | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
// You can't currently define paths in your 'extends' config, | ||
// so we have to set 'baseUrl' & 'paths' here. | ||
// Don't change these unless you know what you're doing. | ||
// See: https://github.com/microsoft/TypeScript/issues/25430 | ||
"baseUrl": "./", | ||
/* more strict checking for errors that per-file transpilers like `esbuild` would crash */ | ||
"isolatedModules": true, | ||
"paths": { "*": ["web_modules/.types/*"] } | ||
// Feel free to add/edit new config options below: | ||
// ... | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "preserve", | ||
"baseUrl": "./", | ||
/* paths - If you configure Snowpack import aliases, add them here. */ | ||
"paths": {}, | ||
/* noEmit - Snowpack builds (emits) files, not tsc. */ | ||
"noEmit": true, | ||
/* LitElement - Add decorator support! */ | ||
"experimentalDecorators": true, | ||
"emitDecoratorMetadata": true, | ||
/* Additional Options */ | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"importsNotUsedAsValues": "error", | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
create-snowpack-app/app-template-lit-element/snowpack.config.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,7 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: ['@snowpack/plugin-babel', '@snowpack/plugin-dotenv'], | ||
}; |
4 changes: 0 additions & 4 deletions
4
create-snowpack-app/app-template-lit-element/snowpack.config.json
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,23 @@ | ||
{ | ||
"extends": "@snowpack/app-scripts-preact/babel.config.json" | ||
"presets": [ | ||
[ | ||
"@babel/preset-react", | ||
{ | ||
"pragma": "h", | ||
"pragmaFrag": "Fragment" | ||
} | ||
], | ||
[ | ||
"@babel/preset-typescript", | ||
{ | ||
"jsxPragma": "h" | ||
} | ||
] | ||
], | ||
"plugins": ["@babel/plugin-syntax-import-meta"], | ||
"env": { | ||
"development": { | ||
"plugins": ["@prefresh/babel-plugin"] | ||
} | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
create-snowpack-app/app-template-preact/snowpack.config.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,11 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: [ | ||
'@snowpack/plugin-babel', | ||
'@snowpack/plugin-dotenv', | ||
'@prefresh/snowpack', | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
8 changes: 7 additions & 1 deletion
8
create-snowpack-app/app-template-react-typescript/babel.config.json
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"extends": "@snowpack/app-scripts-react/babel.config.json" | ||
"presets": [["@babel/preset-react"], "@babel/preset-typescript"], | ||
"plugins": ["@babel/plugin-syntax-import-meta"], | ||
"env": { | ||
"development": { | ||
"plugins": ["react-refresh/babel"] | ||
} | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
create-snowpack-app/app-template-react-typescript/snowpack.config.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,12 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: [ | ||
'@snowpack/plugin-react-refresh', | ||
'@snowpack/plugin-babel', | ||
'@snowpack/plugin-dotenv', | ||
['@snowpack/plugin-run-script', {cmd: 'tsc --noEmit', watch: '$1 --watch'}], | ||
], | ||
}; |
4 changes: 0 additions & 4 deletions
4
create-snowpack-app/app-template-react-typescript/snowpack.config.json
This file was deleted.
Oops, something went wrong.
27 changes: 16 additions & 11 deletions
27
create-snowpack-app/app-template-react-typescript/tsconfig.json
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 |
---|---|---|
@@ -1,17 +1,22 @@ | ||
{ | ||
"include": ["src", "types"], | ||
"exclude": ["node_modules"], | ||
"extends": "@snowpack/app-scripts-react/tsconfig.base.json", | ||
"compilerOptions": { | ||
// You can't currently define paths in your 'extends' config, | ||
// so we have to set 'baseUrl' & 'paths' here. | ||
// Don't change these unless you know what you're doing. | ||
// See: https://github.com/microsoft/TypeScript/issues/25430 | ||
"baseUrl": "./", | ||
/* more strict checking for errors that per-file transpilers like `esbuild` would crash */ | ||
"isolatedModules": true, | ||
"paths": { "*": ["web_modules/.types/*"] } | ||
// Feel free to add/edit new config options below: | ||
// ... | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "preserve", | ||
"baseUrl": "./", | ||
/* paths - If you configure Snowpack import aliases, add them here. */ | ||
"paths": {}, | ||
/* noEmit - Snowpack builds (emits) files, not tsc. */ | ||
"noEmit": true, | ||
/* Additional Options */ | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"allowSyntheticDefaultImports": true, | ||
"importsNotUsedAsValues": "error", | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"extends": "@snowpack/app-scripts-react/babel.config.json" | ||
"presets": [["@babel/preset-react"]], | ||
"plugins": ["@babel/plugin-syntax-import-meta"], | ||
"env": { | ||
"development": { | ||
"plugins": ["react-refresh/babel"] | ||
} | ||
} | ||
} |
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,11 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: [ | ||
'@snowpack/plugin-react-refresh', | ||
'@snowpack/plugin-babel', | ||
'@snowpack/plugin-dotenv', | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
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
15 changes: 15 additions & 0 deletions
15
create-snowpack-app/app-template-svelte-typescript/snowpack.config.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,15 @@ | ||
module.exports = { | ||
mount: { | ||
public: '/', | ||
src: '/_dist_', | ||
}, | ||
plugins: [ | ||
'@snowpack/plugin-svelte', | ||
'@snowpack/plugin-dotenv', | ||
[ | ||
'@snowpack/plugin-run-script', | ||
{cmd: 'svelte-check --output human', watch: '$1 --watch', output: 'stream'}, | ||
], | ||
['@snowpack/plugin-run-script', {cmd: 'tsc --noEmit', watch: '$1 --watch'}], | ||
], | ||
}; |
23 changes: 0 additions & 23 deletions
23
create-snowpack-app/app-template-svelte-typescript/snowpack.config.json
This file was deleted.
Oops, something went wrong.
47 changes: 20 additions & 27 deletions
47
create-snowpack-app/app-template-svelte-typescript/tsconfig.json
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 |
---|---|---|
@@ -1,30 +1,23 @@ | ||
{ | ||
"extends": "@tsconfig/svelte/tsconfig.json", | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"target": "esnext", | ||
"jsx": "preserve", | ||
"allowSyntheticDefaultImports": true, | ||
/* more strict checking for errors that per-file transpilers like `esbuild` would crash */ | ||
"isolatedModules": true, | ||
/* noEmit - We only use TypeScript for type checking. */ | ||
"noEmit": true, | ||
/* Additional Options */ | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": true, | ||
|
||
// You can't currently define paths in your 'extends' config, | ||
// so we have to set 'baseUrl' & 'paths' here. | ||
// Don't change these unless you know what you're doing. | ||
// See: https://github.com/microsoft/TypeScript/issues/25430 | ||
"baseUrl": "./", | ||
"paths": {"*": ["web_modules/.types/*"]}, | ||
|
||
"types": ["snowpack-env", "svelte", "jest", "@testing-library/jest-dom"] | ||
}, | ||
"include": ["src", "types"], | ||
"exclude": ["node_modules"] | ||
"exclude": ["node_modules"], | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"jsx": "preserve", | ||
"baseUrl": "./", | ||
/* paths - If you configure Snowpack import aliases, add them here. */ | ||
"paths": {}, | ||
/* noEmit - Snowpack builds (emits) files, not tsc. */ | ||
"noEmit": true, | ||
/* Additional Options */ | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": true, | ||
"allowSyntheticDefaultImports": true, | ||
"importsNotUsedAsValues": "error", | ||
} | ||
} |
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
Oops, something went wrong.
54fadca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: