Giter Site home page Giter Site logo

stackmix's People

Contributors

alesvaupotic avatar diepoe avatar ghostdevv avatar jakobrosenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

stackmix's Issues

Svite dependency

Update svite to @sveltejs/vite-plugin-svelte instead of @svitejs/vite-plugin-svelte

serviceWorker broken?

I created a stackmix project with serviceWorker features. After running npm run dev, I got this:

error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  workbox-window (imported by /home/zen/latihan/mainan/src/components/Serviceworker.svelte)

Are they installed?
    at optimizeDeps (/home/zen/latihan/mainan/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:72342:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runOptimize (/home/zen/latihan/mainan/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:73001:48)
    at async Server.httpServer.listen (/home/zen/latihan/mainan/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-cc49d7be.js:73015:17)
npm ERR! code 1
npm ERR! path /home/zen/latihan/mainan
npm ERR! command failed
npm ERR! command sh -c vite

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zen/.npm/_logs/2021-07-09T17_56_51_342Z-debug.log
ERROR: "dev:vite" exited with 1.
npm ERR! code 1
npm ERR! path /home/zen/latihan/mainan
npm ERR! command failed
npm ERR! command sh -c run-p dev:*

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zen/.npm/_logs/2021-07-09T17_56_51_824Z-debug.log

I use pnpm i for installing dependencies.

First run experience for routify-templates

I decided to give routify-templates a try.

My comments below!

Not sure why it is downloading the whole of Playwright for me. Feels a bit heavy to download 250Mb+ worth of browsers?

I used these options:

✔ Pick a bundler. Combine at your own risk. › **rollup**
✔ Pick a template. Combine at your own risk. › **single-page**
✔ Pick features. › markdown, postcss, vercel
✔ Pick content. › content
✔ Misc › dev

Then when I try to run, spassr is not included, so my first run fails. Here's the package.json (abbreviated):

{
  "name": "routify-app",
  "version": "1.0.0",
  "@comments scripts": {
    "dev": "run all dev:* scripts",
    "dev:routify": "generate Routify's routes.js on filechange",
    "build": "run all build:* scripts",
    "build:routify": "build routify",
    "serve": "serve content in 'dist' folder"
  },
  "scripts": {
    "dev": "run-p dev:* serve:*",
    "dev:routify": "routify",
    "serve": "run-p serve:*",
    "serve:spa": "spassr",
    "serve:ssr": "spassr --ssr --port 5005",
    "build": "cross-env NODE_ENV=production run-s build:*",
    "build:routify": "routify -b",
    "test": "npm run test:dev && npm run test:build",
    "test:dev": "node test/lib/wrapper dev ava test/{common,dev}/**/*.test.js",
    "test:build": "node test/lib/wrapper build ava test/{common,build}/**/*.test.js"
  },
  "devDependencies": {
    "@roxi/routify": "^2.14.0",
    "@ava/cooperate": "^0.1.0",
    "fkill": "^7.1.0",
    "npm-run-all": "^4.1.5",
    "svelte": "^3.35.0",
    "playwright": "^1.8.0",
    "cross-env": "^7.0.3",
    "mdsvex": "^0.8.9",
    "remark-slug": "^6.0.0",
    "routify-plugin-frontmatter": "^1.0.1",
    "svelte-preprocess": "^4.6.3",
    "postcss": "^8.2.4"
  },
  (...)
}

So I am thinking this need spassr and doesn't need playwright.

If I install spassr:

npm i spassr

I get it to run.

But then it fails to build, and I get a blank page on localhost:5000

[spassr] Serving ssr on localhost:5005
 > error: Could not resolve "dist/build/main.js"

1 error
[tossr] Error on url: /
[tossr] Unhandled promise rejection:
[tossr] Error: Build failed with 1 error:
error: Could not resolve "dist/build/main.js"
    at failureErrorWithLog (/Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:1160:15)
    at buildResponseToResult (/Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:896:32)
    at /Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:991:20
    at /Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:542:9
    at handleIncomingPacket (/Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:631:9)
    at Socket.readFromStdout (/Users/johanronsse/Sites/routify-templates/output/node_modules/esbuild/lib/main.js:509:7)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10) {
  errors: [
    {
      detail: undefined,
      location: null,
      notes: [],
      text: 'Could not resolve "dist/build/main.js"'
    }
  ],
  warnings: []
}
 > error: Could not resolve "dist/build/main.js"

1 error

Question about default template

I chose the scroll template. In the default _layout.svelte I found some odd code. What's with the lines only containing ';'? Is this autogenerated from something?

<script>
  import { components, beforeUrlChange, layout, page, url } from "@roxi/routify";
  ;

  ;

  ;

  ;

  // we want smooth scrolling when navigating (hash links) within the same page
  $beforeUrlChange(
    (event, newRoute) => (document.documentElement.style["scrollBehavior"] = newRoute === $page ? "smooth" : "auto")
  );

  ;
</script>

Typescript support

Hi @dominikg and @jakobrosenberg, 👍 first on this. I wanted to ask if there are any plans to include typescript support since routify and vite supports it , and give users the option to choose between TS or JS

[bug] Failing `npm run generate` command

I get this error when I try to run npm run generate in the cloned stackmix repo:

[error] No files matching the pattern were found: "/Users/user/Desktop/dev/contrib/stackmix/.canvasit-temp/output-hwoajQ/**/*.{js,svelte}".
(node:37847) UnhandledPromiseRejectionWarning: Error: Command failed: npx prettier "/Users/user/Desktop/dev/contrib/stackmix/.canvasit-temp/output-hwoajQ/**/*.{js,svelte}" --write --single-quote --no-semi
[error] No files matching the pattern were found: "/Users/user/Desktop/dev/contrib/stackmix/.canvasit-temp/output-hwoajQ/**/*.{js,svelte}".

    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:652:15)
    at run (/Users/user/Desktop/dev/contrib/stackmix/node_modules/canvasit/canvasit.js:131:9)
    at async _run (/Users/user/Desktop/dev/contrib/stackmix/node_modules/canvasit/canvasit.js:46:16)
    at async merge (/Users/user/Desktop/dev/contrib/stackmix/node_modules/canvasit/canvasit.js:76:20)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:37847) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:37847) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I've already tried to remove prettier from cli.js, but that didn't worked either. Do you have any idea what's wrong?

Index.html in output is full of CR line endings

Shouldn't this be LF? File: index.html in the output of the scroll template.

Screen Shot 2021-05-23 at 13 53 34

Edit: seems like this is a global proble in a lot of templates. Set up another template and found 284 CF line endings.

Couldn't resolve parser

Just posting some output here I got when setting up a new project using Stackmix which is not that clean.

Node 14.15.0

Could this be because I don't have prettier installed globally?

npx stackmix boekentorenroutify
npx: installed 130 in 5.645s
✔ Pick a bundler. Combine at your own risk. › vite
✔ Pick a template. Combine at your own risk. › scroll-navigation
✔ Pick features. › markdown, milligram, postcss, vercel
✔ Pick content. › content
✔ Misc › dev
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)
ConfigError: Couldn't resolve parser "babel-ts"
    at resolveParser$1 (/usr/local/lib/node_modules/prettier/bin-prettier.js:6974:13)
    at normalize (/usr/local/lib/node_modules/prettier/bin-prettier.js:7065:19)
    at textToDoc (/usr/local/lib/node_modules/prettier/bin-prettier.js:9830:21)
    at /usr/local/lib/node_modules/prettier/bin-prettier.js:9824:14
    at formatBodyContent (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1675:22)
    at /Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:85
    at embedTag (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1697:15)
    at embedType (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1622:52)
    at embedScript (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1623:41)
    at Object.embed (/Users/johanronsse/.npm/_npx/34400/lib/node_modules/stackmix/node_modules/prettier-plugin-svelte/plugin.js:1632:20)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.