mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Changed:
- Renamed 'mconfig.json' to 'loconfig.json'.
- Renamed 'concat.js' to 'concats.js' to represent flexible functionality.
- loconfig.json: Base paths are nested under "paths".
- loconfig.json: Paths for tasks are nested under "tasks".
- Refactored each task to process corresponding entries under "tasks" in 'loconfig.json'.
- watch.js: Changed concats watch to use task's includes.
Added:
- tiny-glob v0.2.9
- Utility 'glob.js' to use dynamic imports to fetch an available glob function from node modules.
- Utility 'template.js' to provide a function to render template tags (`{% ... %}`) in tasks.
- concats.js: Support for concatenating groupes of files.
- scripts.js: Support for ESBuild's "outdir" option.
62 lines
1.6 KiB
JSON
Executable File
62 lines
1.6 KiB
JSON
Executable File
{
|
|
"paths": {
|
|
"url": "locomotive-boilerplate.test",
|
|
"src": "./assets",
|
|
"dest": "./www",
|
|
"images": {
|
|
"src": "./assets/images"
|
|
},
|
|
"styles": {
|
|
"src": "./assets/styles",
|
|
"dest": "./www/assets/styles"
|
|
},
|
|
"scripts": {
|
|
"src": "./assets/scripts",
|
|
"dest": "./www/assets/scripts"
|
|
},
|
|
"svgs": {
|
|
"src": "./assets/images/sprite",
|
|
"dest": "./www/assets/images"
|
|
},
|
|
"views": {
|
|
"src": "./views/boilerplate/template"
|
|
}
|
|
},
|
|
"tasks": {
|
|
"concats": [
|
|
{
|
|
"includes": [
|
|
"{% paths.scripts.src %}/vendors/*.js"
|
|
],
|
|
"outfile": "{% paths.scripts.dest %}/vendors.js"
|
|
}
|
|
],
|
|
"scripts": [
|
|
{
|
|
"includes": [
|
|
"{% paths.scripts.src %}/app.js"
|
|
],
|
|
"outfile": "{% paths.scripts.dest %}/app.js"
|
|
}
|
|
],
|
|
"styles": [
|
|
{
|
|
"infile": "{% paths.styles.src %}/critical.scss",
|
|
"outfile": "{% paths.styles.dest %}/critical.css"
|
|
},
|
|
{
|
|
"infile": "{% paths.styles.src %}/main.scss",
|
|
"outfile": "{% paths.styles.dest %}/main.css"
|
|
}
|
|
],
|
|
"svgs": [
|
|
{
|
|
"includes": [
|
|
"{% paths.svgs.src %}/*.svg"
|
|
],
|
|
"outfile": "{% paths.svgs.dest %}/sprite.svg"
|
|
}
|
|
]
|
|
}
|
|
}
|