I’ve returned to Sage after not having done a theme from scratch for a few month.
I got pretty comfortable with the Sage workflow.
I want to start a new theme so I cloned the Sage repo. I noticed pretty quickly that it’s different from the Sage I’m used to.
I noticed that there’s no gulpfile. I picked up pretty quickly that building is done using npm tasks instead, thanks to the readme.
So once I’d installed the npm modules I ran ‘npm run build’. This returned a handful of errors:
ERROR in /var/www/sagetest/wp-content/themes/sagetest/node_modules/eslint/lib/eslint.js:12
const assert = require("assert"),
^^^^^
Use of const in strict mode.
@ multi main
ERROR in /var/www/sagetest/wp-content/themes/sagetest/node_modules/eslint/lib/eslint.js:12
const assert = require("assert"),
^^^^^
Use of const in strict mode.
@ multi customizer
ERROR in /var/www/sagetest/wp-content/themes/sagetest/node_modules/eslint/lib/eslint.js:12
const assert = require("assert"),
^^^^^
Use of const in strict mode.
@ multi main
I’m assuming that there’s nothing run with the repo, and that I’ve skipped a necessary step while setting up the project?
The next thing I tried was ‘npm run build’. This returns the same errors and doesn’t exit.
I made a minor change in the default main.scss file and noticed activity in the terminal running the ‘watch’ command.
The activity outputs (among other things) the same errors.
After I make changes, there is no change in change in the styling of my test site.
In the network tab I notice that the request for ‘main.css’ returns a 404.
By default the site is trying to load ‘…/dist/styles/main.css’. However the dist directory doesn’t exist.
I’m guessing that I’ve missed some setup steps.
What steps have I missed?
Also, apart from the readme, is there any new documentation on setting up a Sage project?
It looks like the Sage documentation under the section ‘Theme Development and Building’ is outdated.
Thanks.