Last active
August 27, 2023 13:48
-
-
Save tony-jones/609c16a8f3f7f31a0d9b to your computer and use it in GitHub Desktop.
jekyll site: asset building using npm run-scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "jekyll-starter-kit", | |
"version": "1.0.0", | |
"description": "jekyll, asset build using npm scripts", | |
"main": "src/scripts/main.js", | |
"scripts": { | |
"eslint:dist": "eslint src/scripts/*.js", | |
"eslint": "npm run eslint:dist", | |
"uglify:dist": "uglify -s src/scripts/*.js -o dist/scripts/main.min.js", | |
"uglify:_site": "uglify -s src/scripts/*.js -o _site/dist/scripts/main.min.js", | |
"uglify": "npm run uglify:dist", | |
"test": "npm run build", | |
"clean:dist": "rm -rf dist && rm -rf _site", | |
"clean": "npm run clean:dist", | |
"copy:dist": "cp -R src/ dist/", | |
"copy": "npm run copy:dist", | |
"prefix": "postcss --use autoprefixer -b 'last 3 versions' --output dist/styles/main.min.css dist/styles/main.min.css", | |
"sass:dist": "node-sass --output-style compressed src/styles/main.scss dist/styles/main.min.css", | |
"sass:_site": "node-sass --output-style compressed src/styles/main.scss _site/dist/styles/main.min.css", | |
"sass": "npm run sass:dist", | |
"critical": "critical _site/index.html --base _site --minify --css _site/dist/styles/main.min.css > _includes/css/critical.css", | |
"font": "cp -R src/fonts dist/fonts", | |
"imagemin": "imagemin src/images/* dist/images/ -p", | |
"pagespeed": "psi tony-jones.github.io/jekyll-starter-kit/ --strategy=mobile", | |
"accessibility": "a11y tony-jones.github.io/jekyll-starter-kit/", | |
"build:jekyll": "jekyll build --config _config.yml,_config-dev.yml", | |
"build:js": "npm run eslint && npm run uglify", | |
"build:css": "npm run sass && npm run prefix", | |
"build:font": "npm run font", | |
"build:images": "npm run imagemin", | |
"build": "npm run clean && npm run build:js && npm run build:css && npm run build:jekyll && npm run critical", | |
"watch:jekyll": "chokidar 'index.html' '_includes/*.html' '_layouts/*.html' '_posts/*' -c 'npm run build:jekyll && browser-sync reload'", | |
"watch:css": "chokidar 'src/styles/**/*' -c 'npm run sass:_site && browser-sync reload'", | |
"watch:js": "chokidar 'src/scripts/*' -c 'npm run uglify:_site && browser-sync reload'", | |
"serve": "browser-sync start --https --server _site", | |
"start": "npm run build -s && parallelshell \"npm run serve -s\" \"npm run watch:jekyll -s\" \"npm run watch:css -s\" \"npm run watch:js -s\"" | |
}, | |
"author": "Tony Jones <[email protected]>, <@iamtonybagels>", | |
"license": "Apache", | |
"devDependencies": { | |
"autoprefixer": "^6.3.1", | |
"browser-sync": "^2.11.1", | |
"eslint": "^1.10.3", | |
"eslint-config-google": "^0.3.0", | |
"image-min": "^0.3.2", | |
"node-sass": "^3.4.2", | |
"parallelshell": "^2.0.0", | |
"postcss": "^5.0.14", | |
"postcss-cli": "^2.5.0", | |
"uglify": "^0.1.5", | |
"watch": "^0.17.1" | |
}, | |
"dependencies": { | |
"a11y": "^0.4.0", | |
"critical": "^0.7.0", | |
"parallelshell": "^2.0.0", | |
"psi": "^2.0.2", | |
"chokidar": "1.4.2", | |
"chokidar-cli": "1.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment