├── .gitignore
├── public
├── robots.txt
├── favicon
│ ├── favicon.ico
│ ├── favicon.png
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── apple-touch-icon.png
│ ├── mstile-150x150.png
│ ├── android-chrome-192x192.png
│ ├── android-chrome-256x256.png
│ ├── browserconfig.xml
│ ├── site.webmanifest
│ └── safari-pinned-tab.svg
└── index.html
├── src
├── index.js
├── components
│ └── Button.svelte
├── App.svelte
├── pages
│ └── Home.svelte
└── main.css
├── tailwind.config.js
├── postcss.config.js
├── snowpack.config.js
├── package.json
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .build
2 | build
3 | web_modules
4 | node_modules
5 | .env
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/public/favicon/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/favicon.ico
--------------------------------------------------------------------------------
/public/favicon/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/favicon.png
--------------------------------------------------------------------------------
/public/favicon/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/favicon-16x16.png
--------------------------------------------------------------------------------
/public/favicon/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/favicon-32x32.png
--------------------------------------------------------------------------------
/public/favicon/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/apple-touch-icon.png
--------------------------------------------------------------------------------
/public/favicon/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/mstile-150x150.png
--------------------------------------------------------------------------------
/public/favicon/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/android-chrome-192x192.png
--------------------------------------------------------------------------------
/public/favicon/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/monitoro-inc/svelte-tailwind-snowpack/HEAD/public/favicon/android-chrome-256x256.png
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import App from './App';
2 |
3 | const app = new App({
4 | target: document.querySelector('#main')
5 | });
6 |
7 | export default app;
8 |
--------------------------------------------------------------------------------
/src/components/Button.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/App.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | purge: ['./src/**/*.svelte', './public/*.html'],
3 | theme: {},
4 | variants: {
5 | extend: {
6 | backgroundColor: ['active']
7 | }
8 | },
9 | plugins: [require('tailwindcss-font-inter')()]
10 | };
11 |
--------------------------------------------------------------------------------
/public/favicon/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #2b5797
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | const tailwind = require('tailwindcss');
2 | const autoprefixer = require('autoprefixer');
3 | const cssnano = require('cssnano');
4 |
5 | const plugins =
6 | process.env.NODE_ENV === 'production'
7 | ? [tailwind, autoprefixer, cssnano]
8 | : [tailwind, autoprefixer];
9 |
10 | module.exports = { plugins };
11 |
--------------------------------------------------------------------------------
/snowpack.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import("snowpack").SnowpackUserConfig } */
2 | module.exports = {
3 | mount: {
4 | public: '/',
5 | src: '/_dist_'
6 | },
7 | plugins: [
8 | '@snowpack/plugin-svelte',
9 | '@snowpack/plugin-dotenv',
10 | '@snowpack/plugin-postcss'
11 | ],
12 | installOptions: {
13 | polyfillNode: true
14 | },
15 | alias: {
16 | components: './src/components',
17 | pages: './src/pages'
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/public/favicon/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Snowpack App",
3 | "short_name": "Snowpack App",
4 | "icons": [
5 | {
6 | "src": "./android-chrome-192x192.png?v=ngJXw5Oder",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "./android-chrome-256x256.png?v=ngJXw5Oder",
12 | "sizes": "256x256",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#6f57ff",
17 | "background_color": "#6f57ff"
18 | }
19 |
--------------------------------------------------------------------------------
/src/pages/Home.svelte:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
14 |
Hello Snowpack!
15 |
16 |
Clicked {counter} times.
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/main.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | html {
6 | @apply bg-gray-100;
7 | @apply text-gray-800;
8 | }
9 |
10 | body {
11 | @apply h-full;
12 | @apply antialiased;
13 | @apply text-gray-800;
14 | }
15 |
16 | a {
17 | @apply text-purple-500;
18 | }
19 |
20 | h1 {
21 | @apply text-3xl;
22 | @apply text-gray-700;
23 | @apply font-light;
24 | letter-spacing: -0.02em;
25 | }
26 |
27 | h2 {
28 | @apply text-xl;
29 | @apply text-gray-600;
30 | @apply mb-2;
31 | letter-spacing: -0.02rem;
32 | }
33 |
34 | h3 {
35 | @apply text-gray-600;
36 | @apply font-bold;
37 | @apply mb-2;
38 | }
39 |
40 | .whitespace-breakspaces {
41 | white-space: break-spaces;
42 | }
43 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-tailwind-snowpack",
3 | "version": "1.0.0",
4 | "author": {
5 | "name": "Omar Kamali",
6 | "email": "omar@monitoro.xyz",
7 | "url": "https://monitoro.xyz"
8 | },
9 | "scripts": {
10 | "start": "snowpack dev",
11 | "build": "snowpack build",
12 | "build:css": "postcss --verbose"
13 | },
14 | "dependencies": {
15 | "svelte": "^3.24.0",
16 | "svelte-routing": "^1.4.2",
17 | "tailwindcss-font-inter": "^2.0.0"
18 | },
19 | "devDependencies": {
20 | "@snowpack/plugin-dotenv": "^2.0.5",
21 | "@snowpack/plugin-postcss": "^1.0.11",
22 | "@snowpack/plugin-svelte": "^3.4.1",
23 | "autoprefixer": "^10.1.0",
24 | "cssnano": "^4.1.10",
25 | "postcss": "^8.2.1",
26 | "postcss-apply": "^0.12.0",
27 | "postcss-cli": "^8.3.1",
28 | "postcss-cssnext": "^3.1.0",
29 | "postcss-import": "^14.0.0",
30 | "snowpack": "^2.18.5",
31 | "svelte-preprocess": "^4.6.1",
32 | "tailwindcss": "^2.0.2"
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Svelte Tailwind Snowpack Boilerplate
2 |
3 | > ✨ Bootstrapped with Create Snowpack App (CSA).
4 |
5 | ## Available Scripts
6 |
7 | ### yarn start
8 |
9 | Runs the app in the development mode.
10 | Open http://localhost:8080 to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### yarn build
16 |
17 | Builds a static copy of your site to the `build/` folder.
18 | Your app is ready to be deployed!
19 |
20 | **For the best production performance:** Add a build bundler plugin like [@snowpack/plugin-webpack](https://github.com/snowpackjs/snowpack/tree/master/plugins/plugin-webpack) or [snowpack-plugin-rollup-bundle](https://github.com/ParamagicDev/snowpack-plugin-rollup-bundle) to your `snowpack.config.json` config file.
21 |
22 | ## Environment Variables
23 |
24 | You can use environment variables provided they are prefixed with `SNOWPACK_PUBLIC_`.
25 | 1. Define your variable in an `.env` file in the root of your project
26 | 2. Use them in your code using `import.meta.env.SNOWPACK_PUBLIC_YOUR_ENV_VAR`
27 |
28 | ## License
29 |
30 | This project is licensed under the MIT License.
31 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Snowpack App
8 |
9 |
14 |
20 |
26 |
27 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/public/favicon/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
35 |
--------------------------------------------------------------------------------