hugo, install using homebrew if you don't have it already: brew install hugo
yarn, you'll probably want to install with brew install yarn --without-node as to not override your system's Node.js or if you use nvm to manage node versions.
Install and Run
Clone project locally
If upgrading an existing project from npm, or whenever you need to rebuild dependencies, run yarn rebuild (shortcut to rm -rf node_modules & yarn install that I wrote to myself and left in); otherwise grab dependencies normally with yarn install;
It's recommended to change the default port in package.json, to avoid having to worry about other Besugo projects being served on the same port.
yarn start task serves the site locally and starts listening for changes
Changes
Use yarn
Closes #7
should speed up dependency builds due to its local cache system
yarn.lock is always commited to ensure dependencies are equal among peers
Removed everything-gulp
Cleaner and more organized tasks
Webpack up and running and ready to receive more tasks, for example for #27
One less layer of abstraction when developing (gulp wrappers), so we can work more directly with whatever components we need
Moved src CMS config.yml file to another location
to cms/config.yml
avoids race conditions with hugo tasks
CMS branch task only fires when that specific file is changed, as opposed to on every change like it did before
Changed some files and directory structure
.css files no longer concatenated (for now), so no need for scss_cms folder
you can still use @import in the main file to concatenate whatever you want into it and keep only a single output file of course
altered JS-files structure: ./js for vanilla-JS/jQuery files, ./scripts reserved for build files
more in tune with the classical app dev structure
output files are also changed, both site. and admin. are now called main.min.js (specifying site or admin in either file was redundant due to their location, and this way we can have a single webpack task for both files instead of separate tasks for each file)
Ignore intermediate files
Using a ./temp folder for intermediate files generated by webpack/sass/whatever, so that hugo doesn't go nuts constantly copying everything to public; only final files need to go in ./public
Dev server port
Can define the port at which the site is served locally directly from package.json
We don't have to constantly worry about open processes when switching between projects
When updating other project's Besugo tech stack, consider giving each a new unique port
Extra configurations in package.json
Can define the compatibility list (browserList) in package.json, for readability and ease-of-finding mostly
Ditto for sass configuration
Other notes
This patch seems to have removed the occasional hugo build error/exception (harmless, running gulp again would build correctly)
Uses sharp, the same library used by gulp-responsive (#12)
Related but non-critical tickets
20 - Add common polyfills
21 - Upgrade to latest Node.js 8 and Yarn 1
22 - Support more filetypes for uploaded responsive images
@Quicksaver great work on this refactoring. This makes everything quite a lot simpler and in line with what most web projects currently use: i.e. yarn / webpack / node scripts
Important notes from the readme!
Changes
Use yarn
yarn.lock
is always commited to ensure dependencies are equal among peersRemoved everything-gulp
Moved src CMS config.yml file to another location
cms/config.yml
Changed some files and directory structure
.css
files no longer concatenated (for now), so no need forscss_cms
folder@import
in the main file to concatenate whatever you want into it and keep only a single output file of course./js
for vanilla-JS/jQuery files,./scripts
reserved for build filessite.
andadmin.
are now calledmain.min.js
(specifying site or admin in either file was redundant due to their location, and this way we can have a single webpack task for both files instead of separate tasks for each file)Ignore intermediate files
./temp
folder for intermediate files generated by webpack/sass/whatever, so that hugo doesn't go nuts constantly copying everything to public; only final files need to go in./public
Dev server port
Extra configurations in package.json
Other notes
gulp
again would build correctly)Related but non-critical tickets
20 - Add common polyfills
21 - Upgrade to latest Node.js 8 and Yarn 1
22 - Support more filetypes for uploaded responsive images
23 - Build srcset attributes automatically
24 - Cleaner console when serving locally
25 - sass-tasks as webpack tasks?
Obsoletes