New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

smelte

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smelte - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "smelte",
"description": "UI framework for Svelte using Tailwind CSS",
"version": "0.1.0",
"version": "0.1.1",
"scripts": {

@@ -6,0 +6,0 @@ "dev": "sapper dev -p 7777",

@@ -13,5 +13,5 @@ # Smelte

### Installation
Clone the project's sapper template, install the dependencies and write some pretty code!
Clone the project's template, install the dependencies and write some pretty code!
```
npx degit matyunya/smelte-template my-svelte-project
npx degit matyunya/smelte-sapper-template my-svelte-project
cd my-svelte-project

@@ -25,9 +25,87 @@ yarn && yarn dev

```
npx degit matyunya/smelte-template#no-sapper my-svelte-project
npx degit matyunya/smelte-template my-svelte-project
```
### Issues
### Adding to existing project
Basically you need to add Tailwind to your project and import Smelte's configuration.
Smelte is still in very early stage, so please feel free to submit any feedback.
First add the dependencies:
```
yarn add smelte tailwindcss rollup-plugin-postcss svelte-preprocess @fullhuman/postcss-purgecss postcss-import tailwindcss-elevation
```
Add following to `postcss.config.js` in your project's root directory
```
const production = !process.env.ROLLUP_WATCH;
const purgecss = require("@fullhuman/postcss-purgecss");
module.exports = {
plugins: [
require("postcss-import")(),
require("tailwindcss")("./tailwind.config.js"),
require("autoprefixer"),
production &&
purgecss({
content: ["./**/*.html", "./**/*.svelte"],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [],
whitelistPatterns: [
// for JS ripple
/ripple/
]
})
]
};
```
Then to `tailwind.config.js`
```
// Extend your config here.
const config = require("smelte/tailwind.config.js");
module.exports = config;
```
Add postcss to your Rollup config:
```
import postcss from "rollup-plugin-postcss";
import autoPreprocess from "svelte-preprocess";
...
plugins: [
svelte({
preprocess: autoPreprocess({
postcss: true
}),
// enable run-time checks when not in production
dev: !production,
// we'll extract any component CSS out into
// a separate file — better for performance
css: css => {
css.write("public/bundle.css");
}
}),
postcss({
extract: "public/utils.css"
}),
```
Add exported css file to `public/index.html`:
```
<link rel='stylesheet' href='/utils.css'>
```
Create `smelte.css` in `src` folder with this line:
```
@import 'smelte/src/tailwind';
```
And import it in your `src/main.js`:
```
import './tailwind.css';
```
That's it! The process is quite tedious at the moment. Please send feedback if you know how to make it better.
### Components

@@ -76,3 +154,2 @@ - [x] Text field

- [ ] Document API
- [ ] IE 11 support
- [ ] CDN version
- [ ] IE 11 support

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc