Skip to content

Instantly share code, notes, and snippets.

@ivanchromjak
Last active August 8, 2021 03:59
Show Gist options
  • Save ivanchromjak/8a2304f171c264af3afb192e1aa75c3e to your computer and use it in GitHub Desktop.
Save ivanchromjak/8a2304f171c264af3afb192e1aa75c3e to your computer and use it in GitHub Desktop.
Jekyll npm build script, copies sass, js dependencies to assets directory and concatenates and minifies js files.
{
"name": "jekyll-theme-plus",
"version": "1.0.0",
"description": "Advanced Jekyll theme",
"repository": {
"type": "git",
"url": "https://github.com/ivanchromjak/jekyll-theme-plus.git"
},
"author": "Ivan Chromjak",
"license": "MIT",
"bugs": {
"url": "https://github.com/ivanchromjak/jekyll-theme-plus/issues"
},
"homepage": "https://plus.jekyll.plus",
"dependencies": {
"simple-jekyll-search": "^1.5.0",
"system-font-css": "^2.0.1",
"uikit": "^3.0.0-beta.31"
},
"devDependencies": {
"cpx": "^1.5.0",
"jshint": "^2.9.5",
"ncp": "latest",
"onchange": "^3.3.0",
"uglify-js": "^3.2.1"
},
"scripts": {
"copy:sass": "ncp node_modules/uikit/src/scss/ _sass/vendor/uikit/ && ncp node_modules/system-font-css/ _sass/vendor/system-font-css/",
"copy:js": "cpx \"node_modules/uikit/dist/js/uikit.js\" assets/js/vendor/ && cpx \"node_modules/uikit/dist/js/uikit-icons.js\" assets/js/vendor/ && cpx \"node_modules/simple-jekyll-search/dest/simple-jekyll-search.js\" assets/js/vendor/",
"lint": "jshint assets/js/_main.js",
"uglify": "uglifyjs assets/js/vendor/uikit.js assets/js/vendor/uikit-icons.js assets/js/vendor/simple-jekyll-search.js assets/js/_main.js -m -c -o assets/js/main.min.js",
"build": "npm run lint && npm run uglify",
"watch": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build",
"postinstall": "npm run copy:sass && npm run copy:js && npm run build"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment