build: add build and watch for css

This commit is contained in:
Oscar 2019-11-22 12:36:47 +01:00
parent 13aee11ee3
commit 0013f2e476
3 changed files with 5161 additions and 3 deletions

View File

@ -30,7 +30,7 @@ module.exports = function (config) {
console.log(post); console.log(post);
}) })
config.addPassthroughCopy({'_site/css/': 'assets/css/'}) config.addPassthroughCopy({'assets/css/': 'assets/css/'})
config.addShortcode('definitionFlag', (flag) => { config.addShortcode('definitionFlag', (flag) => {
const cleanText = new Map([ const cleanText = new Map([

5151
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,13 @@
"description": "A modern dictionary about us.", "description": "A modern dictionary about us.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "eleventy", "build": "npm run build:css && npm run build:site",
"build:site": "eleventy",
"build:css": "parcel build assets/css/base.scss --out-dir assets/css/",
"watch": "eleventy --watch", "watch": "eleventy --watch",
"serve": "eleventy --serve", "serve": "concurrently \"npm run serve:site\" \"npm run watch:css\"",
"watch:css": "parcel watch assets/css/base.scss --out-dir dist/assets/css/",
"serve:site": "eleventy --serve",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"create-definitions": "bin/create-definitions" "create-definitions": "bin/create-definitions"
}, },
@ -34,7 +38,10 @@
"prism-themes": "^1.3.0" "prism-themes": "^1.3.0"
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^5.0.0",
"esm": "^3.2.25", "esm": "^3.2.25",
"parcel-bundler": "^1.12.4",
"sass": "^1.23.7",
"slugify": "^1.3.6" "slugify": "^1.3.6"
} }
} }