Skip to content

Instantly share code, notes, and snippets.

@Lego2012
Last active April 17, 2024 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Lego2012/7b726d936d299d9bd035a6109d83f722 to your computer and use it in GitHub Desktop.
Save Lego2012/7b726d936d299d9bd035a6109d83f722 to your computer and use it in GitHub Desktop.
// Hier gibt es nur ein Sass- und Eleventy-Script für alles. Die Parameter werden erst im Start und Production Script gesetzt
// Clever!
"scripts": {
    "sass": "sass src/scss/global.scss:dist/css/global.css",
    "eleventy": "npx @11ty/eleventy",
    "start": "concurrently 'npm run eleventy -- --serve --quiet' 'npm run sass -- --watch'",
    "production": "NODE_ENV=production npm run eleventy && npm run sass -- --style=compressed --no-source-map"
}
"scripts": {
    "watch:sass": "sass src/sass:public/css --watch",
    "build:sass": "sass src/sass:public/css --no-source-map",
    "watch:eleventy": "npx @11ty/eleventy --serve",
    "build:eleventy": "npx @11ty/eleventy",
    "start": "npm-run-all build:sass --parallel watch:*",
    "build": "npm-run-all build:*"
}
"scripts": {
    "clean": "rm -r dist",
    "watch:sass": "sass --watch --update --style=expanded src/sass:dist/css",
    "watch:eleventy": "npx @11ty/eleventy --serve",
    "build:sass": "sass --no-source-map --style=compressed src/sass:dist/css",
    "build:eleventy": "NODE_ENV=production npx @11ty/eleventy",
    "prebuild": "npm run clean",
    "build": "run-s build:sass build:eleventy",
    "postbuild": "postcss dist/css/*.css -u autoprefixer cssnano -r --no-map",
    "start": "run-p watch:*"
}
"scripts": {
    "start": "npm run dev",
    "dev": "run-s clean eleventy:dev --print-label",
    "build": "run-s clean eleventy:prod --print-label",
    "eleventy:dev": "cross-env ELEVENTY_ENV=development npx @11ty/eleventy --serve",
    "eleventy:prod": "cross-env ELEVENTY_ENV=production npx @11ty/eleventy",
    "clean": "del-cli dist"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment