Skip to content

Commit

Permalink
feat: support Windows (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrothe authored May 31, 2021
1 parent 500272c commit 48a7506
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 52 deletions.
95 changes: 48 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@
"release": "yarn validate && standard-version"
},
"peerDependencies": {
"svelte": ">= 3"
"svelte": ">= 3",
"jest": "<= 26"
},
"devDependencies": {
"@sveltejs/adapter-static": "^1.0.0-next.10",
"@types/jest": "^26.0.23",
"doctoc": "^2.0.0",
"esbuild": "^0.12.1",
"esbuild": "^0.12.5",
"esbuild-jest": "^0.5.0",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
Expand All @@ -58,7 +59,7 @@
"standard-version": "^9.3.0",
"svelte": "^3.18.2",
"svelte-preprocess": "^4.7.3",
"typescript": "^4.2.4",
"typescript": "^4.3.2",
"why-is-node-running": "^2.2.0"
}
}
2 changes: 1 addition & 1 deletion src/__tests__/fixtures/shared/commonTransformerTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const sharedTests = (dependencies) => {
it('should accept maxBuffer option for preprocess buffer limit', () => {
expect(
() => runTransformer('SassComp', { preprocess: true, maxBuffer: 1 })
).toThrow('spawnSync /bin/sh ENOBUFS')
).toThrow(/^spawnSync .* ENOBUFS$/)
runTransformer('SassComp', { preprocess: true, maxBuffer: 5 * 1024 * 1024 })
})

Expand Down
3 changes: 2 additions & 1 deletion src/preprocess.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { preprocess } from 'svelte/compiler'
import { pathToFileURL } from 'url'

const { source, filename, svelteConfig } = process.env
import(svelteConfig).then(configImport => {
import(pathToFileURL(svelteConfig)).then(configImport => {
// ESM or CommonJS
const config = configImport.default ? configImport.default : configImport

Expand Down

0 comments on commit 48a7506

Please sign in to comment.