-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* import svelte 2 or 3 * cleanup the config parser * not sure why this isn't working? * parcel is so clever * fix gitignore * only run svelte 3 test * Found a hacky solution * fix hmr for es6 modules * try to fix travis * idk what went wrong, but travis is becoming a pain in the ass. Might switch to Azure DevOps for this repo as well... * switch to azure devops * drop windows in test * update build status badge * comment out node 6 as it's broken in latest parcel release
- Loading branch information
1 parent
4f49e02
commit 827cf97
Showing
40 changed files
with
312 additions
and
81 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
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 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"packages": ["packages/*"], | ||
"version": "2.0.0" | ||
} |
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
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017-present Jasper De Moor | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
File renamed without changes.
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,33 @@ | ||
{ | ||
"name": "parcel-plugin-svelte", | ||
"version": "2.0.0", | ||
"description": "Parcel plugin to support svelte", | ||
"main": "./dist.js", | ||
"scripts": { | ||
"build": "babel src -d lib", | ||
"prepublish": "yarn build", | ||
"clean": "rm -rf lib" | ||
}, | ||
"keywords": [ | ||
"parcel", | ||
"svelte" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/DeMoorJasper/parcel-plugin-svelte.git" | ||
}, | ||
"author": "Jasper De Moor", | ||
"license": "ISC", | ||
"peerDependencies": { | ||
"parcel-bundler": "^1.11.0", | ||
"svelte": "^2.0.0 || ^3.0.0" | ||
}, | ||
"dependencies": { | ||
"svelte-dev-helper": "^1.1.7" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.3.1" | ||
} | ||
} |
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,48 @@ | ||
# parcel-plugin-svelte | ||
|
||
[![Build Status](https://dev.azure.com/DeMoorJasper/parcel-plugin-svelte/_apis/build/status/DeMoorJasper.parcel-plugin-svelte?branchName=master)](https://dev.azure.com/DeMoorJasper/parcel-plugin-svelte/_build/latest?definitionId=3&branchName=master) | ||
|
||
A parcel plugin that enables svelte support [[CHANGELOG]](https://github.com/DeMoorJasper/parcel-plugin-svelte/blob/master/CHANGELOG.md) | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add parcel-plugin-svelte -D | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
npm install parcel-plugin-svelte -D | ||
``` | ||
|
||
## Configuration | ||
|
||
The default configuration should work for most people but for anyone who would like to change the way svelte compiles the files there is the possibility to configure it. | ||
|
||
This can be done though a `svelte.config.js` file, `.svelterc` file or `svelte` field in `package.json`. | ||
|
||
For documentation on which parameters u can set and use look at the official [svelte docs](https://github.com/sveltejs/svelte) | ||
|
||
```Javascript | ||
// Used by svelte.compile | ||
compilerOptions: { | ||
... | ||
}, | ||
// Used by svelte.preprocess | ||
preprocess: { | ||
... | ||
} | ||
``` | ||
|
||
### CSS CompilerOptions | ||
|
||
If you set `compilerOptions.css` to `false`, CSS will be bundled in a separate file. It also enables post-transformations provided by Parcel such as PostCSS and file resolution for `url()`. | ||
|
||
## How does it work? | ||
|
||
If you want to know how it works have a look at [my article](https://medium.com/@jasperdemoor/writing-a-parcel-plugin-3936271cbaaa) about this plugin, might help if you wanna fix a bug or write your own parcel-plugin. | ||
|
||
## License | ||
|
||
MIT License |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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 @@ | ||
{ | ||
"name": "svelte-2-example", | ||
"main": "index.html", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"start": "parcel index.html --no-cache" | ||
}, | ||
"dependencies": { | ||
"parcel-bundler": "^1.11.0", | ||
"parcel-plugin-svelte": "^2.0.0", | ||
"svelte": "^2.16.1" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
{ | ||
"name": "svelte-2-tests", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"private": true, | ||
"scripts": { | ||
"test:2": "yarn clean && NODE_ENV=test mocha --require @babel/register --timeout 50000", | ||
"clean": "rm -rf test/dist" | ||
}, | ||
"dependencies": { | ||
"@babel/cli": "^7.2.3", | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.3.1", | ||
"@babel/register": "^7.0.0", | ||
"mocha": "^5.1.1", | ||
"parcel-assert-bundle-tree": "^1.0.0", | ||
"parcel-bundler": "^1.11.0", | ||
"parcel-plugin-svelte": "^2.0.0", | ||
"svelte": "^2.16.1" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.